Page 1 of 1

BNE doubt equal and different.

PostPosted: Thu Apr 26, 2018 3:04 am
by sngxd
Hello folks

I believe I have a easy question for you but for me is facing some challenge to understand.

In the program I have these variables setups
GUI DC C'UCB'
SPACE
DVIO DC C'VIO'
SPACE

I have a call like this one :
CLC ZUNITADR(3),DVIO
BNE INITM740
SPACE

Is working successfully.
I make a compare and if the 3 first letters from ZUNITADR is different than 'VIO' I go to INITM740.
What I am looking is to make a logic to if 3 letters from ZUNITADR is different than 'VIO' and different than 'UCB' I go to INITM740 but I do not know exactly how parameter to use.

I thought like below but does not work right?

CLC ZUNITADR(3),DVIO,GUI
BNE INITM740
SPACE


Thank you in advance

Re: BNE doubt equal and different.

PostPosted: Thu Apr 26, 2018 6:28 am
by steve-myers
You have to do 2 CLC instructions -

         CLC ZUNITADR,=C'UCB'
         BE ITSUCBVIO
         CLC ZUNITADR,=C'VIO'
         BE ITSUCBVIO
         B INITM740
ITSUCBVIO DC 0H'0'


By the way, since the advent of MVS/XA, unit addresses can be 4 characters, so there is a potential flaw with this code. Check the definition of ZUNITADR to find out what it actually is. If it is 4 characters amend the UCB and VIO character constants as required.