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
 

 

how to check the spaces in IF condition in PL1 language

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

New User


Joined: 11 Oct 2004
Posts: 69
Location: chennai

PostPosted: Thu Mar 27, 2008 8:04 pm    Post subject: how to check the spaces in IF condition in PL1 language
Reply with quote

Hi,

I am working in PL1 interface language; It is almost similar to source PL1;
Here the problem is, i am getting the return code spaces ( ie ' '; ims return code)

In this scenario, i need to validate these spaces in IF conditon;; I have coded like this IF RETUCODE = ' ' THEN
DO;
WRITE(' EXECUTE SUCCESSFUL');
END;
ELSE
DO;
WRITE('UNSUCCESFUL EXECUTION');
END;

The control is not going to IF part, it is going to ELSE part and throughs message UNSUCESSFUL EXECUTION.

I beleive there may be some problem in checking the spaces in IF condition;Please let me know if any one aware about this problem and help me out;
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Thu Mar 27, 2008 8:11 pm    Post subject: Reply to: how to check the spaces in IF condition in PL1 lan
Reply with quote

Quote:
It is almost similar to source PL1;


is similar or not ???

are You using a single space or a double space in Your constant

... if something = 'bb'

or... if something = 'b'

the b stands for a blank
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Thu Mar 27, 2008 9:24 pm    Post subject:
Reply with quote

Should be OK except if RETUCODE has numeric values ???
Also help yourself, place a PUT SKIP before testing and you will see.

Regards
Pierre
Back to top
View user's profile Send private message
roopannamdhari
Warnings : 1

New User


Joined: 14 Sep 2006
Posts: 71
Location: Bangalore

PostPosted: Fri Apr 04, 2008 9:51 am    Post subject:
Reply with quote

Hi,

Suppose "RETUCODE" is of size 50 byte, in this case it is not possible to give 50 spaces in condition like

Code:
if retucode = 50 time 'b'(b stands for space)


so is there any option in PL\1 which serves function similar to Keyword 'SPACE' in Cobol?


In COBOL just we can need to code:

Code:
if retucode = space


Thanks,
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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am


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