IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reg: Clist STATUS command...


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Apr 02, 2009 12:52 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 02, 2009 3:19 pm
Reply with quote

STATUS shows the status so if the job has finished its status will be ON OUTPUT QUEUE
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Apr 02, 2009 4:23 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Apr 03, 2009 12:24 am
Reply with quote

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
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Fri Apr 03, 2009 1:58 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Job completes in JES, but the status ... IBM Tools 1
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top