Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Displaying Hexadecimal data in character format

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ganeshptrk

New User


Joined: 04 Apr 2007
Posts: 17
Location: Chennai

PostPosted: Mon Apr 06, 2009 8:07 pm    Post subject: Displaying Hexadecimal data in character format
Reply with quote

Hi all,
I have a VB file. This file has Hexadecmial and character data. I want to do following operations on this.
IF 4th byte is equal to X'2303102122' (actually 8 byte as this is a VB file) AND 75th byte is equal to X'04' (actually 79th byte in the file) THEN

Change 75th byte to X'06' AND display X'2303102122' and X'06' in character format.

I know the syntax for find and replace is as follows
Code:
OPTION COPY                                     
   INREC IFTHEN=(WHEN=(8,5,BI,EQ,X'2303102122',     
     AND,79,1,BI,EQ,X'04'),OVERLAY=(79:X'06'))

But how do I convert data from Hexadecimal to Character for display purposes.

thanks
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 Apr 06, 2009 9:10 pm    Post subject:
Reply with quote

What you're calling hexadecimal data is actually binary data.

It isn't clear if you just want to display those two fields in hex without the rest of the fields or if you want to display all of the fields. You haven't really said where the character data is.

At any rate, you can use p,m,HEX to display binary data as hexadecimal data in character format.

For example, if you want to display the 5 bytes starting at 8 and the byte starting at 79 in hex with one space between them, you can use this DFSORT statement:

Code:

   OUTREC BUILD=(8,5,HEX,X,79,1,HEX)
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts Reg:Displaying the particular month o... bhavana yalavarthi All Other Mainframe Topics 4 Sat Jul 08, 2017 8:13 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us