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
 
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: 10309
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 BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts StreamWeaver language reference chetanambi Compuware & Other Tools 1 Wed Jul 05, 2017 12:50 pm
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am

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