I found it!!!

My existing code - set up access to passed variables and test if we need to 
do anything. (modeled from IBM supplied sample).

*  Set up access to read-only variables.                               
         L     ERO,ACSPAERO                                              
         USING ACERO,ERO            Anchor read-only variables     
*
*  Set up access to read-write variables.                               
         L     ERW,ACSPERW                                              
         USING ACERW,ERW            Anchor read/write variables         
         MVC   ACERWVAL(L'BLANK8),BLANK8                                
*                                                                       
*   Do we need to do anything.                                          
         LA    WORKREG,ACEROVS      Set up test value                   
         C     WORKREG,ACERODSG     Are we VSAM?                        
         BNE   RETURN               If not....ignore                    
         LA    WORKREG,ACERONUL     Set up test value                   
         C     WORKREG,ACERORCG     Do we have a RECORG?                
         BNE   RETURN               If yes....ignore                    
*       

We were failing on the "do nothing" path. ie. dataset was either not VSAM 
or was VSAM and had RECORG set. Then we got validation error on z/OS1.6 and 
not on z/OS1.4.

By moving the read-write addressibility, and especially the initialise 
ACERWVAL field to after the tests, the code now works.

Final code:
*  Set up access to read-only variables.                               
         L     ERO,ACSPAERO                                              
         USING ACERO,ERO            Anchor read-only variables     
*                                                                   
*   Do we need to do anything.                                          
         LA    WORKREG,ACEROVS      Set up test value                   
         C     WORKREG,ACERODSG     Are we VSAM?                        
         BNE   RETURN               If not....ignore                    
         LA    WORKREG,ACERONUL     Set up test value                   
         C     WORKREG,ACERORCG     Do we have a RECORG?                
         BNE   RETURN               If yes....ignore                    
*
*  Set up access to read-write variables.                               
         L     ERW,ACSPERW                                              
         USING ACERW,ERW            Anchor read/write variables         
         MVC   ACERWVAL(L'BLANK8),BLANK8                                
*    

Regards
Bruce Hewson

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to