View previous topic :: View next topic
|
Author |
Message |
Deepa.m
New User
Joined: 28 Apr 2005 Posts: 99
|
|
|
|
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 |
|
|
Deepa.m
New User
Joined: 28 Apr 2005 Posts: 99
|
|
|
|
just came to know that we can't use date manipulation in trailer and header.
any other way to achieve this? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|
|