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

! < operation in PL1


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Swetha Rao

New User


Joined: 04 Apr 2012
Posts: 3
Location: India

PostPosted: Wed Apr 04, 2012 1:33 pm
Reply with quote

Hi,

Wanted to know the meaning of this operation in Pl1 programming on mainframe

C = A !< B
where the value of A is 100
B is 50
C is '100100' B

What does !< operation do ? and what is the value assigned to C ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Apr 04, 2012 8:53 pm
Reply with quote

What are the data types of A, B, and C?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Apr 04, 2012 11:59 pm
Reply with quote

Well, I just searched the manual (version 3.5) for ! and it was not found except in its normal usage as an exclamation mark e.g. Note!. So, what version of PL/1 are you using?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Apr 05, 2012 1:57 am
Reply with quote

Nic Clouston wrote:
Well, I just searched the manual (version 3.5) for ! and it was not found except in its normal usage as an exclamation mark e.g. Note!. So, what version of PL/1 are you using?

I suspect that her emulator does not have the logical-OR and logical-NOT symbols defined, and that she is winging it.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Apr 05, 2012 3:57 am
Reply with quote

I found a reference to ! in a 1983 Digital Research manual for PL/1 on DOS. Somehow I do not think that that is the version in question here. But it may not be (probably is not) a mainframe version and so the topic is in the wrong forum. (But I do not know of a PC PL/1 forum)
Back to top
View user's profile Send private message
Swetha Rao

New User


Joined: 04 Apr 2012
Posts: 3
Location: India

PostPosted: Thu Apr 05, 2012 8:50 am
Reply with quote

Thank you to all for your replies.
I just found the answer.

In case of decmials, !< would just mean ( NOT LESS THAN).
in this example, C = A ! < B
Since 100 < 50 (condition is TRUE) and C is a BIT string, '1'B (for TRUE) is assigned to C.

In case of Bit strings, ! would mean (the operator NOT)
If C has the value '1'B then !C will have the value '0'B.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Apr 05, 2012 3:35 pm
Reply with quote

Swetha Rao wrote:
In case of decmials, !< would just mean ( NOT LESS THAN).
in this example, C = A ! < B
Since 100 < 50 (condition is TRUE) and C is a BIT string, '1'B (for TRUE) is assigned to C.

And yet, according to you, the value of C is not '1'B, but '100100'B. How do you explain this discrepancy?
Back to top
View user's profile Send private message
Swetha Rao

New User


Joined: 04 Apr 2012
Posts: 3
Location: India

PostPosted: Thu Apr 05, 2012 4:23 pm
Reply with quote

The initial value of C is '100100'B and the length is 6 (the declaration being DCL C_1 BIT(6) INIT('100100'B); )

After the operation the value of C is '100000' B.

Hope this clarifies the doubt .
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts An write operation error - ABENDED S0... COBOL Programming 3
No new posts Utility for search operation TSO/ISPF 11
No new posts Joinkeys operation when key1 and key2... DFSORT/ICETOOL 5
No new posts Joinkeys operation betwen VB and FB file SYNCSORT 4
No new posts how to eliminate records from operati... DFSORT/ICETOOL 5
Search our Forums:

Back to Top