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
 
Need to convert YYYY-MM-DD to YYYYMMDD

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

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Wed May 09, 2007 3:26 pm    Post subject: Need to convert YYYY-MM-DD to YYYYMMDD
Reply with quote

Hi,

1. I need to convert YYYY-MM-DD to YYYYMMDD.
2. Input field lenght = 6

Input values Expected output
-------------------------------------------------
4578 +04578
256 +00256
-8985 -08985

Need to padd with leading zeros with sign.
Back to top
View user's profile Send private message

kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Wed May 09, 2007 3:29 pm    Post subject: Re:
Reply with quote

Sorry for posting again, due to web constraints, it is not that clear for 2nd query.

Input values
--------------
4578
256
-8985

Expected output
-------------------
+04578
+00256
-08985
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Wed May 09, 2007 3:54 pm    Post subject: Re:
Reply with quote

Hi all,
First issue is solved using
OUTREC FIELDS = (1:1,4,5:6,2,7:9,2)

But can anyone give solution for 2.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed May 09, 2007 8:59 pm    Post subject:
Reply with quote

For 2, you can use these DFSORT control statements:

Code:

   OPTION COPY
   INREC BUILD=(1,5,SFF,M26,LENGTH=6)


For complete details on DFSORT's SFF format, see:

www.ibm.com/servers/storage/support/software/sort/mvs/pdug/
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 Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
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 Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm

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