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

Builtin in PL/1 for last non-blank character


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Thu Jan 28, 2010 9:03 pm
Reply with quote

Hi!
Is there a builtin function in PL/1 to locate the last non-blank character of a string?

Will verify help in this case?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 28, 2010 9:42 pm
Reply with quote

it depends if the string has embedded blanks or not!
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Thu Jan 28, 2010 9:52 pm
Reply with quote

If I have a string like
Code:
'ABCD DEFGH IJK '
will I be able to locate 'K' or the position of 'K' using PL/1 builtin?
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: Thu Jan 28, 2010 10:15 pm
Reply with quote

You can use a combination of functions to achieve your goal, but I don't remember any single function that will do what you want.
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Thu Jan 28, 2010 10:18 pm
Reply with quote

oh! that will do.
What would be those built-in functions?

Is it possible atleast to locate 'K' in
Code:
'ABCDEFGHIJK '

using single built-in function
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Jan 28, 2010 10:37 pm
Reply with quote

Hi,
Quote:
What would be those built-in functions?

INDEX or VERIFY or SEARCH ?

Please refer Enterprise PL/I - Language Reference manual for more details.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Jan 29, 2010 4:06 am
Reply with quote

Enterprise PL/I, don't know when this variant of VERIFY was introduced:

VAR = VERIFYR(String, ' ');
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 Panvalet - 9 Character name - Issue c... CA Products 6
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts String has hex character need to conv... COBOL Programming 3
No new posts Output LREC based on specific character DFSORT/ICETOOL 22
No new posts Replacing character string in file th... JCL & VSAM 9
Search our Forums:

Back to Top