Joined: 09 Mar 2011 Posts: 7312 Location: Inside the Matrix
Did you do what I suggested?
You're confusing the issue by using FIND AND REPLACE in your post-subject, when FINDREP (Find and Replace) is a DFSORT function which you have no way to use for this.
You want a simple IFTHEN=(WHEN=(logicalexpression) which allows you to look for your characters at any starting position in a range that you specify, then change something with OVERLAY (note, if you are inserting something you'd have to use BUILD).
Do you know what a field-type of CH means? Do you know what any field-type means? Do you know, in the data, where the field-type is stored (hint: nowhere)? What relevance is one field-type over another, given the foregoing? So why do you think that "CH" would prevent you using SS instead, given that SS will give you what you want and "CH" will not?
will be "true" if ABCD appears anywhere between positions one and 77.
For the BUILD you'd need to change "len" appropriate for your record-length. Code is slightly different (to include RDW, and change starting position, and how the variable-length data is copied) for variable-length records.
In the above cases, the relevant part of the code says "take the three bytes at position 100, and CHANGE them, with an output length of one, so that ABC is "1" and everything else stays at the original value of position 1. Place that one-byte result in the record at position one".