BNE doubt equal and different.



High Level Assembler(HLASM) for MVS & VM & VSE

BNE doubt equal and different.

Postby sngxd » Thu Apr 26, 2018 3:04 am

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
sngxd
 
Posts: 14
Joined: Fri May 20, 2016 8:39 am
Has thanked: 0 time
Been thanked: 0 time

Re: BNE doubt equal and different.

Postby steve-myers » Thu Apr 26, 2018 6:28 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to Assembler

 


  • Related topics
    Replies
    Views
    Last post