Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to set RC=04 for empty input file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
suyerasi

New User


Joined: 05 Apr 2007
Posts: 38
Location: india

PostPosted: Sat Apr 25, 2009 1:37 am    Post subject: How to set RC=04 for empty input file
Reply with quote

Input file looks like this with lrecl=996 & recfm=VB
Code:
FDXDB01 EXAM0011.718.FIMAT.


Below are the Control cards
Code:

//SORTIN    DD DSN=INPUDT.DSN
//SORTOUT   DD DSN=OUTPUT.DSN
//             DISP=(,CATLG),DCB=(LRECL=80,BLKSIZE=0,RECFM=FB),
//SYSIN DD *
  OPTION COPY
  INCLUDE COND=(13,4,CH,NE,C'INIT')
  INREC PARSE=(%01=(ABSPOS=5,ENDBEFR=X'05',FIXLEN=16),
       %02=(ENDBEFR=X'05',FIXLEN=09),
       %03=(ENDBEFR=X'05',FIXLEN=27)),
    BUILD=(1,4,
        5:%02,
       14:%03,
       84:X)
  SORT FIELDS=(5,9,CH,A)
/*


Would like to execute the next step based on RC from the above step ?
Set RC=04 if input is empty , OR
Set RC=00 if input is not Empty

Would like to know where can i include the following statement
in the above control card ?
COUNT FROM(Input) EMPTY
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: Sat Apr 25, 2009 2:14 am    Post subject:
Reply with quote

Assuming you mean "if output is empty", you can use the NULLOUT=RC4 option, e.g.

Code:

   OPTION COPY,NULLOUT=RC4


COUNT is an ICETOOL operator, so you would need to use it with a PGM=ICETOOL job, not with a PGM=SORT job.
Back to top
View user's profile Send private message
suyerasi

New User


Joined: 05 Apr 2007
Posts: 38
Location: india

PostPosted: Sat Apr 25, 2009 2:35 am    Post subject: Reply to: How to set RC=04 for empty input file
Reply with quote

Dear Frank,

Thanks for your quick response . But it doesnt seem to be working the way we wanted.

After including the statement "OPTION COPY,NULLOUT=RC4 " , It gives RC=0.
[/code]
Code:

OPTION COPY,NULLOUT=RC4
INCLUDE COND=(13,4,CH,NE,C'INIT')
INREC PARSE=(%01=(ABSPOS=5,ENDBEFR=X'05',FIXLEN=16),
       %02=(ENDBEFR=X'05',FIXLEN=09),
       %03=(ENDBEFR=X'05',FIXLEN=27)),
    BUILD=(1,4,
        5:%02,
       14:%03,
       84:X)
 SORT FIELDS=(5,9,CH,A)
 OUTFIL VTOF,BUILD=(5,80)

Please let me know if i am missing something

Thanks
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: Sat Apr 25, 2009 2:42 am    Post subject:
Reply with quote

Hello,

Post the messages presented when the step was executed - include the messsage ids.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Sat Apr 25, 2009 2:59 am    Post subject:
Reply with quote

5 will get you ten
he ran SORT instead of ICETOOL
Back to top
View user's profile Send private message
suyerasi

New User


Joined: 05 Apr 2007
Posts: 38
Location: india

PostPosted: Sat Apr 25, 2009 3:08 am    Post subject: Reply to: How to set RC=04 for empty input file
Reply with quote

Dick,

These are the messages i got by using SORT
Code:
ICE201I F RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE150I 0 VLSHRT NOT USED FOR SORT, MERGE, INCLUDE, OMIT OR SUM STATEMENT FIELDS
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K90013 E9-K90013 C9-BASE   E5-K35433
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 ABIASY1T.BIATRP50.        , INPUT LRECL = 1000, BLKSIZE = 27998, TYPE
ICE093I 0 MAIN STORAGE = (MAX,8388608,8388608)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (8331248,8331248)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,
ICE128I 0 OPTIONS: SIZE=8388608,MAXLIM=1310720,MINLIM=450560,EQUALS=N,LIST=Y,ERE
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=N,WRKREL=N,OUTREL=Y,CKPT=
ICE131I 0 OPTIONS: TMAXLIM=8388608,ARESALL=0,ARESINV=0,OVERRGN=16384,CINV=Y,CFW=
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE    ,EXITC
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=16  ,ODMAXBF=2097152,SOLRF=Y,VLLONG=N
ICE235I 0 OPTIONS: NULLOUT=RC4
ICE084I 0 EXCP ACCESS METHOD USED FOR SORTIN
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 22528, ABOVE 16M = 2120704
ICE210I 0 SORTOUT  : EXCP USED, LRECL = 80, BLKSIZE = 27920, TYPE = FB
ICE751I 1 EF-K10929 CB-K90013 F0-K30362 E8-K90013
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 0, OUT: 0
ICE227I 0 SORTOUT  : DELETED = 0, REPORT = 0, DATA = 0
ICE228I 0 SORTOUT  : TOTAL IN = 0, TOTAL OUT = 0
ICE174I 0 NO DATA RECORDS FOR AN OUTFIL DATA SET - RC=0
ICE052I 0 END OF DFSORT
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: Sat Apr 25, 2009 4:06 am    Post subject:
Reply with quote

suyerasi,

Sigh. You changed your control statements between your first post, my post and your new post. First you didn't have an OUTFIL statement, now you do. Without the OUTFIL statement, NULLOUT=RC4 is the correct parameter to use. With the OUTFIL statement, you have to use NULLOFL=RC4 on the OUTFIL statement instead of NULLOUT=RC4. So the control statements should be:

Code:

  OPTION COPY                                                 
  INCLUDE COND=(13,4,CH,NE,C'INIT')                           
  INREC PARSE=(%01=(ABSPOS=5,ENDBEFR=X'05',FIXLEN=16),       
         %02=(ENDBEFR=X'05',FIXLEN=09),                       
         %03=(ENDBEFR=X'05',FIXLEN=27)),                     
      BUILD=(1,4,                                             
          5:%02,                                             
         14:%03,                                             
         84:X)                                               
   SORT FIELDS=(5,9,CH,A)                                     
   OUTFIL VTOF,BUILD=(5,80),NULLOFL=RC4                       
Back to top
View user's profile Send private message
suyerasi

New User


Joined: 05 Apr 2007
Posts: 38
Location: india

PostPosted: Sat Apr 25, 2009 5:05 am    Post subject: Reply to: How to set RC=04 for empty input file
Reply with quote

Frank,

I am sorry you are correct. While copying the control card i missed the last statement. Again thanks for your reply.


Regards
Suyerasi
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 Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us