View previous topic :: View next topic
|
Author |
Message |
srikanth_cts
New User
Joined: 27 Feb 2008 Posts: 25 Location: Phoenix, AZ,USA
|
|
|
|
Hi Guys,
I am having a VB input file with the following data HEX data:
I wanted to convert the above HEX coded data into the corseponding DEC coded data and copy into an output file.
I used the folowing sort card:
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(5:5,9,HEX)
|
Taking the assumption that since the input file is a VB so started to read the data from 5th position and 9 characters are to be copied and pasted to output file satrting from 5th position.
But its giving the following error:
Code: |
SORTIN : RECFM=VBS ; LRECL= 32004; BLKSIZE= 27998
OUTREC RDW NOT INCLUDED
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
please let me know , if I am going wrong somewhere
Srikanth |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
The second line of the message tells you what's wrong (OUTREC RDW NOT INCLUDED). You have to include the first 4 bytes because the file is VB (VBS).
Garry. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
srikanth,
From your output
Quote: |
OUTREC RDW NOT INCLUDED |
RDW is not included in OUTREC FIELDS=(5:5,9,HEX) statement. you will have to include the first 4 bytes(1,4,5: .....) for RDW.
Modify the SORT card and run the job again. Also i doubt if we can use HEX in the sort card.
Post if there are still errors and i hope there would be few. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
srikanth_cts wrote: |
Code: |
SORTIN : RECFM=VBS ; LRECL= 32004; BLKSIZE= 27998
OUTREC RDW NOT INCLUDED
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
|
Srikanth |
Did you happen to notice that you are using SYNCSORT not DFSORT? |
|
Back to top |
|
|
srikanth_cts
New User
Joined: 27 Feb 2008 Posts: 25 Location: Phoenix, AZ,USA
|
|
|
|
Thanks Aaru,
The solution you have provided has worked.I have removed the HEX in the sort card and it has extracted the data that is required.
I will be trying with the remaining part of converting it into DEC format.
You guessed it right that by using the HEX in the following sort card is not producing the desired output:
OUTREC FIELDS=(1,4,5:5,4,HEX) ; but its giving some interesting output:
for I/P:
the O/P is:
Which can be useful at somepoint of time ;)
Thanks again , Aaru |
|
Back to top |
|
|
srikanth_cts
New User
Joined: 27 Feb 2008 Posts: 25 Location: Phoenix, AZ,USA
|
|
|
|
Craq,
Its my mistake that I have posted it in DFSORT forum.
But, I have a reason. I was not able to find the SYNCSORT Forum. So I thought that DFSORT is relatively an appropriate forum than JCL forum to request for the help!
Going forward, I will not repeat the mistake.
Thanks,
Srikanth |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Look at the Forum Description:
"Clear your doubts from JCL, SYNCSORT, IDCAMS, IEBGENER, JES2 & JES3". |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Try OUTREC FIELDS=(1,4,5:5,4,BI,ZD) |
|
Back to top |
|
|
srikanth_cts
New User
Joined: 27 Feb 2008 Posts: 25 Location: Phoenix, AZ,USA
|
|
|
|
Thanks Dick and Aaru. I have reached to the solution !
|
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Srikanth,
Quote: |
Thanks Dick and Aaru. I have reached to the solution !
|
Good to hear. You are welcome |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Quote: |
Thanks Dick and Aaru. I have reached to the solution !
|
You're welcome
It may help someone else if you post your solution.
d |
|
Back to top |
|
|
srikanth_cts
New User
Joined: 27 Feb 2008 Posts: 25 Location: Phoenix, AZ,USA
|
|
|
|
Ooops, Sorry guys, I forgot to post it. Here it goes:
When I gave the following sort card>
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5:5,4,BI)
/*
|
It has produced the desired output , i.e converted the HEX values into DEC values and extracted the 9 digits (except that in the 9 digits , if the starting digit(S) is/are zero/Zeros they are not seen in the output:
here I denonstrate:
i/p
o/p
Only this exception need to be taken care.
In my case I did not have that in my test cases so ignored it.
Thanks D
Regards,
Srikanth |
|
Back to top |
|
|
|