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
 

 

Finding the Hex character in a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 46
Location: Bangalore

PostPosted: Mon May 05, 2008 9:16 pm    Post subject: Finding the Hex character in a file
Reply with quote

Hi All,

Could anybody help me on writing a program for finding the HEx code in the file.

"cobol,jcl or rexx" anything will do.
Please REply ASAp.

Thanks

Syed Sameer Ahmed
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 May 05, 2008 9:25 pm    Post subject:
Reply with quote

It's not clear what you want to do or why you posted in the DFSORT Forum.

If you want to use DFSORT to display your input records in HEX, you can do that with these DFSORT control statements if your input file has RECFM=FB and LRECL=n:

Code:

    OPTION COPY
* Replace n with the LRECL value
    INREC BUILD=(1,n,HEX)


or with these control statements if your input file has RECFM=VB:

Code:

    OPTION COPY
    INREC BUILD=(1,4,1,4,HEX,5,HEX)


If you want do something else with DFSORT, explain exactly what you want to do.

If you don't want to use DFSORT, then please repost in the appropriate Forum.
Back to top
View user's profile Send private message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 46
Location: Bangalore

PostPosted: Mon May 05, 2008 9:34 pm    Post subject:
Reply with quote

Apologies first.

I did not give heed to the fact that Ia m posting in a DFSORT forum.Apologies for that.

Let me explain and try reputting my question.

I have a file which contains Hex characters.I want to know the line where this Hex characters exist and remove/replace them with corresponding character.

ex: x'05' is same as 05.Hence whenever I get x'o5',I want it to replace by 05.

Kindly mail me if you have any queries.

Please do tell me if I can repost this question in other forum,as I do not wish to violate the forum rules unknowingly.

Thanks

Syed Sameer Ahmed.
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 May 05, 2008 9:48 pm    Post subject:
Reply with quote

Quote:
Please do tell me if I can repost this question in other forum,as I do not wish to violate the forum rules unknowingly.


Do you want a DFSORT solution or not? If you want a DFSORT solution, then this is the right Forum. If you don't want a DFSORT solution, please say so and post in the appropropriate Forum (e.g. COBOL, PL/I, whatever) so I can lock this thread.

Quote:
ex: x'05' is same as 05.Hence whenever I get x'o5',I want it to replace by 05.


This is unclear. Do you mean you want to replace X'05' with C'05'? If so, that would be replacing 1 byte with 2 bytes so would you want to shift the other bytes or what? Do you want to look for X'05' in a particular position or anywhere in the input record? It would help if you would show an example of your input records and what you want for output and explain the "rules" for getting from input to output. Also, give the RECFM and LRECL of the input file.
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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