IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

NI Instruction on LABEL?

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> PL/I & ASSEMBLER
View previous topic :: View next topic  
Author Message
niks_jude



Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

Posted: Mon Jul 21, 2008 12:40 pm    Post subject: NI Instruction on LABEL?  

Can anybody explain the result of this instruction -

NI NOSEP+1,X'0F'

Where NOSEP is a label

NOSEP B SKIP1
LA R8,2
ALIGN1 CLI HALIGN,X'FF'
BER R7
Back to top  
enrico-sorichetti



Joined: 14 Mar 2007
Posts: 3082
Location: italy

Posted: Mon Jul 21, 2008 1:30 pm    Post subject: Reply to: NI Instruction on LABEL?  

it turns a branch into a noop
the branch instruction should be x'47xrbddd'
Code:

47  - opcode
x   - condition code
r   - index register
b   - base register
ddd - offset


doing a x'0f' ni on the second byte will turn the x to a 0


usually is a trick ( now frowned upon ) to take a branch the first time and the fall thru the other times
Back to top  
niks_jude



Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

Posted: Mon Jul 21, 2008 1:33 pm    Post subject:  

That helps.Thanks.
Back to top  
niks_jude



Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

Posted: Mon Jul 21, 2008 2:28 pm    Post subject:  

Oh I got a little confused, please help-

B EXITLP1
EXITLP2 NI MATCH00X+1,0 (this will branch or not and to which subroutine)
BR R7
Back to top  
enrico-sorichetti



Joined: 14 Mar 2007
Posts: 3082
Location: italy

Posted: Mon Jul 21, 2008 2:37 pm    Post subject: Reply to: NI Instruction on LABEL?  

MATCH00X is the branch instruction being modified

if You do not post it we cannot tell

please use the code tag, it will make coding more readable
Back to top  
niks_jude



Joined: 01 Dec 2006
Posts: 81
Location: Mumbai

Posted: Mon Jul 21, 2008 3:22 pm    Post subject:  

These are the two labels/subroutines -


Code: MATCH00X B     PWRRETN


PWRRETN  L     R7,SV7A               
         BR    R7             RETURN
Back to top  
enrico-sorichetti



Joined: 14 Mar 2007
Posts: 3082
Location: italy

Posted: Mon Jul 21, 2008 3:31 pm    Post subject: Reply to: NI Instruction on LABEL?  

the logic is the same as before,

the first time the branch will be taken, the second time not...

if You have problems understanding the program flow
it would be wiser to ask Your peers ( application developers ) about it or try to get the original program specificatons
Back to top  
Bill O'Boyle



Joined: 14 Jan 2008
Posts: 333
Location: Orlando, FL, USA

Posted: Mon Jul 21, 2008 3:38 pm    Post subject: Re: Post subject: NI Instruction on LABEL?  

This could open a can of worms if this code is in CICS.

In my previous life, I had to maintain code that altered instructions, without using an EX, such as inserting a length into a subsequent MVC via an STC *+5.

Don't do this....

Regards,

Bill
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> PL/I & ASSEMBLER
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM