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

Examine and Inspect Equivalent in PL1.


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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: 459
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:00 am
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Sep 09, 2008 12:05 am
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: 459
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:10 am
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
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: 459
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:22 am
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
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: 459
Location: Belgium

PostPosted: Tue Sep 09, 2008 12:53 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts File matching functionality in Easytr... DFSORT/ICETOOL 14
No new posts Cobol Db2 program (inserting Char Equ... COBOL Programming 0
No new posts Rexx STRIP Equivalent function in CLIST CLIST & REXX 5
No new posts OUTTRAP Equivalent function in CLIST CLIST & REXX 5
No new posts Love it here, But what is the equival... General Talk & Fun Stuff 1
Search our Forums:

Back to Top