I would like to convert '?' (hexa value as X'6F') to Zero (hexa value X'F0') as well.
I was not able to append this functionaility to the above mentioned syntax.
Was getting syntax error when I tried the below mentioned way
Thanks Bill for the suggestion.
If I am using INOUT, will I end up having 17 entries to be converted to SPACES and one last entry to convert ? to Zeroes
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
Quote:
My Reqt is to convert all the Non readable values coming in flat file to SPACES and also to convert '?' to ZEROES.
Mainframes use EBCDIC, and EBCDIC has 256 characters in the collating sequence. A large number of them are not human-readable but are valid characters. Your post only mentions the first 16 of the characters that are not human-readable. What about the rest of them?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
If you were desperate to have two FINDREPs instead of one, that would be one solution. As would using two IFTHEN=(WHEN=INIT with FINDREPs be.
Having two FINDREPs means (in this case) looking at each byte of the record twice, whereas with one FINDREP even if there are multiple test values, you only look at (loop up) each byte once.
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Yes. Any one-byte FINDREP can be achieved with ALTSEQ, as long as a field can be defined to do the ALTSEQ on. To be clearer, if you wanted the variable-length part of a record, you'd need FINDREP.
I've only recently noticed the ALTSEQ being used in place of FINDREP, and given the person seen using it, I think it is probably worthwhile.
I'm still confused as to what problem vinu78 was having and suspect the ALTSEQ will also be too much typing.
Thanks Bill and also with INREC WHEN=INIT he can still use FINDREP twice instead of another OUTREC (Just to answer his original quesion).
I guess, vinu78 wants us to test everything instead of he try something by himself after all the hints.