Joined: 08 Nov 2004 Posts: 28 Topics: 4 Location: Stockholm
Posted: Mon Nov 08, 2004 10:03 am Post subject: Reference mod in Cobol work diffent in CICS v/s batch
I'm using z/OS Cobol 3.1. Reference modification without length, like W-DATA(W-POS:), executes much slower (consuming much more CPU, MUCH MORE) in CICS programs than in batch. Any explanation to this?
Kolusu, I think you may have misread the question - what Powerhawk is saying is that the same ref mod without length executes much slower in CICS than batch, not that it's slower than ref mod with length specified.
I think depending on the operands, in some cases ref mod might generate a call to a runtime routine rather than inline code. And the CICS runtime modules are different to the batch ones, and might (for example) be doing a CICS GETMAIN where the batch version used a fixed work area or did a less expensive MVS GETMAIN. This could account for a large difference.
Joined: 08 Nov 2004 Posts: 28 Topics: 4 Location: Stockholm
Posted: Mon Nov 08, 2004 10:49 am Post subject:
Yes, I accept it's faster with the length specified. But why is it differences between CICS and batch? The background to my question is this.
I did some optimizing measures in a frequently used subrutin, including some code using reference modification without length. I implemented the optimized subrutin in a batch program and save one hour of execution time. The subrutin became three times faster and consumed less CPU time. When I implemented the new subrutin version in a CICS program. The new version became slower and consumed 150% more CPU than before. When I modified the subrutin and used length specification the batch program run 1-2% faster but the CICS program consume much less CPU comparing to the version without length specification. That is strange!
Powerhawk, I guess you were preparing your post while I was doing mine; anyhow see above and if you want to take it further, post the assmebler code generated as per Kolusu's comment about LIST.
Joined: 08 Nov 2004 Posts: 28 Topics: 4 Location: Stockholm
Posted: Tue Nov 09, 2004 3:24 am Post subject:
The assembler code for the reference modification statement without length
Code:
PERFORM UNTIL (A-RAD > 9)
OR A-TEXTFALT(A-POS:) = SPACE OR LOW-VALUE
is
Code:
BAL 14,318(0,9) TGT TEST INFORMATION AREA +10
EQU *
EQU *
LH 2,8(0,10) A-POS
CVD 2,392(0,13) TS2=0
CVB 2,392(0,13) TS2=0
L 3,60(0,8) PGMLIT AT +12
SR 3,2
LA 4,831(2,10) A-TEXTFALT()
LR 6,4
LR 5,3
L 7,64(0,8) PGMLIT AT +16
CLCL 4,6
L 11,12(0,12) PBL=1
BC 8,1028(0,11) GN=9(000808)
LH 2,8(0,10) A-POS
CVD 2,392(0,13) TS2=0
CVB 2,392(0,13) TS2=0
L 3,60(0,8) PGMLIT AT +12
SR 3,2
LA 4,831(2,10) A-TEXTFALT()
LR 6,4
LR 5,3
L 7,80(0,8) PGMLIT AT +32
CLCL 4,6
BC 7,1032(0,11) GN=112(00080C)
EQU *
BC 15,1070(0,11) GN=110(000832)
EQU *
BAL 14,316(0,9) TGT TEST INFORMATION AREA +8
EQU *
The assembler code for the reference modification statement with length
Code:
PERFORM UNTIL (A-RAD > 9)
OR A-TEXTFALT(A-POS:A-LGD) = SPACE OR LOW-VALUE
is
Code:
BAL 14,318(0,9) TGT TEST INFORMATION AREA +10
EQU *
EQU *
LH 2,8(0,10) A-POS
CVD 2,392(0,13) TS2=0
CVB 2,392(0,13) TS2=0
LH 3,10(0,10) A-LGD
CVD 3,392(0,13) TS2=0
CVB 3,392(0,13) TS2=0
LA 4,831(2,10) A-TEXTFALT()
LR 6,4
LR 5,3
L 7,60(0,8) PGMLIT AT +12
CLCL 4,6
L 11,16(0,12) PBL=1
BC 8,1234(0,11) GN=9(0008DE)
LH 2,8(0,10) A-POS
CVD 2,392(0,13) TS2=0
CVB 2,392(0,13) TS2=0
LH 3,10(0,10) A-LGD
CVD 3,392(0,13) TS2=0
CVB 3,392(0,13) TS2=0
LA 4,831(2,10) A-TEXTFALT()
LR 6,4
LR 5,3
L 7,76(0,8) PGMLIT AT +28
CLCL 4,6
BC 7,1238(0,11) GN=112(0008E2)
EQU *
BC 15,1302(0,11) GN=110(000922)
EQU *
BAL 14,316(0,9) TGT TEST INFORMATION AREA +8
EQU *
Joined: 08 Nov 2004 Posts: 28 Topics: 4 Location: Stockholm
Posted: Tue Nov 09, 2004 4:15 am Post subject:
I'm a little bit worried about this effect in CICS environment. We have a lot of CICS programs using reference mod without length. The field used here, A-TEXTFALT, is 800 bytes long. Maybe the reference mod works better with shorter fields. I hope so!
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
Posted: Sat Nov 13, 2004 2:47 am Post subject:
Powerhawk,
the generated code looks a bit strange to me. Specifically, I curious about the BAL with the reference to the TEST INFORMATION AREA. Perhaps you have compiled with the SSRANGE option and the run time option CHECK is set differently in batch vs. CICS. Another thing to check is to see if you have the WITH DEBUGGING MODE specified on the SOURCE-COMPUTER statement.
please post you compiler options _________________ Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters)
Joined: 08 Nov 2004 Posts: 28 Topics: 4 Location: Stockholm
Posted: Mon Nov 15, 2004 7:13 am Post subject:
Both in CICS and batch we have NOSSRANGE.
The differences in compile options are:
CICS - NODYNAM, OPTIMIZE(FULL), NOTEST
Bach - DYNAM, NOOPTIMIZE, TEST(ALL,SYM)
The subprogram with the strange source code is compiled as a batch program.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum