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
 
Pl1 String Replacement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
nehrujee

New User


Joined: 25 Oct 2007
Posts: 8
Location: Kolkata

PostPosted: Mon Feb 23, 2009 8:42 pm    Post subject: Pl1 String Replacement
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Feb 23, 2009 8:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Mon Feb 23, 2009 8:59 pm    Post subject: Reply to: Pl1 String Replacement
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts change string before sertan string anatol DFSORT/ICETOOL 8 Tue Aug 15, 2017 5:43 pm

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