MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pli bit operator

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
shekar123
Advanced


Joined: 22 Jul 2005
Posts: 528
Topics: 90
Location: Bangalore India

PostPosted: Tue May 02, 2006 3:39 pm    Post subject: pli bit operator Reply with quote

Hai All,

I have a declaration in a PLI program like
Code:

DCL A_EOFSW   BIT (1);
ON ENDFILE (A)                                                 
   A_EOFSW = ON;     


Is it necessary to declare
Code:

DCL ON  BIT(1) INIT('0'B);
DCL OFF BIT(1) INIT('1'B);

My intention is to have on end file ,no records switch to on ?
_________________
Shekar
Grow Technically
Back to top
View user's profile Send private message
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Tue May 02, 2006 6:22 pm    Post subject: Reply with quote

Yes it is necessary to declare ON, but you do not need to declare OFF unless you are going to use it.

Also, you should be initialising "ON" to '1'B and OFF to '0'B.

This will allow the following expressions to return a true result if any of the bits in A_EOFSW are set on (i.e. '1'B):

If A_EOFSW
then ....

or

Do While (
Back to top
View user's profile Send private message
bauer
Intermediate


Joined: 10 Oct 2003
Posts: 315
Topics: 49
Location: Germany

PostPosted: Mon May 08, 2006 3:10 am    Post subject: Reply with quote

Hi,

if you declare ON as preporcessor variable

Code:

%DCL ON CHAR ;
%ON = '''1'B'' ;


it may be better regarding performance considerations.

bauer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group