IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Facing problem in STRIP


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MadanVS

New User


Joined: 28 Dec 2010
Posts: 25
Location: Chennai

PostPosted: Mon Jan 03, 2011 5:59 pm
Reply with quote

I want to remove lead xx alone in my string. I am facing incorrect call to routine error when i try to execute this code:
Code:

SAY                 
SAY                 
SAY                 
LCF = 'XX'           
M = "XXXMADAN"     
SAY " M : " M       
NAME=STRIP(M,,LCF)   
SAY "NAME : " NAME   



Code:
NAME=STRIP(M,,LCF)   
i am getting MADHAN in output.

I want XMADAN in my output. Can any one throw some light on this?


thanks
Madan
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jan 03, 2011 6:25 pm
Reply with quote

Quote:
Can any one throw some light on this?


why not take a closer look at the manual
seems to me that Your understanding of how STRIP works is a bit foggy
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A370/4.3.55?SHELF=IKJ4BK90&DT=20060626210253

( both from a logic and coding points of view )

anyway what You want to do cannot be achieved using STRIP


Code:
data = "notxxsomething"
data = "xxsomething"
data = "xx"

tokn = "xx"

if left(data,length(tokn)) = tokn then ,
   data = substr(data,length(tokn)+1)

say data
Back to top
View user's profile Send private message
MadanVS

New User


Joined: 28 Dec 2010
Posts: 25
Location: Chennai

PostPosted: Tue Jan 04, 2011 4:00 pm
Reply with quote

Thanks enrico

Its working
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Facing ABM3 issue! CICS 3
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
Search our Forums:

Back to Top