Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 10375
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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us