View previous topic :: View next topic
|
Author |
Message |
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
I need 2 dates in a file. The first date is the current month and year hardcoding the day to be 01 always. The second date should have the current month day 01 and two years back.
Here is the sample
DATE 08/01/10 08/01/08 PURGE
Could anyone help me on this.
Saagu |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
They might do if you posted into the correct forum.
Topic moved. |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Look up INREC and OUTREC processing in the SyncSort manual. Pay particular attention to the use of the &DATE function ( actually described in the OUTFIL/OUTREC(BUILD) processing section ). Let us know if you still have questions after reading the manual. |
|
Back to top |
|
|
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
could you please provide me the link where i can get the &date processing for sync sort .
Thanks
Saagu |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Sorry, but no. If SyncSort wanted to make their manuals "public", they would do so at their own web site. Since they do not do so, it would constitute copyright infringement to post them online without express written permission.
That being said, the syntax for the &DATE function in SyncSort is the same as the syntax for the &DATE function in DFSORT - so you could read the DFSORT manual for usage rules. Open the DFSORT manual and do a search on &DATE. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If your organization is licensed to use Syncsort, all of the material may be downloaded free from Syncsort support. . .
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com |
|
Back to top |
|
|
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
Thanks for the info.
I can see the option &DATE=(YMD-) will work , but i could not findout the option to default day as 01 .
Thanks,
Saagu |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Create the YMD format during INREC processing. Overlay the DAY with '01' during OUTREC processing. That's why I said to look at INREC and OUTREC processing as well. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Here is one way to accomplish this task:
Code: |
//SYSIN DD *
INREC IFTHEN=(WHEN=INIT,
BUILD=(C'DATE ',6:&DATE=(MDY/),15:&DATE=(MDY/),24:C'PURGE')),
IFTHEN=(WHEN=INIT,
OVERLAY=(9:C'01',18:C'01',21:21,2,ZD,SUB,+2,EDIT=(TT)))
SORT FIELDS=COPY
/* |
|
|
Back to top |
|
|
saagu
New User
Joined: 15 May 2008 Posts: 41 Location: Chennai
|
|
|
|
Thank a lot Allisa. Its working now.
thanks for all. |
|
Back to top |
|
|
|