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: 2275
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: 2275
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 Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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