View previous topic :: View next topic
|
Author |
Message |
srajanbose
New User
Joined: 11 Oct 2004 Posts: 69 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
roopannamdhari Warnings : 1 New User
Joined: 14 Sep 2006 Posts: 71 Location: Bangalore
|
|
|
|
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 |
|
|
|