DATA Type Conversion using SYNCSORT



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

DATA Type Conversion using SYNCSORT

Postby beeram527 » Wed Apr 29, 2015 2:07 am

Hi,
Can some one please assist me for the following Data Type conversions with SYNCSORT.

1.) I have source file field with S9(17) and need to convert this to S9(11)V99 Comp3.

2.) I have another field with Date in Julian (Eg .. 2015114). I need to convert this to : YYYY-MM-DD.

3.) Another field with S9(4) and need to convert into X(4).

Can someone please suggest how this can be achieved by using SYNCSORT and what should be mentioned at OUTREC field.

Regards,
Sree.
beeram527
 
Posts: 3
Joined: Wed Apr 29, 2015 1:46 am
Has thanked: 0 time
Been thanked: 0 time

Re: DATA Type Conversion using SYNCSORT

Postby BillyBoyo » Wed Apr 29, 2015 2:46 am

For 1), assuming that the V99 part must always be zero in the conversion, MULtiply by +100 with TO=PD,LENGTH=7
For 2), you should have some date functions, without checking I think JULTOGREG, but check your documentation
For 3), use an EDIT without specifying a sign, or TO=ZDF,LENGTH=4
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: DATA Type Conversion using SYNCSORT

Postby beeram527 » Wed Apr 29, 2015 3:51 am

Billy,
Thank you.
1.) Yes , last 2 digits can be 00. But the following is giving me syntax error :
056:039,09,PD,+100,MUL,TO=PDF,LENGTH=7,

056:039,09,PD,+100,MUL,TO=PD,LENGTH=7,

Tried few other options but no luck. Not able to get exact syntax from google or from any other documentation. Please provide me If you have the syntax with you.

2.) I am trying to get thru some documentation on JULTOGREG.

3.) TO=ZDF,LENGTH=4 is working fine for me.

Thanks again for your help.
beeram527
 
Posts: 3
Joined: Wed Apr 29, 2015 1:46 am
Has thanked: 0 time
Been thanked: 0 time

Re: DATA Type Conversion using SYNCSORT

Postby beeram527 » Wed Apr 29, 2015 6:22 am

Hi,

1) Solved with the following:
056:(039,09,PD,MUL,+100),TO=PD,LENGTH=7,

2.) Can any one assist me to convert Julian Date in Packed Decimal ( S9(07), 4 Byte, Eg ... 2015105 or 2015114 ... ) to YYYY-MM-DD format.
beeram527
 
Posts: 3
Joined: Wed Apr 29, 2015 1:46 am
Has thanked: 0 time
Been thanked: 0 time

Re: DATA Type Conversion using SYNCSORT

Postby BillyBoyo » Wed Apr 29, 2015 1:49 pm

OK, I guessed the names of the date functions incorrectly. I was really close. Have a look at DT and DTNS. Just a few differences in the letters.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: DATA Type Conversion using SYNCSORT

Postby NicC » Wed Apr 29, 2015 3:56 pm

You have a Syncsort question - not a JCL question. Topic moved to the correct part of the forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post