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

How can I reformat these fields?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Sat Nov 21, 2009 2:50 am
Reply with quote

I feel dumb asking this, but I'm not an expert on numeric data types.

The dataset in question is RECFM(F B) LRECL(1600).

The raw data looks like this in hex:

Code:

 îçí   ¬ îçá   ¬   
15452025154420250000
5685099F5685099F0008


and I know that it's composed of these fields:

COMPLETED TIME in HHMMSSTT format. I know this value is: 15:56:48.
COMPLETED DATE in Julian (YYYYDDDF) format. I know this value is: 2009295 (10/22/2009).
STARTED TIME in HHMMSSTT format. I know this value is also 15:56:48.
STARTED DATE in Julian (YYYYDDDF) format. I know this value is also: 2009295 (10/22/2009).
STEP COMPLETION CODE. I know this value is:00000008.

What DFSORT data types would convert these into their decimal equivalents? It looks like p,4,PD,TO=FS,LENGTH=8 is close.
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: Sat Nov 21, 2009 3:14 am
Reply with quote

You could use these DFSORT statements:

Code:

  OPTION COPY                                               
  INREC  BUILD=(1,3,HEX,8:5,4,PD,EDIT=(TTTTTTT),16:9,3,HEX,
     23:13,4,PD,EDIT=(TTTTTTT),31:17,4,HEX)                 


and the output would be:

Code:

155648 2009295 155648 2009295 00000008


You can do further conversions/formatting from those values if you need to.
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Partial Sort conditions for PD fields DFSORT/ICETOOL 16
No new posts Pull data using date difference betwe... DB2 6
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts Reformat and relocate content DFSORT/ICETOOL 4
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
Search our Forums:


Back to Top