View previous topic :: View next topic
|
Author |
Message |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi,
Clist code:
Code: |
CLRCRT
WRITE WHO'S ON
WRITENR BALA ==>
STATUS C3E4TR
WRITENR DEENA ==>
STATUS C3E55R
|
Current o/p:
Code: |
BALA ==> IKJ56192I JOB C3E4TR(T0055666) ON OUTPUT QUEUE
IKJ56192I JOB C3E4TR(T0061140) ON OUTPUT QUEUE
IKJ56192I JOB C3E4TR(T0061998) ON OUTPUT QUEUE
IKJ56192I JOB C3E4TR(T0069705) ON OUTPUT QUEUE
IKJ56211I JOB C3E4TR(T0070146) EXECUTING
DEENA ==> IKJ56192I JOB C3E55R(T0064453) ON OUTPUT QUEUE
|
Expected o/p:
Code: |
BALA ==> IKJ56211I JOB C3E4TR(T0070146) EXECUTING
|
Here i want to know only the users who are all active i.e only the batch jobs in EXECUTING status. But when i use the STATUS command, it also displays the jobs which is on o/p queue.
Please share ur thoughts...
Thanks in advance
R KARTHIK |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
STATUS shows the status so if the job has finished its status will be ON OUTPUT QUEUE |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi expat,
Ya u are correct. But is there any way to display only the job currently in EXECUTING status. I dont want to display the jobs which are held in queue.
Regards
R KARTHIK |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Why CLIST? REXX is recommended.
Use OUTTRAP to capture the command response, examine the response, and SAY the ones you are interested. |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi,
I got it using the following code.
Code: |
/* REXX */
USER.0=4
USER.1="C0ER95 ANDYS "
USER.2="C0ER87 MARGUE "
USER.3="C0ER17 SHANKAR "
USER.4="C4ER86 BENDY "
"CLRCRT"
DMY=OUTTRAP("OTPTLINES.","*")
"STATUS C0ER95"
"STATUS C0ER87"
"STATUS C0ER17"
"STATUS C4ER86"
NUMLINES=OTPTLINES.0
DMY = OUTTRAP("OFF")
DO I = 1 TO NUMLINES
IF POS("EXECUTING",OTPTLINES.I) > 0 THEN DO
PARSE VAR OTPTLINES.I . "JOB " USRID "(" .
DO J = 1 TO USER.0
IF COMPARE(SUBSTR(USER.J,1,6),USRID) = 0 THEN DO
USERNAME = SUBSTR(USER.J,8,9)
LEAVE
END
ELSE
USERNAME = "USER NOT FOUND"
END
SAY USERNAME " ====> " OTPTLINES.I
END
END
|
Thanks expat and pedro...
R KARTHIK |
|
Back to top |
|
|
|