Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 92

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: 10375
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: 7314

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 SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us