MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sort help needed in date formatting

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
eureka19
Beginner


Joined: 02 Oct 2005
Posts: 20
Topics: 9

PostPosted: Thu Jan 19, 2006 7:41 am    Post subject: Sort help needed in date formatting Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Thu Jan 19, 2006 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Jan 20, 2006 4:46 am    Post subject: Reply with quote

Eureka19,

Check the following link for more information on other date formats available in sort.
http://www.mvsforums.com/helpboards/viewtopic.php?p=23334#23334

Cheers,

Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group