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
 

 

Set Return Code based on the value in the input file

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

New User


Joined: 22 Jan 2008
Posts: 4
Location: India

PostPosted: Mon Nov 17, 2008 11:17 am    Post subject: Set Return Code based on the value in the input file
Reply with quote

Hi,

I have a situation where i want to set the return based on the value in the input file.

Say suppose in INPUT file value is 'Y' i want to set it to Zero if it's 'N' set to '4'
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Nov 17, 2008 11:19 am    Post subject:
Reply with quote

Hello,

Do you have File-Aid installed?

Which sort do you have installed?

Are there other utilities your shop prefers used?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Nov 17, 2008 11:27 am    Post subject:
Reply with quote

Hi,

are they the only 2 possible values in the file, and what col are they in ?


Gerry
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Mon Nov 17, 2008 11:33 am    Post subject:
Reply with quote

Hi,

Is there only a single record in your input file?
Back to top
View user's profile Send private message
Nites300

New User


Joined: 22 Jan 2008
Posts: 4
Location: India

PostPosted: Mon Nov 17, 2008 1:15 pm    Post subject:
Reply with quote

yes there will be single record in file on that basis i want to set the return code
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Mon Nov 17, 2008 1:40 pm    Post subject:
Reply with quote

Quote:
are they the only 2 possible values in the file
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Nov 17, 2008 1:44 pm    Post subject:
Reply with quote

Hi,

if you have DFSORT, you can try this, if it equals Y it will return a zero else it will return a 4

Code:
//STEP1    EXEC PGM=SORT                           
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD *                                     
Y                                                 
/*                                                 
//SORTOUT  DD DUMMY                                 
//SYSIN    DD *                                     
   OPTION COPY,NULLOUT=RC4                         
   INCLUDE COND=(1,1,CH,EQ,C'Y')                   



Gerry
Back to top
View user's profile Send private message
Nites300

New User


Joined: 22 Jan 2008
Posts: 4
Location: India

PostPosted: Mon Nov 17, 2008 2:11 pm    Post subject:
Reply with quote

thanks a lot.this worked
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
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 Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am


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