AWS Blu Insights supports RPG (Report Programming Generator) dependencies analysis in the mainframe group. It detects dependencies among programs (e.g. RPG, RPGLE) as well as other file types (e.g. CL, PF, LF…).
The CALL statement implies a dependency on a CL or an RPG file.
CALL PROGRAM in .RPG and .RPGLE filesCALL(EXTENDERS) PROGRAM in .RPG and .RPGLE files. There can be one or several extenders among A, H, N, P, D, T, Z, M, R, E.Where PROGRAM can be a raw string or a variable declared in the same file with EXTPGM or EXTPROC.
The CALLB statement implies a dependency on a CL or an RPG file.
CALLB PROGRAM in .RPG and .RPGLE filesCALLB(EXTENDERS) PROGRAM in .RPG and .RPGLE files. There can be one or several extenders among A, H, N, P, D, T, Z, M, R, E.Where PROGRAM can be a raw string or a variable declared in the same file with EXTPGM or EXTPROC.
The CALLP statement implies a dependency on a CL or an RPG file.
CALLP PROCEDURE in ‘.RPG’ and ‘.RPGLE’ filesCALLP(EXTENDERS) PROCEDURE in ‘.RPG’ and ‘.RPGLE’ files. There can be one or several extenders among A, H, N, P, D, T, Z, M, R, E.Where PROCEDURE can be a raw string or a variable declared in the same file with EXTPGM or EXTPROC.
Procedures can be declared in RPG files :
P PROCEDURE B EXPORTP PROCEDURE BThe EXTPGM statement defines a variable but also implies a dependency on the EXTPGM part
D myVar PR EXTPGM(PROGRAM)
Where myVar is the name of the declared variable and PROGRAM is the name of a file in the project
COPY FILECOPY LIBRARY,FILEWhere LIBRARY is the name of a library and FILE is the name of a file in the project.
INCLUDE FILEINCLUDE LIBRARY,FILEWhere LIBRARY is the name of a library and FILE is the name of a file in the project.
The call on CHKMSGID or MSGID in a DSPF file implies a dependency on a .MSGF file.
CHKMSGID(ERR0001 MESSAGEFILE)CHKMSGID(ERR0001 LIB/MESSAGEFILE)MSGID(ERR0001 MESSAGEFILE)MSGID(ERR0001 LIB/MESSAGEFILE)Where MESSAGEFILE is the name of a MSGF file in the project.
The call on DTAARA implies a definition of a Data Area object.
DTAARA(DATAOBJECT)DTAARA('DATAOBJECT')DTAARA("DATAOBJECT")DTAARA(path/to/DATAOBJECT)DTAARA DEFINE DATAOBJECTDTAARA DEFN DATAOBJECTWhere DATAOBJECT is the name of the defined object.
The call on EXTNAME implies a dependency on any other file.
EXTNAME(filename)Where filename is the name of a file in the project.
Ffilename (C|I|O|U)Where filename is the name of a file in the project.
The call on FLINE can implied a dependency on a PRTF, PRT, LF or PF file if the file definitions are not included in the RPG program by I/O lines
Ifilename are for input files defined with a C, I and U flagOfilename are for output files defined with a C and O flagThe call on FORMAT implies a dependency on a PRTF, PRT, LF or PF file.
FORMAT(ddsFile)Where ddsFile is the name of a file in the project.
The call on HLPPNLGRP implies a dependency on a PNLGRP file.
HLPPNLGRP('DETAIL' pnlgrpFile)HLPPNLGRP("DETAIL" pnlgrpFile)HLPPNLGRP('DETAIL' path/to/pnlgrpFile)HLPPNLGRP(TITLE pnlgrpFile) with TITLE a variable containing the title of the panel.Where pnlgrpFile is the name of a file in the project.
The call on HLPRCD implies a dependency on a record file.
HLPRCD('DETAIL' recordFile)HLPRCD("DETAIL" recordFile)HLPRCD('DETAIL' path/to/recordFile)HLPRCD(TITLE recordFile) with TITLE a variable containing the title of the panel.Where recordFile is the name of a file in the project.
The call on JFILE or PFILE implies a dependency on a PRTF, PRT, LF, PF ,DDS file, SQL table or SQL view.
JFILE(ddsFile)JFILE(*LIBL/ddsFile)JFILE(*CURLIB/ddsFile)JFILE(LIBNAME/ddsFile)PFILE(ddsFile)PFILE(*LIBL/ddsFile)PFILE(*CURLIB/ddsFile)PFILE(LIBNAME/ddsFile)JFILE(ddsFile1 ddsFile2 ...)JFILE(path1 path2 ...)PFILE(ddsFile1 ddsFile2 ...)PFILE(path1 path2 ...)Where ddsFile is the name of a file in the project. *LIBL – Search for the target file name in all libraries and establish the dependency with all matches *CURLIB – Search for the target file name from the root of the source file path and dependency link will be formed for the matched target LIBNAME – Search for the folder named LIBNAME from the root of the source file path and get the list of matched target files
In case, LIBNAME is not found during the analysis, then Missing library node is create with library name
It’s possible to have several arguments in the JFILE or PFILE statement separated by space. path1 and path2 refers to any combination of the library path.
Example: PFILE(*CURLIB/ddsFile1 LIBNAME/ddsFile2) PFILE(LIBNAME1/ddsFile1 LIBNAME2/ddsFile2 LIBNAME3/ddsFile3)
The call on REF implies a dependency on a PRTF, PRT, LF or PF file.
REF(ddsFile)Where ddsFile is the name of a file in the project.
The call on REFFLD implies a dependency on a PRTF, LF, PF or DDS file.
REFFLD([recName/]refName [libName/]ddsFile)Where ddsFile is the name of a file in the project, refName is mandatory and doesn’t apply any dependency, recNameand libName are optional and doesn’t apply any dependency.
The call on E DS implies a dependency on a PRTF, LF, PF or DDS file.
Ifilename E DSddsFileWhere ddsFile is the name of a file in the project and filename doesn’t apply any dependency.
A physical file named filename.pf will be linked to a file named prefix.filename.qdds if it exists
A logical file named filename.lf will be linked to a file named prefix.filename.qddsi if it exists
In RPG, it is possible to store entities name in constant and use it in any type of dependency
D CONST_NAME C CONST('PROG_TO_CALL')
This constant named CONST_NAME can be used to call PROG_TO_CALL
I 'PROG_TO_CALL' C CONST_NAME
This constant named CONST_NAME can be used to call PROG_TO_CALL
Variable definitions can be reassigned with the EVAL statement as:
C EVAL MY_VAR = 'PROG_TO_CALL'
This new value of MY_VAR can be used to call PROG_TO_CALL
In RPG computation lines (C) a SQL query starts with Exec SQL and ends with End-Exec. All lines starting with + is a continuation. 00000C/Exec SQL Update USER 00000C+ Set LAST-NAME = "DOE" 00000C+ Where NAME = "JANE" 00000C/End-Exec
Refer to dependencies in SQL file documentation for further information
There are three ways to write Freeform statements in RPG
/free and /end-free markers to surround several Freeform statements**free to have a full Freeform source fileCOPY and INCLUDE statements have the same behavior as in traditional RPG
Usage of dcl-pr implies a dependency on any other file.
dcl-pr external-programdcl-pr prototype-name EXTNAME('external-program')Where external-program is the name of a file in the project.
Usage of dcl-f implies a dependency on a PRTF, LF, PF or DDS file.
dcl-f dds-filedcl-f printer-file printerWhere dds-file is the name of a LF, PF or DDS file in the project, and printer-file is the name of a PRTF file in the project.
Usage of dcl-ds statement implies a dependency on a LF, PF or DDS file.
dcl-ds dds-file EXTdcl-ds local-alias extname('dds-file')Where dds-file is the name of a LF, PF or DDS file in the project.
Usage of dcl-proc statement implies a dependency on a procedure declared internal or external (global).
dcl-proc procedure-namedcl-proc procedure-name exportWhere export clause refers to the procedure declared external as a global scope.
Calling the procedure (internal or external) in free form is differs from the traditional RPG
procedure_name();procedure_name(some_data);procedure_name either defined in the traditional or free from statement. Refer to procedure declaration statement.
In a Free Form section, a SQL query starts with Exec SQL and ends with ;. /Free Exec SQL Update USER Set LAST-NAME = "DOE" Where NAME = "JANE"; /End-Free
Refer to dependencies in SQL file documentation for further information