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

Set return code of a step for empty file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Wed Aug 06, 2008 7:54 pm
Reply with quote

Hi friends,
I have an input file.
If it is empty I want the return code of sort step to be any no.
This can be achieved by
using COUNT fuction in icetool
But using Count I am able to set only 0,4,8 or 12
But for other return codes such as 3,5,6 etc i am not able to get with count.
How can this be achieved using Sort?
Please help me..

Thanks,
Balu
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Aug 06, 2008 7:56 pm
Reply with quote

Take a look at this
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Aug 06, 2008 11:46 pm
Reply with quote

Quote:
But using Count I am able to set only 0,4,8 or 12
But for other return codes such as 3,5,6 etc i am not able to get with count. How can this be achieved using Sort?


Actually, with COUNT you can only get return codes of 0, 4 or 12 (not 8).
DFSORT does not return any other return codes with COUNT.
You'll need to find another way to do it.

expat,

The link you gave did NOT answer the question of how to get other return codes.
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Thu Aug 07, 2008 8:45 am
Reply with quote

Thanks for your information
Is there any other way in DFSORT itself to get any other return codes
My actual requrement is
I have a sample dataset with only one line init


Code:

Return Code: 02

Now return code of the step should be '02' i.e the 2 digit no in 14th column.
Depending on this return code I have 10 other steps to run, one step for each return code
if RC is 2 step 100
if RC is 3 step 200
if RC is 4 step 300
like this....
Hope I am clear
Can this be achived in a JCL

Thanks,
Balu
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Aug 07, 2008 10:07 pm
Reply with quote

Quote:
Is there any other way in DFSORT itself to get any other return codes


No.

Quote:
Can this be achived in a JCL


I don't know. Perhaps somebody else can help you with a non-DFSORT solution.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Aug 07, 2008 11:44 pm
Reply with quote

Seems to me like a simple DFSORT/IDCAMS solution would work:

Code:

//STEP1    EXEC PGM=ICEMAN
//SORTIN   DD   *
Return Code: 02
/*
//SORTOUT  DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO
//SYSOUT   DD   SYSOUT=*
//SYSIN    DD   *
  OPTION COPY
  INREC FIELDS=(1:C'  SET MAXCC=',14,2)
/*
//*
//STEP2    EXEC PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD   DSN=&&T1,DISP=(OLD,DELETE)
Back to top
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Aug 08, 2008 10:43 am
Reply with quote

Thanks a lot for the solution


Regrads,
Balu
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top