View previous topic :: View next topic
|
Author |
Message |
nehrujee
New User
Joined: 25 Oct 2007 Posts: 8 Location: Kolkata
|
|
|
|
Hi,
I would like to know the code snippet for String Replacement in PL1.
Source String = ' PL1 programming example'
In the above SourceString I need to replace
' programming ' with ' language '
And the output should be = ' PLI Language example'
Thanks in Advance. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There's a link at the top of the page to manuals, including the PL/I Language Reference. Look up INDEX and SUBSTR in that manual, then think about how they could be used for your requirement. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Review the SUBSTR function, using a variable (FIX BIN (15) would be best) for the "starting point" together with a hard-coded length in a DO WHILE loop.
Regards, |
|
Back to top |
|
|
|