Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Builtin in PL/1 for last non-blank character

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: Builtin in PL/1 for last non-blank character
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10374
Location: italy

PostPosted: Thu Jan 28, 2010 9:42 pm    Post subject: Reply to: Builtin in PL/1 for last non-blank character
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    Post subject: Reply to: Builtin in PL/1 for last non-blank character
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: 8199
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jan 28, 2010 10:15 pm    Post subject:
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    Post subject: Reply to: Builtin in PL/1 for last non-blank character
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: 788
Location: Chennai, India

PostPosted: Thu Jan 28, 2010 10:37 pm    Post subject:
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: 1072
Location: Oostende, Belgium

PostPosted: Fri Jan 29, 2010 4:06 am    Post subject:
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    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 Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts Continuation Character ballaswaroop SYNCSORT 8 Thu Aug 25, 2016 4:46 pm
No new posts Adding a descending character to a file Steve Ironmonger DFSORT/ICETOOL 3 Fri Jul 15, 2016 4:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us