The IBM Mainframe Assembler program shows the extreme transition to processor time and runtime after adding a COBOL call. What for? What can be done to speed it up?

The IBM Mainframe Assembler program, which reads a very large file, has been modified to invoke the COBOL stub program once for each record. Calling COBOL is necessary, but the program itself works very little. Naturally, a slight increase in the processor was expected, but testing shows a very high increase in CPU usage and runtime. What for? What can be done to speed it up?

Sample source code sufficient to reproduce the problem:

(1) An assembler program that calls IEFBR14 8192 times:

SAMPLE CSECT
       LR    12,15
       USING SAMPLE,12
       LHI   9,8192
LOOP   CALL  IEFBR14
       BCT   9,LOOP
       SR    15,15
       SVC   3
       END

, , .

EXCP    CPU    SRB  CLOCK   SERV  PG 
  11    .00    .00    .00    603   0

(2) COBOL, , GOBACK:

.
-ID. COBOL.
. .

... 8192 :

SAMPLE CSECT              
       LR    12,15        
       USING CALLCOB,12   
       LHI   9,8192       
LOOP   CALL  IEFBR14         
       CALL  COBOL        
       BCT   9,LOOP       
       SVC   3            
       END

Yeow! :

 EXCP    CPU    SRB  CLOCK   SERV  PG 
65552    .16    .00    .19  3980K   0 
+4
1

, , 1990- , IBM COBOL, PL/I Fortran , " " (LE), , , . "" , . LE, . , Assembler " LE" , COBOL, , . , "" Assembler LE, . , , . , . "shell", :

SHELL CEEENTRY AUTO=DSALEN 
* COBOL CALL can be anywhere after CEEENTRY and before CEETERM 
       CEETERM ,
* declare constants here: 
CONSTANT DC    CL8'CONSTANT'
PPA    CEEPPA  ,  (P)rogram (P)rolog (A)rea
       CEEDSA  ,  (D)ynamic (S)torage (A)rea
* declare variables here: 
VARIABLE DS    CL8
DSALEN EQU     *-CEEDSA
       CEECAA ,
       END

Assembler, LE (. ), , , , COBOL.

Sample, " LE", IEFBR14/COBOL CALL:

SAMPLE CEEENTRY AUTO=DSALEN                    
       LHI   9,8192                            
LOOP   CALL  IEFBR14                           
       CALL  COBOL                             
       BCT   9,LOOP                            
       CEETERM ,                               
PPA    CEEPPA  ,  (P)ROGRAM (P)ROLOG (A)REA    
       CEEDSA  ,  (D)YNAMIC (S)TORAGE (A)REA   
DSALEN EQU     *-CEEDSA                        
       CEECAA ,                                
       END                                     

... , :

 EXCP    CPU    SRB  CLOCK   SERV  PG 
   23    .00    .00    .00   1814   0 

z/OS Language Environment ... ... ... :

http://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.2.0/com.ibm.zos.v2r2.ceea200/clcasm5.htm

+6

Source: https://habr.com/ru/post/1671873/


All Articles