IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Conversion from Hexadecimal to display


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Mon Oct 13, 2008 1:58 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 13, 2008 2:13 pm
Reply with quote

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
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Mon Oct 13, 2008 2:21 pm
Reply with quote

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
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Oct 13, 2008 2:33 pm
Reply with quote

use sort utility
Code:

SORT FIELDS=COPY                   
OUTREC FIELDS=(1,8,PD,TO=ZD,LENGTH=8
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Oct 13, 2008 2:42 pm
Reply with quote

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
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Mon Oct 13, 2008 3:12 pm
Reply with quote

Hi Dick ,

It is one 8-byte field . The rest of the records similar .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Oct 13, 2008 9:29 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts SMF Record Date conversion failing CLIST & REXX 1
No new posts How to display the leading zeros of a... DB2 7
Search our Forums:

Back to Top