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

Set Return Code based on the value in the input file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon Nov 17, 2008 11:19 am
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: 1702
Location: Australia

PostPosted: Mon Nov 17, 2008 11:27 am
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: 2481
Location: @my desk

PostPosted: Mon Nov 17, 2008 11:33 am
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
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: 2481
Location: @my desk

PostPosted: Mon Nov 17, 2008 1:40 pm
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: 1702
Location: Australia

PostPosted: Mon Nov 17, 2008 1:44 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top