|
> > Does anyone know of an equivalent CL command to the S/36 OCL Statement: > > // IF ACTIVE-PROGNAME > If you mean you want to check the status of a job, and you know the job name/number, you could use the QUSRJOBI parameter. Putting into a procedure would be a good idea, an example is shown below. Hope this helps. Chris Jewell mailto://jewellcj@jewellconsult.com ***************************************************************** * * GN0_GetJobInfo : Get information for job : MS_GN0 * * Input: Job Name/User/Number (or '*' in name to indicate 'retrieve current') * Input/Output : Job Name, User, Number * Output : Job Running Interactively? * Job Status : ACTIVE, JOBQ, OUTQ , NOEXST * *---------------------------------------------------------------- PGN0_GetJobInfo B EXPORT * D PI D P#JobName 10A * = current D P#JobUser 10A D P#JobNumber 6A D P##JobInter LIKE(*IN01) Interactive? D P#JobStatus 10A *ACTIVE/*JOBQ/*OUTQ * *ERROR D resultDS DS D rtnlen 5B 0 D rtnavl 5B 0 D rtnjob 10A D rtnuser 10A D rtnnum 6A D rtnint 16A D rtnstatus 10A D rtntype 1A * D o#Resultlen S 5B 0 * D o#job S 26A * * processing * * C If P#JobName = '*' C Eval P#JobNumber = *Blanks C Eval P#JobUser = *Blanks C EndIf * * Form fully qualified job id C Eval o#job = P#JobName + P#JobUser + P#JobNumber * * following gets the status of the job C Call 'QUSRJOBI' 6060 C resultDS Parm o#Result 61 C Parm 61 o#ResultLen C Parm 'JOBI0100' o#jobid 8 C Parm o#job C Parm o#jobint 16 * C If *IN60 = *ON C Eval P#JobStatus = '*ERROR' C Else * C Eval P#JobNumber = rtnnum C Eval P#JobUser = rtnuser C Eval P#JobName = rtnjob C Eval P#JobStatus = rtnstatus C Eval P##JobInter = (rtntype = 'I') * C EndIf *IN60 * C Return * PGN0_GetJobInfo E * ***************************************************************** +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.