Utility for IBM i (AS/400) that allows calling programs with a gui (DSPF).
- View and modify program parameters and pass values via green screen
- View the state of passed parameters after the call to the desired program
- Easy to use, only one line needs to be added to source code of the called program
- add control option to the called pgm:
RPG:ctl-opt pgminfo(*pcml:*module)
COBOL:PROCESS PGMINFO(PCML MODULE)
- compile the called program
- add the utility library to the Library List
- in command line, enter command SIMGEN and press F4 (prompt)
- add source files in src folder to your preferred lib/srcfile (with the same member name)
- compile CLLE member SGINTALL
- SGINTALL accepts three (optional) params:
a) srclib - lib of SIMGEN source file, defaults to PSIMGEN
b) srcfile - srcfile of SIMGEN members, defaults to SIMGENSRC
c) dstlib - destination of compiled objects, defaults to srclib
for quick installation, create a lib called PSIMGEN and source file SIMGENSRC with rcdlen 112.
place the source members in SIMGENSRC, compile and run SGINSTALL without any params (CALL PSIMGEN/SGINSTALL).
to install manually, run commands in order:
Click to expand
```
CRTPF FILE(MYLIB/F_SIMGEN) SRCFILE(MYLIB/MYSRCPF) SRCMBR(F_SIMGEN)
CRTDSPF FILE(MYLIB/D_SIMGEN) SRCFILE(MYLIB/MYSRCPF) SRCMBR(D_SIMGEN)
CRTSQLRPGI OBJ(MYLIB/SGMAIN) SRCFILE(MYLIB/MYSRCPF) SRCMBR(SGMAIN) OBJTYPE(*PGM)
CRTSQLRPGI OBJ(MYLIB/SGPARSE) SRCFILE(MYLIB/MYSRCPF) SRCMBR(SGPARSE) OBJTYPE(*PGM)
CRTSQLRPGI OBJ(MYLIB/SGSCREEN) SRCFILE(MYLIB/MYSRCPF) SRCMBR(SGSCREEN) OBJTYPE(*PGM)
CRTSQLRPGI OBJ(MYLIB/SGUTILS) SRCFILE(MYLIB/MYSRCPF) SRCMBR(SGUTILS) OBJTYPE(*MODULE)
CRTSRVPGM SRVPGM(MYLIB/SGUTILS) EXPORT(*ALL)
CRTSQLRPGI OBJ(MYLIB/SGINVOKE) SRCFILE(MYLIB/MYSRCPF) SRCMBR(SGINVOKE) OBJTYPE(*MODULE)
CRTPGM PGM(MYLIB/SGINVOKE) BNDSRVPGM((SGUTILS))
CRTCMD CMD(MYLIB/SIMGEN) PGM(MYLIB/SGMAIN) SRCFILE(MYLIB/MYSRCPF) SRCMBR(SIMGEN)
```
The main program (SGMAIN) accepts two parameters, pgm_info(name + lib) and pcml_file_path.
pcml_file_path is optional.
If only pgm_info was passed, both the program that will be called and its params definition will be based on this arg.
If pcml_file_path was passed, the program parameters definition will be based on this arg.
Passing both params allows flexibility when trying to call programs that don't have the pgminfo embedded in the module.
It also enables calling wrapper programs that don't have the definition of all the parameters
(e.g. calling a wrapper CLLE program which accepts a char(1000) whose DS structure is defined in the inner RPGLE)
- add support for service programs (currently only programs are supported)