Posts

Showing posts from September, 2018

AS400: RPGLE - Get the job attribute and Trap Error using Monitor

This program will check if a job is active, If active it will give the status of the job. D eFlag             S              1        DQusrJobi         PR                  EXTPGM('QUSRJOBI')    DRcvVar                      32766A   options(*varsize)      DRcvVarLen                      10I 0 const                  DFormat                             8A   const                  DQualJob                          26A   const                  DInternJob                        16A   const                  D vQualjob        DS                D  Vjob                            10  D  vUser                          10  D  vjNbr                            6  Ddsjob              ds                D jobvar                   1     50  D jobStat                51     60  D JobAStat           108    111  D                     sds                D MsgId                  40     46  D ExceptData         91    170  /Free    vJob = 'RBCPTY1Q01';