...
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 <> ' '; |
Objects
CL400
...
...
...
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 |
Code Block |
---|
exec sql update vrtfilep set vrupdf = ' ' where vrupdf <> ' '; |
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 |
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
*********************************************************************** |
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 ; |
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; |
Objects
CL400
Icon | Object Name |
---|---|
CL Program | |
CL Project | |
CL Subroutine | |
CL Call to Generic Program | |
CL EXEC SQL | |
CL Data Queue Publisher | |
CL Data Queue Receiver | |
CL Data Unknown Queue Publisher | |
CL Data Unknown Queue Receiver |
DDS400
Icon | Object Name |
---|---|
DDS Project | |
DDS Section | |
DDS Printer File | |
DDS Display File |
...
Icon | Object 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 | |
RPG III Missing Display File | |
RPG III Missing Printer File/Logical File | |
RPG III Missing Display File | |
RPG III Missing Printer File | |
RPG III Data Queue Publisher | |
RPG III Data Queue Receiver | |
RPG III Data Unknown Queue Publisher | |
RPG III Data Unknown Queue Receiver |
RPG 400
Icon | Object 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 | |
RPG IV Missing Display File | |
RPG IV Missing Printer File | |
RPG IV Missing Procedure | |
RPG IV Data Queue Publisher | |
RPG IV Data Queue Receiver | |
RPG IV Missing Display FileData Unknown Queue Publisher | |
RPG IV Missing Printer FileData Unknown Queue Receiver |
Analysis messages
RPG-001
Identifier | RPG-001 |
---|---|
Message | Cannot resolve copy ... |
Severity | Warning |
Explanation | Analyser could not find the source file included by a /copy statement. This can lead to various missing results. |
User Action | Ensure that all required source code is packaged and delivered. |
...
Identifier | RPG-004 |
---|---|
Message | Cannot resolve procedure ... |
Severity | Warning |
Explanation | Analyser could not find a procedure. |
User Action | Ensure that all required source code is packaged and delivered. |
Structural Rules
...
and delivered. |
Structural Rules
The following structural rules are provided:
3.1.2-funcrel | https://technologies.castsoftware.com/rules?sec=srs_rpg&ref=||3.1.2-funcrel |
---|---|
3.1.01-funcrel | https://technologies.castsoftware.com/rules?sec=srs_rpg&ref=||3.1.01-funcrel |
3.1.0-beta4funcrel | https://technologies.castsoftware.com/rules?sec=srs_rpg&ref=||3.1.0-beta4funcrel |
3.1.0-beta3beta4 | https://technologies.castsoftware.com/rules?sec=srs_rpg&ref=||3.1.0-beta3beta4 |
3.1.0-beta2beta3 | https://technologies.castsoftware.com/rules?sec=srs_rpg&ref=||3.1.0-beta2beta3 |
3.1.0-beta1 beta2 | https://technologies.castsoftware.com/rules?sec=srs_rpg&ref=||3.1.0-beta1 |
...
...
...
Limitations
- in RPG
- dynamic calls and dynamic SQL is not supported