Need to replcae hexadecimal value in FB format file

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

Need to replcae hexadecimal value in FB format file

Post by anilanju » Wed Jan 18, 2012 8:48 pm

Hi

I need to sort a file, replacing the special char to spaces.
i am using
OPTION COPY
INREC FINDREP=(IN=(C'/',C'.',C'..'),
OUT=C' ',STARTPOS=11,ENDPOS=120)

Now i need to replace a hexadecimal value in the same file from 41 to 40. at any position in the file.
How do i do that.
i tried using this
OPTION COPY
INREC FINDREP=(IN=(C'/',C'.',C'..'PD'41'),
OUT=(C' ',PD'40'),STARTPOS=11,ENDPOS=120)


Can someone help please

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Wed Jan 18, 2012 10:25 pm

It's not at all clear what you mean by
Now i need to replace a hexadecimal value in the same file from 41 to 40. at any position in the file.
What are PD'41' and PD'40' supposed to represent? If you mean packed values of 41 and 40, that would be X'041C' and X'040C' and you could use those hex values for IN and OUT.

If you mean X'41' and X'40', you can use those values for IN and OUT (note that X'40' = C' ').

Or do you want to do something else? If something else, please explain clearly what you want to do and show the input and output values in hex.

Please show the input and output values in hexadecimal and indicate the positions in which you want to do the find/replace.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

User avatar
anilanju
Member
Posts: 47
Joined: Mon Nov 10, 2008 6:59 pm

Post by anilanju » Thu Jan 19, 2012 4:54 pm

Hi

Thanks it workied. I used X'41' in Input and used c' ' in out.
worked fine

Thanks

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others