IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Set return code of a step for empty file

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
View previous topic :: View next topic  
Author Message
vvmanyam



Joined: 16 Apr 2008
Posts: 37
Location: Bangalore

Posted: Wed Aug 06, 2008 7:54 pm    Post subject: Set return code of a step for empty file  

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  
expat



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Wed Aug 06, 2008 7:56 pm    Post subject:  

Take a look at this
Back to top  
Frank Yaeger



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

Posted: Wed Aug 06, 2008 11:46 pm    Post subject:  

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  
vvmanyam



Joined: 16 Apr 2008
Posts: 37
Location: Bangalore

Posted: Thu Aug 07, 2008 8:45 am    Post subject:  

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  
Frank Yaeger



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

Posted: Thu Aug 07, 2008 10:07 pm    Post subject:  

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  
superk



Joined: 26 Apr 2004
Posts: 3304
Location: Charlotte,NC USA

Posted: Thu Aug 07, 2008 11:44 pm    Post subject: Reply to: Set return code of a step for empty file  

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  
vvmanyam



Joined: 16 Apr 2008
Posts: 37
Location: Bangalore

Posted: Fri Aug 08, 2008 10:43 am    Post subject:  

Thanks a lot for the solution


Regrads,
Balu
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM