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

Displaying Hexadecimal data in character format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Mon Apr 06, 2009 9:10 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top