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
 
Searching of records in hex format...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Searching of records in hex format...
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: 8593
Location: Back in jolly old England

PostPosted: Sun Jul 10, 2011 1:16 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Jul 10, 2011 2:18 pm    Post subject: Reply to: Searching of records in hex format...
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    Post subject: Searching of records in hex format...
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Sun Jul 10, 2011 2:37 pm    Post subject:
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

Site Director


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

PostPosted: Mon Jul 11, 2011 7:06 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 8 Wed Aug 23, 2017 9:59 pm

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