Hi All,

I am trying to overcome a FS 93(exclusive control lock) error in a cobol 
program using IAM files. (I am told that IAM file is functionally similar 
to VSAM.)

Now, we issue a CLOSE and OPEN on the file to release the lock. But it is 
a huge perfomance overhead as this file is being used in 27 subroutines.

I am trying to issue ENDREQ macro to release the lock. I have checked with 
IAM guys and they say that ENDREQ will work on IAM.

Problem is 
1) Control does not return back from the assembler program to the calling 
COBOL program. 
Instead it loops the last WTO statement continously (ANUASM: ENDREQ1 ENDS)

2) Will what I am doing solve the issue of releasing the exclusive control 
lock

My cobol code:

           OPEN I-O XS-CIFFFIL                                          
           IF  CIFF-FS  = '97'
           CALL 'ENDREQ1'       
           END-IF

My assembler code:

ENDREQ1  CSECT             
ENDREQ1  AMODE 31          
ENDREQ1  RMODE 24          
         SAVE   (14,12)    
         BALR   R12,0      
         USING  *,R12      
         ST     R13,SAVE13 
OPEN1    DS     0H 
         OPEN   (ASPACB)            
         LTR    RF,RF               
         BNZ    OPENERR             
* ENDREQ                                            
         ENDREQ RPL=ASPRPL                 
         B      RETURN1                    
OPENERR  DS     0H                                  
         STM    0,15,WTOSAVE                        
         WTO    'ANUASM: ENDREQ OPENERR'            
         DEBUGMAC R,VAR=15,TEXT='OPEN ERROR',LEN=4   MACRO to display 
value of R15
         LM     0,15,WTOSAVE                        
RETURN1  DS     0H                          
         STM    0,15,WTOSAVE                
         WTO    'ANUASM: ENDREQ1 ENDS'    
         LM     0,15,WTOSAVE                
         L      R13,SAVE13                            
*
         SR    15,15      
         RETURN (14,12),RC=(15)                       
ASPACB   ACB   AM=VSAM,DDNAME=XSCIFF,MACRF=(KEY,DIR,SEQ,IN)
ASPRPL   RPL   ACB=ASPACB,OPTCD=(KEY,DIR,MVE,UPD,KEQ,FKS),            **
               KEYLEN=21,ARG=KEY,AREALEN=100                            
WTOSAVE  DS     16F   
SAVE13   DS     F     
         END

Thanks & regards,
Anu

----------------------------------------------------------------------
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