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
 
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm

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