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 of a step for empty file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Set return code of a step for empty file
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: 8593
Location: Back in jolly old England

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

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

DFSORT Moderator


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

PostPosted: Wed Aug 06, 2008 11:46 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Thu Aug 07, 2008 10:07 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Aug 07, 2008 11:44 pm    Post subject: Reply to: Set return code of a step for empty file
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL 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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 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