IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reformat date in SORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Oct 20, 2010 5:06 pm
Reply with quote

Hi all,

I have a file with header having date field as mm/dd/yy below
Code:
HDR TO BICCOTING EVENT      10/18/102010-10-20-03.44.1400000000000


ie 10/18/10 in mm/dd/yy format.

I need to change it to 18102010 ie ddmmccyy in to the output file.


Regards,
Naveen
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Wed Oct 20, 2010 5:36 pm
Reply with quote

please help me on this...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 20, 2010 5:42 pm
Reply with quote

pestering after 30 minutes of the initial post is considered very bad netiquette

furthermore Frank and Kolusu ( the IBM sort experts ) work in a different time zone !

so the best thing to do is... be patient
remember
replying is on voluntary basis
on our own time
free of charge
Back to top
View user's profile Send private message
nelson.pandian

Active User


Joined: 09 Apr 2008
Posts: 133
Location: Phoenix, AZ

PostPosted: Wed Oct 20, 2010 8:35 pm
Reply with quote

Hi naveengec,

Assumed LRECL=80, RECFM=FB. Below code will give desire output.

Code:
//STEP10   EXEC PGM=ICEMAN                                       
//*                                                               
//SORTIN       DD *                                               
HDR TO BICCOTING EVENT      10/18/102010-10-20-03.44.1400000000000
TLR                                                               
TLR                                                               
/*                                                               
//*                                                               
//SORTOUT DD SYSOUT=*                                             
//SYSOUT  DD SYSOUT=*                                             
//SYSIN    DD  *    *** CONSTANT CONTROL CARDS ***               
  OPTION COPY                                                     
  INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'HDR'),                         
               BUILD=(1,28,29:32,2,31:29,2,33:C'20',35:35,45))   
/*                                                               
//*                                                               

Hope this helps.
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Thu Oct 21, 2010 7:11 am
Reply with quote

Hi Nelson,
Thank you so much for your reply.

by 28 you mean the starting position of the date which is 10 in this case?


Regards,
Nave
Back to top
View user's profile Send private message
naveengec

New User


Joined: 24 Mar 2007
Posts: 35
Location: pune

PostPosted: Thu Oct 21, 2010 7:56 am
Reply with quote

Thank you so much Nelson... You are the man!

Regards,
Naveen
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top