Difference between revisions of "Job In Msg Wait"
From MidrangeWiki
DaveLClarkI (talk | contribs) (→References) |
DaveLClarkI (talk | contribs) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:RPG Examples]] | ||
[[Category:Sample Code]] | [[Category:Sample Code]] | ||
[[Category:Service Procedures]] | [[Category:Service Procedures]] | ||
Line 4: | Line 5: | ||
== Summary == | == Summary == | ||
The following are the RPG/LE fully free-form definitions and instructions needed for using the {{AN}} service procedure. This service procedure simply allows the caller to determine if a particular job is in a message wait on the system—or not. | The following are the RPG/LE fully free-form definitions and instructions needed for using the {{AN}} service procedure. This service procedure simply allows the caller to determine if a particular job is in a message wait on the system—or not. | ||
+ | |||
+ | By [[User:DaveLClarkI|Dave Clark]] | ||
== Service Prototype == | == Service Prototype == |
Latest revision as of 19:55, 26 December 2018
Summary
The following are the RPG/LE fully free-form definitions and instructions needed for using the Job In Msg Wait service procedure. This service procedure simply allows the caller to determine if a particular job is in a message wait on the system—or not.
By Dave Clark
Service Prototype
Place the following in a separate copybook for inclusion in both the caller and the service program source members.
**free //****************************************************************************** // Determines if a specified job name is in a message wait status on the // system. Optionally, returns all job information. //****************************************************************************** dcl-pr GenUtl_JobInMsgWait ind; pJobName char(26); pJobInfo likeds(QUSI020000) options(*nopass); end-pr;
Service Procedure
Place the following in a service program source member.
**free ctl-opt NoMain AlwNull(*UsrCtl) Debug Option(*SrcStmt:*NoDebugIo) DatFmt(*ISO) TimFmt(*ISO); //****************************************************************************** // Determines if a specified job name is in a message wait status on the // system. Optionally, returns all job information. //****************************************************************************** dcl-proc GenUtl_JobInMsgWait export; dcl-pi *n ind; pJobName char(26); pJobInfo likeds(QUSI020000) options(*nopass); end-pi; callp IBMAPI_RtvJobInfo( QUSI020000: %len(QUSI020000): 'JOBI0200' : pJobName: *blank: ApiErrC ); if ApiErrC.BytAvail > *zero; // if an error occurred %subst(pJobName:1:20) = '*ERROR ' + ApiErrC.MsgId; return *on; // indicate an error endif; if %parms() > %parmnum(pJobName); // if job information requested pJobInfo = QUSI020000; // pass it back endif; return (QUSAJS = 'MSGW'); // indicate msg wait status end-proc;