Page 1 of 1

Extracting date through sort to get MMCCYY format

Posted: Wed Aug 16, 2017 1:21 am
by Sumedh
Hi ,

I have a requirement wherein I need to create a file having Current month and current year in MMCCYY format (082017)

I am using various DATE functions but none of them are providing date in MMCCYY format.

Can anyone help me to get a current month and year in a single step through sort or ICETOOL

My output file should have onyl current month and year ( MMCCYY_

Code: Select all

 //STEP02   EXEC PGM=SYNCSORT       
//*                                
//SORTIN   DD *                    
//*                                
//SORTOUT  DD SYSOUT=*             
//*                                
//SYSPRINT DD SYSOUT=*             
//SYSUDUMP DD SYSOUT=*             
//SYSOUT   DD SYSOUT=*             
//SYSIN    DD *                    
   OPTION COPY                     
   OUTFIL REMOVECC,                
   HEADER1=(1:DATENS(4MD))         
//*    
Output :20170815

Required output 082017