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

trailer record with date fields-getting error.


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

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Thu Mar 22, 2007 7:05 pm
Reply with quote

Hi..

I want to insert only one row in a file having below details

Filename , current date,record count,currentdate-1 day

and other requirement (another new control card)

Filename , current date,record count,currentdate-1 month

lrecl = 71
ex..

test.file.name ,20070322, 9045,20070321

i used the below card but getting syntax error ..




Code:
 SORT FIELDS=(1,2,CH,A)                                           
 OUTFIL TRAILER1=('TEST.FILE.NAME',45:',',                       
 DATE=(4MD),',',COUNT=(M12,LENGTH=8),',',DATE=(4MD)-1),NODETAIL 
                                        $
SYNTAX ERROR                                                     
C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E7-K90000                 
END OF DFSORT                                         




thanks,
Deepa
Back to top
View user's profile Send private message
Deepa.m

New User


Joined: 28 Apr 2005
Posts: 99

PostPosted: Thu Mar 22, 2007 8:04 pm
Reply with quote

just came to know that we can't use date manipulation in trailer and header.

any other way to achieve 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: Thu Mar 22, 2007 8:51 pm
Reply with quote

You can create a symbol for the current date - 1 day and then use that symbol in your TRAILER1 operand, e.g.

Code:

//S1  EXEC PGM=ICEMAN                                           
//SYSOUT DD SYSOUT=*                                             
//SORTIN   DD *                                                 
RECORD                                                           
//SORTOUT DD SYSOUT=*                                           
//SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS) 
//SYSIN    DD *                                                 
  OPTION COPY                                                   
  INREC BUILD=(C'DTM1,''',DATE1-1,C'''',80:X)                   
/*
//S2  EXEC PGM=ICEMAN
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
...
   OUTFIL TRAILER1=(...,DTM1,...)
/*
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top