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.
DATA Type Conversion using SYNCSORT
-
- 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
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
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
-
- Posts: 3
- Joined: Wed Apr 29, 2015 1:46 am
- Skillset: Mainframe, JCL, COBOL
- Referer: Internet
Re: DATA Type Conversion using SYNCSORT
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.
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.
-
- Posts: 3
- Joined: Wed Apr 29, 2015 1:46 am
- Skillset: Mainframe, JCL, COBOL
- Referer: Internet
Re: DATA Type Conversion using SYNCSORT
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.
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.
-
- 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
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.
-
- 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
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
Regards
Nic
-
- Similar Topics
- Replies
- Views
- Last post
-
- 3
- 1499
-
by sergeyken
View the latest post
Sun Nov 29, 2020 6:47 am
-
- 3
- 5889
-
by sergeyken
View the latest post
Sat Dec 10, 2022 2:30 am
-
- 7
- 2000
-
by sergeyken
View the latest post
Wed Dec 23, 2020 6:39 pm
-
-
.TXT file conversion to .CSV/.XLSX
by dangtran10 » Thu May 20, 2021 7:09 am » in DFSORT/ICETOOL/ICEGENER - 3
- 1929
-
by steve-myers
View the latest post
Fri May 21, 2021 10:57 pm
-
-
-
Code conversion issue while reading JCL using REXX
by vsgurunath » Fri Jun 19, 2020 10:19 pm » in CLIST & REXX - 11
- 4302
-
by vsgurunath
View the latest post
Thu Jun 25, 2020 4:08 pm
-