Page 1 of 1

S0C1 after recent upgrade

PostPosted: Wed Aug 24, 2022 8:06 pm
by Misha786
Hello -
Recently there was an upgrade activity done by our client's ZOS team. It did not upgrade COBOL/PLI or assembler though. Upgrade was related to XPED/JOBSCAN/SORT and few other products those are being used by the client.

But, since then 2/3 jobs are failing with S0C1. All the three are failing on same COBOL program A5XNGXB0 when it is trying to call a assembler pgm A5XAIOB0
Note :
a. assembler pgm A5XAIOB0 was last touched in 2005
b. Cobol pgm A5XNGXB0 was last touched in 2020

Abend-AID ----------------- Diagnostic Summary -------- Row 000001 of 000080
 COMMAND ===>                                                SCROLL ===> PAGE
                                                                             
 An operation exception occurred during execution of program A5XNGXB0. The  
 expected completion code is S0C1.                                          
                                                                             
 Analysis of Error                                                          
                                                                             
  The operation exception occurred in the following statement:              
                                                                             
 007134   000860     CALL 'A5XAIOB0' USING  WIO-COMMAREA                    
 007135   000870                            WIO-REC                          
 007136   000880                            WIO-K-KEY.                      
                                                                             
 This statement is contained in paragraph IO000-GEN-IO-RTN in program        
 A5XNGXB0 .                                                                  
                                                                             
 Current values of fields on this statement:                                
                                                                             
 Level/Field Name                       Picture/Type        Value            
 02 WIO-COMMAREA                                                            
 02 WIO-REC                                                                  
 02 WIO-K-KEY                                                                


When I see the WIO-REC structure it is defined as below


02 WIO-COMP-CONSTANTS                                                
 03 WIO-MAX-REC-LENGTH                         VALUE +22750          
                                   S9(08)   COMP      +22750        
 03 WIO-MAX-KEY-LENGTH                         VALUE +60            
                                   S9(04)   COMP      +60            
02 WIO-LAST-UPD-REL                            VALUE '500'          
                                   X(03)              500            
02 WIO-LAST-UPD-REL-LVL                        VALUE SPACES          
                                   X(02)              SPACES        
02 WIO-K-KEY                                                        
 03 WIO-K-PZ-ID                    X(02)              GF            
01 WS-GENERIC-REC                                                          
 02 WIO-REC                                                                
  03 WIO-PZ-ID                      X(02)              GF                  
  03 WIO-CI-ID                      X(02)              AF                  
  03 WIO-REC-ID                     X(02)              TC                  
  03 WIO-REST-OF-REC                X(22594)         X'C3F0F3F8F6F8F3F1F0F0
 02 WS-T-GEN-REC-TBL-G              REDEFINES WIO-REC                      
  03 WS-T-GEN-REC-BYTE              OCCURS 22600 TIMES                    
  03 WS-T-GEN-REC-BYTE(1)           X(01)              G                  
  03 WS-T-GEN-REC-BYTE(2)           X(01)              F                  
  03 WS-T-GEN-REC-BYTE(3)           X(01)              A                  


I am doubting that the record length is exceeding 22600. Is it a possibility ?
And might have caused this issue to surface now after the upgrade (specially when there was no upgrade related to COBOL/PLI/Assembler etc.) ? Is there any other possible reason like storage allocation change during runtime etc. ?

Any input would be highly appreciated please.

Thanks,
Misha

Re: S0C1 after recent upgrade

PostPosted: Wed Aug 24, 2022 11:48 pm
by Robert Sample
Upgrade was related to XPED/JOBSCAN/SORT
In case you're not aware, COBOL invokes the system SORT internally, so changing SORT means COBOL was changed -- period. The way to start debugging this is to recompile the assembler module, then recompile the COBOL program (which should include the assembler program in the linkage editor / binder step). If you're still having problems, then start displaying values for the parameters for the CALL statement since one of the possible reasons for an S0C1 abend is error(s) in parameters passed to subroutines.
I am doubting that the record length is exceeding 22600. Is it a possibility ?
Certainly a possibility; not that likely but not impossible. Another possible reason is an overlay of storage from subscript errors, so it is possible that the record length is too big for the variable. Or an entirely unrelated table could have overflowed.
Is there any other possible reason like storage allocation change during runtime etc. ?
S0C1 is an attempt was made to execute an invalid machine instruction operation code. Storage allocation changes certainly could be related but at this point it is extremely early to attempt to predict such an event.

Re: S0C1 after recent upgrade

PostPosted: Thu Aug 25, 2022 7:19 pm
by Misha786
Thanks Robert for sharing your thoughts. This is helpful.

Regards,
Misha