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

Searching of records in hex format...


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rahul.arora

New User


Joined: 09 Jul 2011
Posts: 9
Location: India

PostPosted: Sun Jul 10, 2011 11:20 am
Reply with quote

I have a flat file which contains records in normal format...I want to make a search on the records based on their hex code (means I need a records which have hex value less than 04)...
My query is
I have records in normal format...now i want to make a search on hex code...so to do this should i have to make a new input file which contains hex codes of those records....or we can search directly???[/list]
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sun Jul 10, 2011 1:16 pm
Reply with quote

Records or columns ?

What have you tried so far. SUPERC should suffice
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Jul 10, 2011 2:18 pm
Reply with quote

rahul.arora wrote:
I have a flat file which contains records in normal format...I want to make a search on the records based on their hex code (means I need a records which have hex value less than 04)...
My query is
I have records in normal format...now i want to make a search on hex code...so to do this should i have to make a new input file which contains hex codes of those records....or we can search directly???[/list]


Every byte of every file, no matter what type of file, is "normal". Every byte is made of 8 bits, each of which can have a value 0 or 1, allowing a binary representation of any value from 0 to 255. Because eight-digt binary numbers (base 2) are quite clumsy to use, (00000000 to 11111111) we use base 16 and a notation called hexadecimal, where each four bits of the byte it represented by the digits 0-9 and A-F.

Every file is "normal" and every file is "hexadecimal".

If you want to search for values in hexadecimal, all you need is something that allows you to express your selection in hexadecimal. You do not need a different input file. You can search directly.
Back to top
View user's profile Send private message
rahul.arora

New User


Joined: 09 Jul 2011
Posts: 9
Location: India

PostPosted: Sun Jul 10, 2011 2:24 pm
Reply with quote

The file has around 2000 records and 15-20 columns...
I tried to copy the records through SORT FIELDS=COPY...
But the thing is I need records which has hex code 00,01,02 and 03..And they are coming randomly in any column of the record...
First tell me one thing
I have input file which has records in alphanumeric but i want to make a search basis on hex code....Is it Possible?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Jul 10, 2011 2:37 pm
Reply with quote

What do you mean the file has 15-20 columns?

Determine which sort product you have.

Consult the documentation for that product.

If you can find something that allows you to "scan" for values at a variable location, then you are home free. Try X'00', X'01' etc for the values you are trying to locate.

If you want to search for alphanumerics in hex, each letter and each number has a hex value associated with it. x'F1' is 1, x'C1' is A.

It is possible to search a file in hexadecimal no matter what that file contains.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Mon Jul 11, 2011 7:06 am
Reply with quote

Hello,

Post some actual input data and the output you want then this sample is processed.

You can probably get the result you want using your sort product, but you need to provide better info. You also need to menton the recfm and lrecl of the files.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
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 Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top