Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Source code type

iSeries library

Required extension

Used in MetaModel

RPG-III programs

QRPGSRC

*.rpg, *.rpg38

RPG300

ILE RPG Programs

QRPGLESRC

*.rpgle

RPG400

ILE RPG Programs with SQL

QSQLRPGLESRC

*.sqlrpgle

RPG400

Copy source members

QCPYLESRC

*.cpyle

RPG400

CL programs

QCLSRC

*.cl, *.clp, *.cl38, *.clp38

CL400

ILE CL Programs

QCLLESRC

*.clle

CL400

Display Files

QDDSSRC

*.dspf, *.dspf38

DDS400

Printer Files

QDDSSRC

*.prtf, *.prtf38

DDS400

Logical Files

QDBSRC

*.lf, *.lf38

DB400SQL Analyzer/DDS400

Physical Files

QDBSRC

*.pf, *.pf38

DB400SQL Analyzer/DDS400


Info
The RPG Analyzer is able to autodetect RPG III versus RPG IV, so there is no difference in using *.rpg or *.rpgle. What is very important is to distinguish between Display, Printer, Logical and Physical files using the specific file extensions listed in above table.

...

Code Block
CALL       PGM(&EXTLIB/&EXTPGM)


Code Block
exec sql update vrtfilep set vrupdf = ' ' where vrupdf <> ' ';

Image Removed

Objects

CL400 

...

Image Removed

...

Image Removed

...

DataQ CL example

Code Block
/*********************************************************************/
/* QSNDDTAQ and QRCVDTAQ example for DataQ                           */
/*********************************************************************/
             PGM
             DCL VAR(&DQNAME) TYPE(*CHAR) LEN(10) VALUE('FILEINFO')
             DCL VAR(&DQLIB) TYPE(*CHAR) LEN(10) VALUE('QGPL')
             DCL VAR(&DQSNDLEN) TYPE(*DEC) LEN(5 0) VALUE(14)
             DCL VAR(&DQLEN) TYPE(*DEC) LEN(5 0)
             DCL VAR(&DQSNDDATA) TYPE(*CHAR) LEN(100)
             DCL VAR(&DQDATA) TYPE(*CHAR) LEN(100)
             DCL VAR(&DQWAIT) TYPE(*DEC) LEN(5 0) VALUE(0)
             CHGVAR VAR(&DQSNDDATA) VALUE('THIS IS A TEST')
             CALL QSNDDTAQ PARM(&DQNAME &DQLIB &DQSNDLEN &DQSNDDATA)
             CALL QRCVDTAQ PARM(&DQNAME &DQLIB &DQLEN &DQDATA &DQWAIT)
             SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA(&DQDATA)
             ENDPGM

Image Added

Image Added

Code Block
exec sql update vrtfilep set vrupdf = ' ' where vrupdf <> ' ';

Image Added

DataQ RPG example

Code Block
I              'INKOOP    '          C         DTAQ

IINKOOP      DS
I                                        1   3 CTRL
I                                        4   9 BLVNR
C           *ENTRY    PLIST
C                     PARM           PLVNR   6
C                     PARM           DTAQL  10
C                     MOVEL'BEL'     CTRL
C                     MOVELPLVNR     BLVNR
C                     CALL 'QSNDDTAQ'
C                     PARM DTAQ      PDTAQ  10
C                     PARM DTAQL     PDTAQL 10
C                     PARM 9         LEN     50
C                     PARM           INKOOP
C                     MOVE *ON       *INLR
C                     RETRN

Image Added

Code Block
d DQLib           s             10    inz('*LIBL')
d DQName          s             10    inz('CONVMAIL')
d DQLen           s              5  0 inz(512)
***********************************************************************
c     snddtq        begsr
c                   call      'QSNDDTAQ'
c                   parm                    DQName
c                   parm                    DQLib
c                   parm                    DQLen
c                   parm                    DQData
c                   endsr
***********************************************************************

