Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Convert from 1/1/2019 to 01/01/2019

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sudhakarraju

New User


Joined: 05 May 2005
Posts: 30

PostPosted: Fri Sep 20, 2019 1:16 am    Post subject: Convert from 1/1/2019 to 01/01/2019
Reply with quote

I have below data

I
Code:


1/30/2021  1/29/2019
9/2/2020   11/1/2019
9/29/2020  8/14/2017
5/30/2020  12/22/2018
12/30/2022 7/1/2019

I want this to be

01/30/2021  01/29/2019
09/02/2020  11/01/2019
09/29/2020  08/14/2017
05/30/2020  12/22/2018
12/30/2022  07/01/2019

Thanks
Back to top
View user's profile Send private message

John Del

New User


Joined: 27 Apr 2012
Posts: 34
Location: NY

PostPosted: Fri Sep 20, 2019 2:31 am    Post subject:
Reply with quote

What have you tried to do?

My solution would be on the INREC, use PARSE to separate the fields and BUILD the record using UFF into fixed positions and lengths.

Then use an OUTREC BUILD to insert the '/' at the appropriate position,
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 56
Location: Germany

PostPosted: Mon Sep 23, 2019 11:56 pm    Post subject:
Reply with quote

Code:
  INREC IFTHEN=(WHEN=INIT,                                     
    PARSE=(%01=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),             
           %02=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),             
           %03=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=4),             
           %11=(ABSPOS=12,STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),   
           %12=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),             
           %13=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=4)),           
    BUILD=(%01,UFF,M11,C'/',%02,UFF,M11,C'/',%03,UFF,M11,X,     
           %11,UFF,M11,C'/',%12,UFF,M11,C'/',%13,UFF,M11))     
  SORT FIELDS=(COPY)                                           
  END                                                           


RTFM.
Back to top
View user's profile Send private message
Joerg.Findeisen

New User


Joined: 15 Aug 2015
Posts: 56
Location: Germany

PostPosted: Tue Sep 24, 2019 12:16 am    Post subject:
Reply with quote

Minor update

Code:
  INREC IFTHEN=(WHEN=INIT,                                 
    PARSE=(%01=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),         
           %02=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),         
           %03=(STARTAT=NUM,FIXLEN=4),                     
           %11=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),         
           %12=(STARTAT=NUM,ENDBEFR=C'/',FIXLEN=2),         
           %13=(STARTAT=NUM,FIXLEN=4)),                     
    BUILD=(%01,UFF,M11,C'/',%02,UFF,M11,C'/',%03,UFF,M11,X,
           %11,UFF,M11,C'/',%12,UFF,M11,C'/',%13,UFF,M11)) 
  SORT FIELDS=(COPY)                                       
  END                                                       
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 Need help to convert BLKSIZE to Track... vinkum JCL & VSAM 3 Sat Nov 30, 2019 4:35 am
No new posts Convert mainframe data to .csv format... karan_reddy DFSORT/ICETOOL 10 Sat Nov 02, 2019 2:09 am
No new posts Convert string to packed format ajaydwivedi4u COBOL Programming 6 Sat Sep 21, 2019 5:01 pm
No new posts Convert Numeric to Packed decimal and... anand1204 DFSORT/ICETOOL 5 Thu Aug 08, 2019 3:53 am
No new posts Convert alpha numeric to signed digits Balu5491 COBOL Programming 4 Mon Feb 25, 2019 10:39 pm

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