RPG, RPGLE, RPG 400

BluInsights 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…).

CALL

The CALL statement implies a dependency on a CL or an RPG file.

  • CALL PROGRAM in .RPG and .RPGLE files
  • CALL(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.

CALLB

The CALLB statement implies a dependency on a CL or an RPG file.

  • CALLB PROGRAM in .RPG and .RPGLE files
  • CALLB(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.

CALLP

The CALLP statement implies a dependency on a CL or an RPG file.

  • CALLP PROCEDURE in .RPG and .RPGLE files
  • CALLP(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 :

  • Global : P PROCEDURE B EXPORT
  • Local : P PROCEDURE B
COPY
  • COPY FILE
  • COPY LIBRARY,FILE

Where LIBRARY is the name of a library and FILE is the name of a file in the project.

DTAARA

The call on FORMAT implies a dependency on a file that is not an RPG (PF, LF, RPGLE, PRTF…) nor a Mainframe file.

  • DTAARA DEFINE DATAOBJECT
  • DTAARA DEFN DATAOBJECT

Where DATAOBJECT is the name of a file in the project.

EXTNAME

The call on EXTNAME implies a dependency on any other file.

  • EXTNAME(filename)

Where filename is the name of a file in the project.

FORMAT

The 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.

FREE

Freeform sections are part of RPG source code starting with /free and ending with /end-free

To determine dependencies to program, procedure or ddsFile in these sections, we are looking for usage of previously defined variables or alias like :

  • Dvariable Pr ExtPgm('program')
  • Dvariable Pr ExtProc('procedure')
  • Fvariable E DISK Rename(ddsFile:alias)
INCLUDE
    • INCLUDE FILE
  • INCLUDE LIBRARY,FILE

Where LIBRARY is the name of a library andFILE is the name of a file in the project.

JFILE

The call on JFILE implies a dependency on a PRTF, PRT, LF, PF or DDS file.

  • JFILE(ddsFile)

Where ddsFile is the name of a file in the project.

PFILE

The call on PFILE implies a dependency on a PRTF, PRT, LF, PF or DDS file.

  • PFILE(ddsFile)

Where ddsFile is the name of a file in the project.

REF

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.