View previous topic :: View next topic
|
Author |
Message |
DKartiya
New User
Joined: 30 Jan 2008 Posts: 26 Location: Chennai
|
|
|
|
Hi,
Please let me know if we can have a PD field converted to Numeric data using SYNCSORT.
For Example: I have a file1 with the ff data
AA ---- PD field
I want to have an output file as
AA ---- Numeric data (Converted value of the PD field).
Thanks.
Regards,
Karthi |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
It would be good if you show some sample input/output with the RECFM & LRECL of input output.
By the time you may searh the JCL & or DFSORT part of the forum as well - these things have been discussed many times before. |
|
Back to top |
|
|
DKartiya
New User
Joined: 30 Jan 2008 Posts: 26 Location: Chennai
|
|
|
|
Hi,
I tried searching the forum. Am not able to find any matching results.
File1: LRECL is 10. First 2 bytes record type and the next 8 bytes is PD
AA--Packed data---
I want the output file as:
AA123456789012345 (Since PD of bytes is 15 bytes numeric data.)
So output file should be of 17 bytes.
Regards,
Karthi |
|
Back to top |
|
|
Shashank.kapoor
New User
Joined: 14 Jan 2009 Posts: 24 Location: Mumbai
|
|
|
|
Hi,
Please find below the statement:
SORT FIELDS=COPY
OUTREC FIELDS=(1,2,3,3,PD,TO=ZD,LENGTH=5)
Below are the run details:
Input =>
Syntax =>
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,2,3,3,PD,TO=ZD,LENGTH=5)
|
Output =>
Hope this will help you out.
Please feel free to correct me if any thing you find in this.
-------------
Shashank |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi Shashank,
Are you sure about the your job's output? Wont' the rightmost digit in the ZD field be displayed as Zoned (I mean because of overlapping sign, it should be coming as alphabet). If it is so, then it is not what the OP is expecting,
You can use the below control card of SORT
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,2,3,8,PD,EDIT=(IIIIIIIIIIIIIII),80:X)
/* |
Please correct me if i am wrong.
Thanks,
Ajay |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Both Ajay's and Shashank's solutions should produce the desired output. |
|
Back to top |
|
|
DKartiya
New User
Joined: 30 Jan 2008 Posts: 26 Location: Chennai
|
|
|
|
Thanks. It works for me.
Checked on ICEMAN stuff and found that
DISPLAY can be used for the same functionality.
DISPLAY FROM(IN2) LIST(OUT2) ON(76,8,PD) ON(84,8,PD) ON(92,8,PD).
Thanks a lot for all the inputs !!
Regards,
Karthi |
|
Back to top |
|
|
Shashank.kapoor
New User
Joined: 14 Jan 2009 Posts: 24 Location: Mumbai
|
|
|
|
Good to see that it is working, thanks for letting us know. |
|
Back to top |
|
|
|