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
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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