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

update trailer count at specific position and date


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

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Wed Mar 17, 2010 11:57 pm
Reply with quote

Kolusu ,

I agree with the remark. This also points that while getting solution to the requirement i also wish to learn various situation's.I know there are many handbooks present on platform.But some one well said

A single conversation with a wise man is better than ten years of study

I know that you guys are having excellent command over this utility and becuse of this people need support everytime from all of you .

I will test the code and lt you know the outcome

Warm regards
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Thu Mar 25, 2010 7:42 pm
Reply with quote

Kolusu,

In case input file is empty Trailer record get truncated.i.e

Code:
'FOOTER|SERVICENAME|PEGA|NUMBEROFPROCESSEDRECORDS|


Please suggest
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Mar 25, 2010 9:33 pm
Reply with quote

shr_amar wrote:
Kolusu,

In case input file is empty Trailer record get truncated.i.e

Code:
'FOOTER|SERVICENAME|PEGA|NUMBEROFPROCESSEDRECORDS|


Please suggest


It is NOT truncating. Since there are no data records we are not building any thing and since you wanted to squeeze and do other things we had to build the values on the data records and when your input is empty you get only the hard coded part of the trailer. You need to check for empty file and then check the return code and set the trailer accordingly
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Fri Mar 26, 2010 12:54 am
Reply with quote

Kolusu,

Can you suggest me the code changes ?

Rgrds
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Mar 26, 2010 1:46 am
Reply with quote

shr_amar wrote:
Kolusu,

Can you suggest me the code changes ?

Rgrds


*sigh*

Code:

//******************************************************************
//* SET A RC=4 IF THE INPUT FILE IS EMPTY                          *
//******************************************************************
//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=&&VB,DISP=SHR                                     
//SORTOUT  DD DUMMY                                                 
//SYSIN    DD *                                                     
  OPTION COPY,STOPAFT=1,NULLOUT=RC4                                 
//*                                                                 
//******************************************************************
//* EXECUETE THIS STEP ONLY WHEN INPUT FILE IS EMPTY               *
//******************************************************************
//STEP0200 EXEC PGM=SORT,COND=(0,EQ,STEP0100)                       
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=&&VB,DISP=SHR                                     
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  OPTION COPY                                                       
  OUTFIL VTOF,REMOVECC,BUILD=(5,126),                               
  TRAILER1=('FOOTER|SERVICENAME|PEGA|NUMBEROFPROCESSEDRECORDS|',     
            '0|EXTRACTRETURNCODE|0|EXTRACTDATE|',DATENS=(4MD))       
//*                                                                 
//******************************************************************
//* EXECUETE THIS STEP ONLY WHEN INPUT FILE IS NOT EMPTY           *
//******************************************************************
//STEP0300 EXEC PGM=SORT,COND=(4,EQ,STEP0100)                       
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DSN=&&VB,DISP=SHR                                     
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  OMIT COND=(5,8,CH,EQ,C'|||||||')                                   
  OPTION COPY,VLSCMP                                                 
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,SEQNUM,9,ZD,                   
               C'|EXTRACTRETURNCODE|0|EXTRACTDATE|',DATE1,5)),       
  IFTHEN=(WHEN=INIT,OVERLAY=(5:5,9,ZD,M10,LENGTH=9)),               
  IFTHEN=(WHEN=INIT,OVERLAY=(5:5,50,JFY=(SHIFT=LEFT)))               
                                                                     
  OUTFIL VTOF,REMOVECC,BUILD=(56,126),                               
  TRAILER1=('FOOTER|SERVICENAME|PEGA|NUMBEROFPROCESSEDRECORDS|',5,50)
//*
Back to top
View user's profile Send private message
shr_amar
Warnings : 2

Active User


Joined: 02 May 2005
Posts: 128
Location: UK

PostPosted: Tue Mar 30, 2010 6:10 pm
Reply with quote

Kolusu ,

This is working .Many Thanks to you
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top