Where do you set R1?

On Tue, 25 Oct 2016 11:25:02 -0500 Donald Likens <[email protected]>
wrote:

:>I posted before on this issue and you all were a great help because I was 
using CS and PLO to serialize. However I changed the code and the issue still 
exists. The issue looks like, I create a control block but it does not get 
added to the chainÂ… I think the term is orphan. The control block structure is 
above the bar, FIFO, and has a first and last pointer. The entries in the chain 
are removed by one address space and added-to in many address spaces.
:>
:>Here is the code to add the control block to the chain:
:>
:>*C     R8 = address of newly built control block
:>DOX378   DS    0H 
:>*C     SET R6 = LAST_CONTROL_BLOCK_ADDR                                       
         
:>         LG    R6,LAST_CONTROL_BLOCK_ADDR                                     
         
:>*C     IF FIRST_CONTROL_BLOCK_ADDR AND LAST_CONTROL_BLOCK_ADDR EQ 0           
                         
:>*C         SET FIRST_CONTROL_BLOCK_ADDR AND LAST_CONTROL_BLOCK_ADDR = NEW 
Control_block ADDRESS               
:>         STG   R8,OPERAND1R           (REPLACES LAST_CONTROL_BLOCK_ADDR)      
         
:>         XC    OPERAND1,OPERAND1      (COMPARISON VALUE)                
:>         XC    OPERAND3,OPERAND3      (COMPARISON VALUE)                
:>         STG   R8,OPERAND3R           (REPLACES WHERE OPERAND4 POINTS)  
:>         LA    R0,DCSG                                                  
:>         LGR   R3,R8                                                    
:>         LA    R4,FIRST_CONTROL_BLOCK_ADDR                                    
          
:>         STG   R4,OPERAND4                                              
:>         PLO   0,LAST_CONTROL_BLOCK_ADDR,0,PL                                 
         
:>*                                                                       
:>*  IF DOUBLE COMPARE AND SWAP IS SPECIFIED, THE FIRSTOPERAND          
:>*  COMPARISON VALUE AND THE SECOND                                    
:>*  OPERAND ARE COMPARED. IF THEY ARE EQUAL, THE                       
:>*  THIRD-OPERAND COMPARISON VALUE AND THE FOURTH                      
:>*  OPERAND ARE COMPARED. IF BOTH COMPARISONS INDICATE                 
:>*  EQUALITY, THE FIRST-OPERAND AND THIRD-OPERAND                      
:>*  REPLACEMENT VALUES ARE STORED AT THE SECONDOPERAND                 
:>*  LOCATION AND FOURTH-OPERAND LOCATION,                              
:>*  RESPECTIVELY. IF THE FIRST COMPARISON INDICATES INEQUALITY,        
:>*  THE SECOND OPERAND IS PLACED IN THE FIRSTOPERAND-                  
:>*  COMPARISON-VALUE LOCATION AS A NEW FIRSTOPERAND                    
:>*  COMPARISON VALUE. IF THE FIRST COMPARISON                          
:>*  INDICATES EQUALITY BUT THE SECOND DOES NOT, THE                    
:>*  FOURTH OPERAND IS PLACED IN THE THIRD-OPERANDCOMPARISON-           
:>*  VALUE LOCATION AS A NEW THIRD-OPERAND                              
:>*  COMPARISON VALUE.                                                  
:>*                                                                     
:>*C       ELSE                                                         
:>         BC    8,EDOX378        (if success ... done)                         
             
:>*C IF LAST_CONTROL_BLOCK_ADDR = R6 (ORIGINAL LAST_CONTROL_BLOCK_ADDR VALUE)   
                        
:>*C   SET LAST_CONTROL_BLOCK_ADDR = POINTER_TO_NEW_MSEG (R8)                   
         
:>*C   SET NEXT_CONTROL_BLOCK_ADDRESS.OF.LAST.ONCHAIN= POINTER_TO_NEW_MSEG (R8) 
            
