Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Conversion from Hexadecimal to display

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Conversion from Hexadecimal to display
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

Site Director


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

PostPosted: Mon Oct 13, 2008 2:13 pm    Post subject:
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    Post subject: Conversion from Hexadecimal to display
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    Post subject:
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

Site Director


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

PostPosted: Mon Oct 13, 2008 2:42 pm    Post subject:
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    Post subject: Conversion from Hexadecimal to display
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 Moderator


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

PostPosted: Mon Oct 13, 2008 9:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm
No new posts Display upon console bipinpeter COBOL Programming 1 Thu Jun 22, 2017 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us