I cannot comment on the specific situations, but

- register 12 normally contains the address of the CEECAA control block,
when running under LE control

- at position 500 of the CEECAA, the address of the current active WSA (writeable static area) is stored; the WSA is related to the module to be called (or just having been called), and it contains all its static (but modifyable) variables. The WSA is built if the module is compiled with the RENT option;
if not, there is no WSA.

It would be interesting to look at the expansion of the complete CEEPCALL macro, because: the CEEPCALL must do some action first to load COBTEST, to setup and initialize the WSA (which is specific to COBTEST), and to store its address into 500(R12) ... which seems not to work in some of the scenarios. (This is why we did CEEFETCH in the situation mentioned some mails before, when we had to call a PL/1 module
which was compiled using the RENT compiler option).

HTH,
kind regards

Bernd



Am 16.08.2021 um 20:46 schrieb Frank Swarbrick:
I have a very simple LE-enabled assembler program:
          SYSSTATE ARCHLVL=2
CALLER   CEEENTRY MAIN=YES,RMODE=ANY
          CEEPCALL COBTEST,MF=(E,)
          CEETERM
PPA      CEEPPA   ,
          CEEDSA   ,
          CEECAA   ,
          END      CALLER

This works under the following conditions:
- COBTEST is a COBOL V6.3 DLL and is "DLL linked" with CALLER.
- COBTEST is a COBOL V4.2 non-DLL and is static linked with CALLER.

However, if COBTEST is a COBOL V6.3 non-DLL and is static linked with CALLER, 
it abends with an S0C1.
It appears that when a COBOL V6.3 program is static linked with an LE-assembler 
main program it's wiping our or not properly setting CEECAACRENT, the address 
of the writable static area.

Specifically, the CEEPCALL macro expansion has the following statement:
L     15,500(,12)                    LOAD 15 WITH CEECAACRENT
When working properly, this loads R15 with a valid address.  But in the not 
working scenario it's loading address 0.

Should this be working?  Is this a bug?  Am I doing something wrong?

Thanks,
Frank

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to