IBMi (AS400) fans only – A simple way to create table with Rpg Free & SQL embedded




Compile and Run this SQLRPGLE to create table CLANA00F, index CLANA01L and table OTORD00F, and populate:

      **free
      *****************************
      * create CLANA00F & OTORD00F
      *****************************
       ctl-opt option(*nodebugio) dftactgrp(*no) actgrp(*new);
        // The EXEC SQL is never executed. It is used at compile time.
        exec sql Set Option Commit = *None;
        // Create File
        exec sql
          CREATE or REPLACE TABLE myLib/CLANA00F (
          CLANN0 CHARACTER(01) NOT NULL WITH DEFAULT,
          CLCCL0 NUMERIC(7, 0) GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
          CLCIB0 CHARACTER(03) NOT NULL WITH DEFAULT,
          CLNOM0 CHARACTER(50) NOT NULL WITH DEFAULT
          )
          RCDFMT CLANA
          ;
        // Create index
        exec sql
          CREATE INDEX myLib/CLANA01L ON myLib/CLANA00F (CLCCL0 ASC);
        // Fill values
        exec sql
          INSERT INTO CLANA00F (CLCIB0, CLNOM0)
          VALUES (‘EN ‘,’Rod Stewart’);
        exec sql
          INSERT INTO CLANA00F (CLCIB0, CLNOM0)
          VALUES (‘EN ‘,’Bobby McFerrin’);
        exec sql
          INSERT INTO CLANA00F (CLCIB0, CLNOM0)
          VALUES (‘IT ‘,’Adriano Celentano’);
        exec sql
          INSERT INTO CLANA00F (CLCIB0, CLNOM0)
          VALUES (‘IT ‘,’Vasco Rossi’);
        // Create file
        exec sql
          CREATE or REPLACE TABLE myLib/OTORD00F (
          OTANN0 CHARACTER(01) NOT NULL WITH DEFAULT,
          OTCOR0 NUMERIC(7, 0) GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
          OTTIP0 CHARACTER(02) NOT NULL WITH DEFAULT,
          OTCCL0 NUMERIC(7, 0) NOT NULL WITH DEFAULT,
          OTDTA0 NUMERIC(6, 0) NOT NULL WITH DEFAULT,
          OTDTP0 NUMERIC(6, 0) NOT NULL WITH DEFAULT,
          OTCCM0 CHARACTER(06) NOT NULL WITH DEFAULT
          )
          RCDFMT OTORD
          ;
        // Fill values
        exec sql
          INSERT INTO OTORD00F (OTTIP0,OTCCL0,OTDTA0,OTDTP0,OTCCM0)
          VALUES ( ’10’, 1 , 190108 , 190114 , ‘101  ‘ );
        exec sql
          INSERT INTO OTORD00F (OTTIP0,OTCCL0,OTDTA0,OTDTP0,OTCCM0)
          VALUES ( ’10’, 2 , 190108 , 190112 , ‘103  ‘);
        exec sql
          INSERT INTO OTORD00F (OTTIP0,OTCCL0,OTDTA0,OTDTP0,OTCCM0)
          VALUES ( ’10’, 3 , 190112 , 190116 , ‘102  ‘);
        exec sql
          INSERT INTO OTORD00F (OTTIP0,OTCCL0,OTDTA0,OTDTP0,OTCCM0)
          VALUES ( ’10’, 4 , 190108 , 190121 , ‘102  ‘);
        *inlr = *on;

 

https://www.linkedin.com/in/aldosucci/

@adam_on_i Like everything, it’s another option for everyone. If Merlin isn’t the way, businesses will continue to roll their own (which you and I both know lots of people do) but Merlin will help solve some integration problems and will absolutely encourage modern development, which I love

@adam_on_i Like everything, it’s another option for everyone. If Merlin isn’t the way, businesses will continue to roll their own (which you and I both know lots of people do) but Merlin will help solve some integration problems and will absolutely encourage modern development, which I love

– Liam barry (@notesofbarry) (in reply to notesofbarry)07:03 – Jun 02, 2022

Download PTF using FTPS

Hi guys,

We need to download a few PTF’s and per procedure give by IBM we need to do this using FTPS.

Download the 2 certificates, upload to IBM I using DCM and using the command:

FTP RMTSYS(‘delivery01-mul.dhe.ibm.com‘) PORT(21) SECCNN(*SSL)

The problem is that we are getting the error:

Connecting to host dispmy-102.mul.ie.ibm.com at address 129.35.224.102 using port 21.

220 ProFTPD Server (proftpd) [129.35.224.102]

234 AUTH TLS successful

Secure connection error, return code -23.

We have other FTPS servers where this is not a problem using the same procedure. (Upload certificate to DCM).

Are we missing something? Or it is a bad certificate from IBM?

Side note: Using Filezilla we can download the PTF’s.

submitted by /u/Pride1922
[link][comments]

Deliver a comprehensive view of your entire IT landscape. Join our panel of experts as they explore customer success stories & how to extend the value of #ServiceNow® to include #IBMi systems. 

Deliver a comprehensive view of your entire IT landscape. Join our panel of experts as they explore customer success stories & how to extend the value of #ServiceNow® to include #IBMi systems. okt.to/CiUFNB pic.twitter.com/eO0r5n2Kca

– Ilija Milos (@IM55016804)05:30 – Jun 01, 2022

Verified by MonsterInsights