Orphan control blocks

2017-06-21 Thread John Ganci
Resend: My original reply had subject line "Re: Orphan control blocks". 
Resending with original subject line. Sorry about that.

This *may* be the classical problem described in Principles of Operation, 
SA22-7832-10. 

Look at the description of COMPARE AND SWAP and COMPARE DOUBLE AND SWAP 
beginning on page 7-127. In particular, note 4 in the Programming Notes on page 
7-128 -- 7-129. 

Finally, Appendix A has sample code you should examine. See the "Free Pool 
Manipulation" section that begins on page A-50. Compare the code you supplied 
with the ADD TO FREE LIST Routine on page A-51.

Regards,

John Ganci

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Orphan control blocks

2017-06-21 Thread John Ganci
This *may* be the classical problem described in Principles of Operation, 
SA22-7832-10. 

Look at the description of COMPARE AND SWAP and COMPARE DOUBLE AND SWAP 
beginning on page 7-127. In particular, Note 4 in the Programming Notes on page 
7-128 -- 7-129. 

Finally, Appendix A has sample code you should examine. See the "Free Pool 
Manipulation" section that begins on page A-50. Compare the code you supplied 
with the ADD TO FREE LIST Routine on page A-51.

Regards,

John Ganci

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: Orphan control blocks

2017-06-19 Thread Greg Dyck

On 6/19/2017 11:51 AM, Donald Likens wrote:

Does anyone see any problems with the following code... Updating free space 
pointer.


To fully understand the possibilities for error you would need to show 
both sides of the processing, allocation and freeing.  In cases like 
this there is almost always an unintended interaction between the two.


Regards,
Greg

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Orphan control blocks

2017-06-19 Thread Donald Likens
Does anyone see any problems with the following code... Updating free space 
pointer.

*C DO UNTIL SBLKFREE IS SET 
 
*C   SET R6 = CSALSBLK.SBLKFREE (ADDRESS TO PUT STORAGE)
 
 LG   R5,CSALSBLK   01-SBLK 
 
 LG   R6,SBLKFREE-MSBLKCB(,R5)  01-SBLK 
 
SBDOA0008DS 0H  01-SBLK 
 
*C   SET R8 = CSALSBLK.SBLKFREE + ROUND()
 
 LGR  R8,R6 01-SBLK 
 
 AGR  R8,R7 01-SBLK 
 
*C   SET SBLKFREE = SBLKEOBA (SERIALIZED)   
 
*C*  MAY PUT SBLKFREE PAST SBLKEOBA BUT WILL NOT USE IT, IF DOES (not 
likely in middle!) 
 CSG   R6,R8,SBLKFREE-MSBLKCB(R5)   01-SBLK 
 
*IF SBLKFREE = R6, STG R8 SBLKFREE  
 
 BC4,SBDOA0008   ELSE GOTO SBDOA 01-SBLK 
 

It seems correct to me but I have one user that has problems with orphan 
control blocks once in a while and would like your thoughts.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN