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
 

 

SBAL Instruction

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Mon Aug 10, 2009 1:32 pm    Post subject: SBAL Instruction
Reply with quote

Hi ,

I encountered following instruction in a program ,

Code:

         AP    RECCT2HE,RECCT2C0 
         SBAL  R07,LON1000       
         ZAP   RECCT1C0,=P'0'     


Could any body help me in understanding , wat does SBAL stands for and wat it does?

Thanks
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1018
Location: Oostende, Belgium

PostPosted: Mon Aug 10, 2009 1:34 pm    Post subject:
Reply with quote

Ever considered looking it up on Google or in a manual?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Mon Aug 10, 2009 2:27 pm    Post subject: Reply to: SBAL Instruction
Reply with quote

the best thing would be to ask the programmer who wrote the code
looking together at the assembler listing
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Aug 10, 2009 3:29 pm    Post subject: Reply to: SBAL Instruction
Reply with quote

This instruction does not appear in any POPS manual, which indicates that it is most likely, a home-grown Macro.

What happens when you Assemble the program?

Does SBAL expand correctly or does the Assembler find it unrecognisable?

I don't ever recall such an instruction.

It looks like a customised "BAL" instruction of some sort, based upon the "Rx,Label" convention and the prefixed "S".

You need to speak with the author and attempt to resolve it together....

Bill
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Mon Aug 10, 2009 3:43 pm    Post subject:
Reply with quote

Hi ,

Even in the listing it is behaving diffrently , the first SBAL expaned as 0700 and the second one expaned as 5070A460 ,

It appears as if it behaves similar to BAL ( as per code analysis) , I dont understand how it could give different listing ?




Code:

0700                               6679          SBAL  R07,WHLD703P   
                                   6686 *                             
               00000448            6687 WRITT73L EQU   *             
95E8 C3D2      000013D1            6688          CLI   REC703L1,C'Y' 
4770 A464               00000464   6689          BNE   WRITT705       
5070 A460               00000460   6690          SBAL  R07,WHLD703L   
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Aug 10, 2009 3:54 pm    Post subject: Reply to: SBAL Instruction
Reply with quote

Ensure that PRINT GEN is specified in the program so that SBAL can be expanded.

The 0700 indicates the Assembler is attempting alignment.

OPCODE 50 is a ST (RX format) instruction and the remainder concludes it's a ST.

I don't understand why someone would make a ST this complicated?

Cleverness without documentation leads to confusion and unanticipated "opportunities".

Bill
Back to top
View user's profile Send private message
Pankaj Shrivastava
Currently Banned

New User


Joined: 24 Jul 2009
Posts: 51
Location: Pune

PostPosted: Mon Aug 10, 2009 4:08 pm    Post subject:
Reply with quote

Hi Bill,

It turned out to be a macro and the whole buzz was to just resuse the reigister. This has been wriiten just to screw the programmer like me icon_cry.gif

Thanks Bill for your help , It speeded my analysis.





Code:

                                   6691          SBAL  R07,WHLD703L
                                   6692+         CNOP  0,4         
5070 A460               00000460   6693+         ST    R07,*+16     
4570 A750               00000750   6694+         BAL   R07,WHLD703L
5870 A460               00000460   6695+         L     R07,*+8     
47F0 A464               00000464   6696+         B     *+8         
00000000                           6697+         DC    F'0'         
                                   6698          PRINT NOGEN       
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Aug 10, 2009 4:32 pm    Post subject: Reply to: SBAL Instruction
Reply with quote

If this Macro is used in CICS/Assembler, it introduces non-reentrant code.

But regardless, branching using current location counter plus "whatever" can bite you quicker than a scorpion in your shorts.

If someone adds an instruction, storage, etc, within the range of the branch, you're probably going to get a S0C1 (invalid OPCODE) or perhaps, execute an instruction that wasn't supposed to be executed.

Branching to labels is always the best approach and (IMHO) should always be done this way.

Bill
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Interpret instruction not working in ... spoorni CLIST & REXX 2 Fri Feb 07, 2014 10:22 pm
No new posts Displaying the value set by the EXIT ... Ricardo Viegas CLIST & REXX 12 Tue Dec 03, 2013 5:17 am
No new posts Data studio(for zos) instruction manual srilata83 DB2 2 Fri Jan 18, 2013 10:37 am
No new posts AL1(XXX) usage in DC instruction yugendran PL/I & Assembler 1 Thu Dec 06, 2012 3:59 pm
No new posts Assembler compare instruction Arunkumar Chandrasekaran PL/I & Assembler 3 Thu Jul 19, 2012 11:49 pm


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