DATA Type Conversion using SYNCSORT

Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL
beeram527
Posts: 3
Joined: Wed Apr 29, 2015 1:46 am
Skillset: Mainframe, JCL, COBOL
Referer: Internet

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.

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

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

beeram527
Posts: 3
Joined: Wed Apr 29, 2015 1:46 am
Skillset: Mainframe, JCL, COBOL
Referer: Internet

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
Skillset: Mainframe, JCL, COBOL
Referer: Internet

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.

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

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.

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

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


  • Similar Topics
    Replies
    Views
    Last post