Image Added

Code Block
dcl-pr QSNDDTAQ extpgm ;
  *n char(10) const ;  //Data queue name
  *n char(10) const ;  //Library
  *n packed(5) ;       //Length of data
  *n char(100) ;       //Data
end-pr ;
  
for QData.Counter = 1 to 10 ;
    QData.Field1 = %char(QData.Counter) ;
    QData.Field2 = %char(QData.Counter * 10) ;
    QData.Field3 = %char(QData.Counter * 100) ;
 
    QSNDDTAQ('TESTDTAQ':'MYLIB':LengthOfData:QData) ;
endfor ;

Image Added

Code Block
dcl-pr QSNDDTAQ extpgm ;
  *n char(10) const ;  //Data queue name
  *n char(10) const ;  //Library
  *n packed(5) ;       //Length of data
  *n char(100) ;       //Data
end-pr ;

BegSr srDTAQ;
   CALLP(e) QSNDDTAQ('TESTDTAQ':'MYLIB':LengthOfData:QData);
EndSr;

Image Added

Objects

CL400 

IconObject Name
Image Added
CL Program
Image Added
CL Project
Image Added
CL Subroutine

CL Call to Generic Program

CL EXEC SQL

Image Added

CL Data Queue Publisher

Image Added

CL Data Queue Receiver

Image Added

CL Data Unknown Queue Publisher

Image Added

CL Data Unknown Queue Receiver

DDS400

IconObject Name
DDS Project
DDS Section
DDS Printer File
DDS Display File

...

IconObject Name
RPG III Project
RPG III Program
RPG III MainSubroutine
RPG III Subroutine
RPG III File Printer
RPG III File Disk
RPG III File Workstn
RPG III File Special
RPG III File Seq
RPG III Copy Member
RPG III SQL Statement/Structure
RPG III Procedure

RPG III Call to Generic Program

RPG III EXEC SQL

RPG III Missing Copy Member

RPG III Missing Physical/Logical File

Image Removed

RPG III Missing Display File

Image Removed

RPG III Missing Printer File/Logical File

Image Added

RPG III Missing Display File

Image Added

RPG III Missing Printer File

Image Added

RPG III Data Queue Publisher

Image Added

RPG III Data Queue Receiver

Image Added

RPG III Data Unknown Queue Publisher

Image Added

RPG III Data Unknown Queue Receiver

RPG 400

IconObject Name
RPG IV Project
RPG IV Program
RPG IV MainSubroutine
RPG IV Subroutine
RPG IV File Printer
RPG IV File Disk
RPG IV File Workstn
RPG IV File Special
RPG IV File Seq
RPG IV Procedure
RPG IV Procedure Prototype
RPG IV Copy Member

RPG IV Call to Generic Program

RPG IV EXEC SQL

RPG IV Module

RPG IV Missing Copy Member

RPG IV Missing Physical/Logical File

Image Added

RPG IV Missing Display File

Image Added

RPG IV Missing Printer FileImage Removed

Image Added

RPG IV Missing Procedure

Image Added

RPG IV Data Queue Publisher

Image Added

RPG IV Data Queue Receiver

Image Added

RPG IV Missing Display FileImage RemovedData Unknown Queue Publisher

Image Added

RPG IV Missing Printer FileData Unknown Queue Receiver

Analysis messages

RPG-001

IdentifierRPG-001
MessageCannot resolve copy ...
SeverityWarning
ExplanationAnalyser could not find the source file included by a /copy statement. This can lead to various missing results.
User ActionEnsure that all required source code is packaged and delivered.

...

IdentifierRPG-004
MessageCannot resolve procedure ...
SeverityWarning
ExplanationAnalyser could not find a procedure.
User ActionEnsure that all required source code is packaged and delivered.

Structural Rules

...

and delivered.

Structural Rules

The following structural rules are provided:

...

...

...

Limitations

  • in RPG
    • dynamic calls and dynamic SQL is not supported