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
 
SUBSTR question in PL/I

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

New User


Joined: 23 Nov 2006
Posts: 22
Location: India

PostPosted: Tue Nov 30, 2010 4:25 am    Post subject: SUBSTR question in PL/I
Reply with quote

I have the following string with comma at the end
NAME = "ABCDEFGH IJKLMN OPQRSTU,"

output = SUBSTR(NAME,26,-1) || ' ' || SUBSTR(NAME,1,23)

I am getting the following output,
With PL/I compiler V2.7 ---->ABCDEFGH IJKLMN OPQRSTU
With PL/I compiler V3.4 ----> ABCDEFGH IJKLMN OPQRSTU
an additional space is prefixed in string output in the Enterprise compiler (V3.4)

How would the above SUSBTR work in PL/I compiler V2.7 & V3.4? What is the difference?

I am not getting any exceptions like STRINGRANGE but an additional space is coming ahead of the string output of the enterprise compiler. Please assist

Advanced thanks for your help!
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Tue Nov 30, 2010 2:31 pm    Post subject:
Reply with quote

The third argument of SUBSTR cannot be negative (no clue what you are trying to achieve), so behavior is undefined.
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 question about dfsms management clas... Hervey Martinez IBM Tools 0 Tue Oct 10, 2017 6:19 pm
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am
No new posts QUESTION: RETURN CHANNEL pahiker CA Products 21 Thu Apr 20, 2017 12:31 am
No new posts The Last Two Question For You To Ask ... CaptBill Mainframe Interview Questions 0 Fri Apr 14, 2017 5:42 am
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm

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