Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

! < operation in PL1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
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    Post subject: ! < operation in PL1
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: 1738
Location: Bloomington, IL

PostPosted: Wed Apr 04, 2012 8:53 pm    Post subject:
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: 1717
Location: UK

PostPosted: Wed Apr 04, 2012 11:59 pm    Post subject:
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: 1738
Location: Bloomington, IL

PostPosted: Thu Apr 05, 2012 1:57 am    Post subject:
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: 1717
Location: UK

PostPosted: Thu Apr 05, 2012 3:57 am    Post subject:
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    Post subject: Reply to: ! < operation in PL1
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: 1738
Location: Bloomington, IL

PostPosted: Thu Apr 05, 2012 3:35 pm    Post subject: Re: Reply to: ! < operation in PL1
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    Post subject: Reply to: ! < operation in PL1
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    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Joinkeys operation betwen VB and FB file Susanta SYNCSORT 4 Sun Sep 25, 2016 9:49 pm
No new posts how to eliminate records from operati... PUMA DFSORT/ICETOOL 5 Tue Dec 23, 2014 4:42 pm
No new posts Operation with 3 files sun_job DFSORT/ICETOOL 5 Wed Oct 15, 2014 6:46 pm
No new posts File operation sakthikumarT CICS 6 Sun Oct 12, 2014 10:03 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us