Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Facing problem in STRIP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Facing problem in STRIP
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Jan 03, 2011 6:25 pm    Post subject: Reply to: Facing problem in STRIP
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
http://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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us