Page 1 of 1

Replace more number of strings.

PostPosted: Mon Nov 14, 2016 10:59 am
by Surabhi
Hello,

I need to replace almost 150 number of strings in my PS File.
I know string replacement is possible with Find and Replace or even Overlay option.
But as there more number of strings which ill have to code in JCL, is there any other option possible?
Like using some kind of template.

Thanks.

Re: Replace more number of strings.

PostPosted: Mon Nov 14, 2016 12:07 pm
by BillyBoyo
I don't understand what you mean by "some sort of template". Can you explain further, in detail?

You are going to need to specify the text to be changed, and what it is to be changed to, however you do it.

Re: Replace more number of strings.

PostPosted: Mon Nov 14, 2016 1:57 pm
by enrico-sorichetti
tel us which sort product is used by Your organisation

messages staring with ICE**** imply IBM DFSORT

messages staring with WER**** imply SYNCSORT


and the topic will be moved to the proper section

Re: Replace more number of strings.

PostPosted: Mon Nov 14, 2016 2:40 pm
by willy jensen
String replacement, or any other kind of data modification, is not done in JCL, it is done by a program. So what program are you using now?
My personal preference for string replacement is the program PDS86 found at http://cbttape.org/. It works both in TSO online and batch.

Re: Replace more number of strings.

PostPosted: Mon Nov 14, 2016 4:18 pm
by Aki88
Hello Surabhi,

Again, multiple ways to approach this problem. Before we jump into it, to replace 'certain' data, the most basic requirements are:
a. What is it that is required to be replaced
b. Where do you want to replace it
c. How many such 'strings/characters/etc' are going to be replaced

Depending upon how many- the approach changes. Refer your last post here, which is doing precisely this using SYMNAMES - condition being - data to be replaced is already housed in a PS dataset. You can couple this information with a conditional check in OUTFIL and BUILD to patch the symbolics in place of characters to be replaced.
In any case- template or otherwise You WILL have to define all the '150 or greater' input data as a program will need something to tell it- what the data is; unless the program doesn't know WHAT to replace with WHAT, it really can't progress in the correct direction. If you're not comfortable with *SORT, recommendation is to use COBOL, which is relatively more simple and can handle a large number of MOVE statements which is basically what a *SORT FINDREP does.

Please note, there is an upper limit to how many FINREP you can use in a given SORT card.

@Mr. Sorichetti, from TS's old posts, they're using DFSORT (unless the user states otherwise now).

Re: Replace more number of strings.

PostPosted: Mon Nov 14, 2016 4:26 pm
by enrico-sorichetti
from TS's old posts, they're using DFSORT


well... then the TS should know better.

NO it is not my duty to chase the TS older posts to find out about his flucking environment .

remember we reply and moderate forums on our own time and free of charge
( straightening out topics, editing posts to use the code tags, ...., ..., ...)

so it is the TS that should provide us timely with the proper and complete info

:evil: :evil: :evil:

Re: Replace more number of strings.

PostPosted: Mon Nov 14, 2016 6:04 pm
by NicC
I'll move it to DFsort.