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: 10211
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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