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: 10210
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: 7251

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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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