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
 

 

Examine and Inspect Equivalent in PL1.

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

New User


Joined: 21 Sep 2007
Posts: 35
Location: kolkata

PostPosted: Mon Sep 08, 2008 10:47 pm    Post subject: Examine and Inspect Equivalent in PL1.
Reply with quote

Can anyone tell me Examine and Inspect Equivalent in PL1.
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:00 am    Post subject:
Reply with quote

quickly said, see in reference manual

SEARCH SEARCHFR TRANSLATE ...

What a pleasure to read manual !
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Sep 09, 2008 12:05 am    Post subject:
Reply with quote

Quote:
What a pleasure to read manual !
Okay, sarcasm on a Monday ... or you've got a really, really, really, really different interpretation of "pleasure" than I do.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:10 am    Post subject:
Reply with quote

Okay ! You also can learn in a modern education class listening to a marvellous teacher.

icon_smile.gif
Back to top
View user's profile Send private message
saubhik

New User


Joined: 21 Sep 2007
Posts: 35
Location: kolkata

PostPosted: Tue Sep 09, 2008 12:16 am    Post subject: Reply to: Examine and Inspect Equivalent in PL1.
Reply with quote

I will be glad if someone can explain me by giving some examples.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:22 am    Post subject:
Reply with quote

Can you give more details on your requirements?

I guess you are a specific need. If not, like I said, read manual always help.
Back to top
View user's profile Send private message
saubhik

New User


Joined: 21 Sep 2007
Posts: 35
Location: kolkata

PostPosted: Tue Sep 09, 2008 12:33 am    Post subject: Reply to: Examine and Inspect Equivalent in PL1.
Reply with quote

I have a string containing character * and & and i want to remove this character by space or something.It is possible in cobol..but how is it possible in PL1.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:53 am    Post subject:
Reply with quote

You can use TRANSLATE

Quote:

TRANSLATE ( x, y z )

x Character expression to be searched for possible translation of its characters.

y Character expression containing the translation values of characters.

z Character expression containing the characters that are to be translated. If z is omitted, it defaults to collate().


TRANSLATE operates on each character of x as follows:

If a character in x is found in z, the character in y that corresponds to that in z is copied to the result; otherwise, the character in x is copied
directly to the result. If z contains duplicates, the leftmost occurrence is used.

y is padded with blanks, or truncated, on the right to match the length of z.

Any arithmetic or bit arguments are converted to character. TRANSLATE does not support GRAPHIC or WIDECHAR data.


Code:
ZONA = TRANSLATE(ZONO,' ',',');


or code within a loop

DO I = 1 To ... UNTIL ( .... );
code...
END;
Back to top
View user's profile Send private message
murugan_mf

Active User


Joined: 31 Jan 2008
Posts: 148
Location: Chennai, India

PostPosted: Tue Sep 09, 2008 4:39 pm    Post subject:
Reply with quote

Code:
DCL X CHAR(LENGTH(SOURCE))
X=TRANSLATE(SOURCE,'*&','  ')
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 Inspect statement spoorni COBOL Programming 5 Mon Jun 06, 2016 9:53 pm
No new posts Using Inspect in cobol Ajay Dwivedi COBOL Programming 8 Sat Sep 26, 2015 11:33 pm
No new posts EQUIVALENT OF COBOL INSPECT IN REXX pshongal CLIST & REXX 2 Fri Nov 22, 2013 10:44 am
No new posts Find the occurrence of keywords using... suraaj COBOL Programming 15 Fri Aug 30, 2013 8:27 pm
No new posts Inspect using replace dharmaraok COBOL Programming 9 Fri Aug 16, 2013 10:28 pm


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