This section shows a way to dump the variables, that are set via a command call on the IBM i platform.
In this case this workflow has been setup:
As you can see the workflow only has one component, Debug headers apart from the input component.
The debug header component simply dumps all workflow variables to the system log.
In order to trigger the workflow above you can use a CL program like the one below:
PGM
DSPJOBLOG OUTPUT(*PRINT)
IFORMNG2/NG2CMD COMMAND(DUMP) FILE(QPJOBLOG) +
SPLNBR(*LAST) TOSTMF('/iformng2/tofile') +
FILE1('/apf3812home/view/kse.pdf') +
FILE2('F2') FILE3(F3) FILE4(F4) FILE5(F5) +
FILE6(F6) FILE7(F7) FILE8(F8) FILE9(F9) +
FILE10(F10) PARM1('P01') PARM2('P02') +
PARM3('P03') PARM4('P04') PARM5('P05') +
PARM6('P06') PARM7('P07') PARM8('P08') +
PARM9('P09') PARM10('P10') PARM11('P11') +
PARM12('P12') PARM13('P13') PARM14('P14') +
PARM15('P15') PARM16('P16') PARM17('P17') +
PARM18('P18') PARM19('P19') PARM20('P20') +
PARM21('P21') PARM22('P22') PARM23('P23') +
PARM24('P24') PARM25('P25') PARM26('P26') +
PARM27('P27') PARM28('P28') PARM29('P29') +
PARM30('P30') ATTACHNAME(ATTACHMENTNAME) +
COPIES(127) MAILSERVER(GMAIL) +
SUBJECT('test subject') +
MAILFROM(EMAILFROM) MAILTO(EMAILTO) +
MAILCC(EMAILCC) MAILBCC(EMAILBCC) +
MAILTEMPL(EMAILTEMPLATE) PRINTER(PRINTER) +
OUTFILE(FILENAME) DIR(DIRECTORY) +
TEMPLATE(TEMPLATE.IFT) INFILE(INPUTFILE) +
CONFLICT(CONFLICT) LOGINFO(LOGINFOKEY)
ENDPGM
The program creates a joblog spooled file and calls the DUMP workflow as shown above.
After you have run this command, you can now see each of the variables and the values in the system log.
You can also see the mapping between the paramters of the NG2CMD command the workflow variables in this section.