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
 

 

Writing one step's RC Value to a member

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
silentarya

New User


Joined: 11 Mar 2007
Posts: 35
Location: Chennai

PostPosted: Thu Dec 06, 2007 3:37 pm    Post subject: Writing one step's RC Value to a member
Reply with quote

In JCL I want to write one step's rc value to a member?

The code that i used is as follows ...
Code:

//STEP2 EXEC PGM=IDCAMS                       
//PS1 DD DSN=NRDP301.MAIN.TESTPS,             
//       DISP=(,CATLG,DELETE),             
//       SPACE=(TRK,(10,10),RLSE),           
//       UNIT=SYSDA,                         
//       DCB=(RECFM=VB,LRECL=80,BLKSIZE=800) 
//SYSPRINT DD SYSOUT=*                       
//SYSOUT DD SYSOUT=*                         
//SYSIN DD *                                 
/*                                           


Do we have any method by which we can write the value of one step's RC to a member?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Dec 06, 2007 4:32 pm    Post subject: Reply to: Writing one step's RC Value to a member
Reply with quote

I see only two options:

1. Write the SYSPRINT output to a dataset, then in the next step read that dataset and look for the MAXCC message.

2. Read the JES control blocks (JSCB) and retrieve the return-code value from there. Here's a previous topic on that subject:

http://ibmmainframes.com/viewtopic.php?t=3904
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 4:42 pm    Post subject:
Reply with quote

Write the SYSPRINT output to a dataset, then in the next step read that dataset and look for the MAXCC message.

How to write MAXCC to SYSPRINT dataset, ie, COBOL or PL/1 programs?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Dec 06, 2007 4:52 pm    Post subject:
Reply with quote

You can use SDSF batch commands to read the job's details. It could be done through REXX.

Optionally, use this ready-made REXX, which reads the MVS data areas.

O.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 4:56 pm    Post subject:
Reply with quote

Thanks,

I conclude we have to use REXX anyway.

Correct me if I am wrong.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Thu Dec 06, 2007 5:11 pm    Post subject:
Reply with quote

Quote:
I conclude we have to use REXX anyway.

Why hurry to conclude.. and also OP has not answered yet..
You can do the same thing with cobol..
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Thu Dec 06, 2007 5:15 pm    Post subject:
Reply with quote

Sorry Abhijit Kshirsagar.

Quote:
You can do the same thing with cobol..


Could you please explain in detail?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Thu Dec 06, 2007 6:37 pm    Post subject:
Reply with quote

Quote:
Write the SYSPRINT output to a dataset, then in the next step read that dataset and look for the MAXCC message


This dataset can be opened in COBOL program and you can find the return code from that.. same thing you can do in any other language.. however REXX has strong support so for such kind of requirement so REXX will be a quicker solution.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm


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