Replace more number of strings.



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Replace more number of strings.

Postby Surabhi » Mon Nov 14, 2016 10:59 am

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.
Surabhi
 
Posts: 49
Joined: Thu Sep 10, 2015 7:51 pm
Has thanked: 4 times
Been thanked: 0 time

Re: Replace more number of strings.

Postby BillyBoyo » Mon Nov 14, 2016 12:07 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Replace more number of strings.

Postby enrico-sorichetti » Mon Nov 14, 2016 1:57 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Replace more number of strings.

Postby willy jensen » Mon Nov 14, 2016 2:40 pm

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.
willy jensen
 
Posts: 465
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: Replace more number of strings.

Postby Aki88 » Mon Nov 14, 2016 4:18 pm

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).
Aki88
 
Posts: 381
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times

Re: Replace more number of strings.

Postby enrico-sorichetti » Mon Nov 14, 2016 4:26 pm

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:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Replace more number of strings.

Postby NicC » Mon Nov 14, 2016 6:04 pm

I'll move it to DFsort.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post