View previous topic :: View next topic |
Author |
Message |
eureka19 Beginner
Joined: 02 Oct 2005 Posts: 20 Topics: 9
|
Posted: Thu Jan 19, 2006 7:41 am Post subject: Sort help needed in date formatting |
|
|
Hi,
I would like to append the current date in a file in the format YYYYMM.
DATENS=(4MD) gives the date in YYYYMMDD format.
YYYDDNS=(4D) gives the date in YYYYDDD format.
However, I am unable to find a format which gives date in YYYYMM or YYYY Only format.
Any pointers on this will be of great help.
Thanks in advance,
Eureka. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Thu Jan 19, 2006 8:26 am Post subject: |
|
|
eureka19,
eureka19,
You can use date2 parm which gives you the current in yyyymm format. try this
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
EUREKA
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(1,10, $ first 10 bytes
DATE2) $ current date in yyyymm format
/*
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
|
Back to top |
|
 |
|
|