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

how to check the spaces in IF condition in PL1 language


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

New User


Joined: 11 Oct 2004
Posts: 69
Location: chennai

PostPosted: Thu Mar 27, 2008 8:04 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Mar 27, 2008 8:11 pm
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: 459
Location: Belgium

PostPosted: Thu Mar 27, 2008 9:24 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts How to check whether who renamed the ... JCL & VSAM 3
Search our Forums:

Back to Top