MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inspect Equivalent in PLI

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mfuser
Banned


Joined: 01 Mar 2005
Posts: 105
Topics: 58

PostPosted: Wed Jul 12, 2006 1:08 pm    Post subject: Inspect Equivalent in PLI Reply with quote

Members,

I would like to know what would be the equivalent of the statement in Cobol to PLI:
Code:

INSPECT WS-VARIABLE REPLACING ALL 'A' BY 'Z'


Can any body help me out in this problem ?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12385
Topics: 75
Location: San Jose

PostPosted: Wed Jul 12, 2006 1:46 pm    Post subject: Reply with quote

mfuser,

Try this

http://www.users.bigpond.com/robin_v/inspect.inc

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Thu Jul 13, 2006 8:27 pm    Post subject: Reply with quote

Use the TRANSLATE builtin function

Code:

DCL WS_VARIABLE CHAR(24) INIT('AXZZ1234HKJHJHEUUIAA    ');
                                                         
WS_VARIABLE = TRANSLATE(WS_VARIABLE,'Z','A');             
                                                         
PUT SKIP DATA(WS_VARIABLE);                               
                                                         
RESULT:                                                   
WS_VARIABLE='ZXZZ1234HKJHJHEUUIZZ    ';                   
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group