IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort card needed for replace.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Mon Sep 03, 2012 3:52 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Sep 03, 2012 4:01 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Sep 03, 2012 7:48 pm
Reply with quote

Have a look at TRAN=ALTSEQ and ALSTEQ CODE=(....

You code use DFSORT to generate the values, perhaps...
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 04, 2012 10:47 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top