IMS date/time



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

IMS date/time

Postby JohnH » Fri Mar 15, 2013 5:08 pm

I need to convert the IMS date/time to readable format on my OUTREC statement. The data at position 63 is x'2013064F175005781856' which should print as '03/06/2013 17:50:05.781856'. How can I do this?
JohnH
 
Posts: 8
Joined: Wed May 27, 2009 7:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: IMS date/time

Postby Akatsukami » Fri Mar 15, 2013 9:07 pm

The date in an ordinal (oft miscalled "Julian") date in unsigned packed decimal format. The time looksto be BCD; I don't know if Syncsort can handle that.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: IMS date/time

Postby BillyBoyo » Mon Mar 18, 2013 4:40 pm

You're going to have to check your documentation/search the forums/google for SyncSort julian-date conversion. For the Time, have a look to see if SyncSort supports UNHEX, else it can be dealt with by "putting it somewhere" and appending X'0C' to it, then using the combined field as PDC to make it ZDF and then format it as you want.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: IMS date/time

Postby JohnH » Mon Mar 18, 2013 5:01 pm

Syncsort doesn't seem to have an UNHEX, but your comment gave me an idea. On the INREC, I simply append an x'0C' literal behind the time and then convert PD to ZD in the OURTREC. Thanks for the help.
JohnH
 
Posts: 8
Joined: Wed May 27, 2009 7:22 pm
Has thanked: 0 time
Been thanked: 0 time

Re: IMS date/time

Postby BillyBoyo » Mon Mar 18, 2013 5:10 pm

Remember that this will only work "simply" if you don't need the byte immediately after the time... If you do need the byte, you need to copy the field somewhere else, then append. Where you copy it to depends on where your records are fixed or variable.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post