View previous topic :: View next topic
|
Author |
Message |
Gousiya Mulla
New User
Joined: 02 Jun 2008 Posts: 87 Location: Bangalore
|
|
|
|
Hi ,
I have 80 rec length file which is in Comp-3 .
Can any one please suggest me with example JCL to convert it into Display format . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I have 80 rec length file which is in Comp-3 . |
You need to post a more clear definition of your file layout. It is surely not one field of 80 that contains comp-3 data.
Also, please post how you want the output (on a report, in a file for later use, displayed in sysout). The way to do what you want will depend on what you have and what you are doing with it. |
|
Back to top |
|
|
Gousiya Mulla
New User
Joined: 02 Jun 2008 Posts: 87 Location: Bangalore
|
|
|
|
Thanks Dick , Hope the below is bit elaborative .
I have a file whose record lenghth is 80(FB) . It is at present in Comp format . I would like to get this complete file in Display Format .
The output can be a file for later use . Can any one please help in this with example JCL .
Example of data of above file:
...w...รบ..
When hex-on :
000A000D
0036005E
I would like to get this(the complete file) in display format . |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
use sort utility
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1,8,PD,TO=ZD,LENGTH=8
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Sambhaji,
Please do not post untested "solutions". It only adds confusion.
The posted data contains no packed-decimal data.
Gousiya,
Please post how you want the output to appear. You posted 8 bytes - is the rest of the record similar? Is that one 8-byte field or 2 4-byte values? |
|
Back to top |
|
|
Gousiya Mulla
New User
Joined: 02 Jun 2008 Posts: 87 Location: Bangalore
|
|
|
|
Hi Dick ,
It is one 8-byte field . The rest of the records similar . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Gousiya,
Well, if this is really one 8-byte field in COMP format, then it's a pretty large number. Assuming its binary (unsigned) and not fixed-point (signed), you can convert it to ZD format using these DFSORT statements:
Code: |
OPTION COPY
INREC BUILD=(1,8,BI,TO=ZD)
|
That would give you a 20-character displayable value. For the input value you showed, the output value would be:
Code: |
00000004011499455966
|
If you want some other output form other than ZD, you need to show exactly what you want.
Personally, I'd guess these were actually two 4-byte COMP fields, but you need to figure out what kind of data you have yourself. |
|
Back to top |
|
|
|