Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Reformat date in SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Reformat date in SORT
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    Post subject: Reply to: Reformat date in SORT
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Oct 20, 2010 5:42 pm    Post subject: Reply to: Reformat date in SORT
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    Post subject:
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    Post subject: still a small confusion
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us