:>         STG   R6,OPERAND1            (COMPARISON VALUE)                
:>         STG   R8,OPERAND1R           (REPLACEMENT VALUE)               
:>         LA    R0,CSSTG                                                 
:>         LGR   R3,R8                                                    
:>         DROP  R8                                                       
:>         USING MSEGCB,R6                                                
:>         LA    R4,NEXT_CONTROL_BLOCK_ADDRESS   NEXT_CONTROL_BLOCK_ADDRESS IS 
IN CSA                         
:>         STG   R4,OPERAND4                                              
:>         STG   R8,OPERAND3R                                             
:>         PLO   0,LAST_CONTROL_BLOCK_ADDR,0,PL                                 
         
:>*  THE FIRST-OPERAND COMPARISON VALUE AND THE SECOND OPERAND ARE        
:>*  COMPARED.  IF THEY ARE EQUAL, THE FIRST-OPERAND REPLACEMENT VALUE    
:>*  IS STORED AT THE SECOND-OPERAND LOCATION, AND THE THIRD OPERAND IS   
:>*  STORED AT THE FOURTH-OPERAND LOCATION.                               
:>         BNZ   DOX378           (if not successful start over)                
                        
:>EDOX378  DS    0H                                                             
      
:>Here is the code to remove the control block from the chain.
:>*C IF NEXT_CONTROL_BLOCK_ADDRESS = 0                                          
            
:>*C   SET LAST_CONTROL_BLOCK_ADDR = 0                                          
         
:>*C   SET FIRST_CONTROL_BLOCK_ADDR = 0                                         
          
:>         XC    OPERAND1,OPERAND1      (COMPARISON VALUE)                
:>         XC    OPERAND1R,OPERAND1R    (REPLACEMENT VALUE)               
:>         LA    R0,CSDSTG                                                
:>         XGR   R3,R3                                                    
:>         LA    R4,LAST_CONTROL_BLOCK_ADDR                                     
         
:>         STG   R4,OPERAND6                                              
:>         LA    R4,FIRST_CONTROL_BLOCK_ADDR                                    
          
:>         STG   R4,OPERAND4                                              
:>         STG   R3,OPERAND3                                              
:>         STG   R3,OPERAND5                                              
:>         PLO   0,NEXT_CONTROL_BLOCK_ADDRESS,0,PL                              
            
:>*  OPERAND1 IS COMPARED TO NEXT_CONTROL_BLOCK_ADDRESS.                        
            
:>*  IF EQUAL, OPERAND1R IS MOVED TO NEXT_CONTROL_BLOCK_ADDRESS.                
            
:>*    OPERAND3 IS MOVED TO WHERE OPERAND 4 POINTS                        
:>*    OPERAND5 IS MOVED TO WHERE OPERAND 6 POINTS                        
:>*  IF NOT EQUAL, SET OPERAND1 = NEXT_CONTROL_BLOCK_ADDRESS VALUE.             
            
:>*C ELSE                                                                 
:>         BNZ   ELIFM045           (if not successful... means next control 
block address not zero)  
:>         B     EIFM045               
:>ELIFM045 DS    0H                    
:>*C   SET FIRST_CONTROL_BLOCK_ADDR = NEXT_CONTROL_BLOCK_ADDRESS         
:>         MVC   FIRST_CONTROL_BLOCK_ADDR,NEXT_CONTROL_BLOCK_ADDRESS     (Not 
serialized because only update by add process when it is zero and the unchain 
process is the only place it is set to zero) 
:>EIFM045 DS     0H                    
:>
:>I know this has been successfully performed by others, in fact there probably 
should be some standard way to do this, however I have not found it. Any help 
is appreciated. I am at a loss.
:>
:>----------------------------------------------------------------------
:>For IBM-MAIN subscribe / signoff / archive access instructions,
:>send email to [email protected] with the message: INFO IBM-MAIN

--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to