IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need to convert YYYY-MM-DD to YYYYMMDD


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 Developer


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

PostPosted: Wed May 09, 2007 8:59 pm
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:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top