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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm


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