View previous topic :: View next topic
|
Author |
Message |
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|