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

Finding the Hex character in a file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
syed-sameer-ahmed
Warnings : 2

New User


Joined: 22 Feb 2007
Posts: 45
Location: Bangalore

PostPosted: Mon May 05, 2008 9:16 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 05, 2008 9:25 pm
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: 45
Location: Bangalore

PostPosted: Mon May 05, 2008 9:34 pm
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 05, 2008 9:48 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Finding and researching jobs All Other Mainframe Topics 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top