Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort card needed for replace.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 90

PostPosted: Mon Sep 03, 2012 3:52 pm    Post subject: Sort card needed for replace.
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:
http://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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Sep 03, 2012 4:01 pm    Post subject: Reply to: Sort card needed for replace.
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7306

PostPosted: Mon Sep 03, 2012 7:48 pm    Post subject: Reply to: Sort card needed for replace.
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us