View previous topic :: View next topic
|
Author |
Message |
mohitsaini Warnings : 1 New User
Joined: 15 May 2006 Posts: 92
|
|
|
|
Hi,
My requirement is to replace some characters with spaces.
But all i know is what are the allowed characters that can present in the file, and as i mentioned already i want to replace every other character other than that to spaces.
The allowed characters are (A-Z,0-9,!,",%,?,-,_,(,))
So if the file contains any other characters other than what i mentioned above, it should replace that with spaces. My requirement is basically opposite of what the solution in below link is doing:
ibmmainframes.com/viewtopic.php?t=53172&highlight=findrep
My file is of LRECL=133,Recfm=FB.
Example:
Code: |
AAABBBZZZ11113333[H|S |
I want O/P like below :
Code: |
AAABBBZZZ11113333 H S |
Please suggest me some ideas. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
just get armed with lots of patience and write the all the chars You want to change
something like ( very quick and very dirty )
Code: |
000014 OPTION COPY
000015 INREC FINDREP=(IN=(X'00',X'01',X'02',...,x'ff'),
000016 OUT=X'40') |
skipping the hex You want to keep |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have a look at TRAN=ALTSEQ and ALSTEQ CODE=(....
You code use DFSORT to generate the values, perhaps... |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
mohitsaini,
There is no easier way to replace any character other than the allowed ones. You need to write an exit to do that. |
|
Back to top |
|
|
|