Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Retreive return code(Maxcc) of job thru Rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Fri Dec 28, 2012 1:29 pm    Post subject: Retreive return code(Maxcc) of job thru Rexx
Reply with quote

Hi All ,

I have written rexx to capture JOBID JOBNAME and unable to capture JES messages .

Code:

Code:
ADDRESS TSO                                             
  X=OUTTRAP('A.')                                       
ADDRESS TSO                                             
  "SUBMIT 'TEST.SUBMIT.JCLS(TAPED)'"                   
ADDRESS TSO                                             
  X= OUTTRAP('OFF')                                     
JOBID = A.1                                             
SAY JOBID                                       
PARSE VAR JOBID 'JOB' VAR1 '(' JOBIDD ')' BRR JUNK       
DO UNTIL L2 = "ON OUTPUT QUEUE"                         
   SAY JOBIDD                                           
   X = OUTTRAP(OUT.)                                     
       ADDRESS TSO "STATUS "VAR1"("JOBIDD")"             
       PARSE VAR OUT.1 L1 ")" L2   
   X = OUTTRAP(OFF)                       
END                                       
  ADDRESS TSO "OUTPUT" VAR1"("JOBIDD")"   
EXIT 


Rexx capture the below message thru OUTTRAP:

Code:
Code:

IKJ56250I JOB  TESTX(JOB02128) SUBMITTED

JES MESSAGE is not captured ( below message):

Code:

Code:
10.39.58 JOB02128 $HASP165 TESTX ENDED AT CPAC  MAXCC=12 CN(INTERNAL)

is there any way to capturing the above message in to variable?


I am also trying from my side and refering the similar posts , if any one can help me out on this ?

Thanks
Balaji K
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Dec 28, 2012 1:34 pm    Post subject:
Reply with quote

Quote:
JES MESSAGE is not captured ( below message):

Code:

10.39.58 JOB02128 $HASP165 TESTX ENDED AT CPAC MAXCC=12 CN(INTERNAL)

is there any way to capturing the above message in to variable?


I am also trying from my side and refering the similar posts , if any one can help me out on this ?



Your REXX code can only see the JES message by reading the spool - usually by interfacing with SDSF - after the job has ended. However, submitting a job from REXX code which then waits for the job output is not recommended.

Also, you are not applying 'code' tags correctly - use the buttons shown rather than keying what you think might work.

Garry.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Dec 28, 2012 3:03 pm    Post subject:
Reply with quote

There are couple of examples on this board, already, which give the hint to accomplish what you are trying to do. Suggest you also search the REXX & CLIST part of the Forum.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Dec 28, 2012 3:10 pm    Post subject: Reply to: Retreive return code(Maxcc) of job thru Rexx
Reply with quote

Looks like the TS wants to write a home grown scheduler
and have the TSO session waiting for a job to complete

probably time to invoke the "topics not eligible for discussion" filter
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us