Never mind.  Re-reading the Fine Manual I think I just found the answer to my 
question:

(init_sub) takes as an argument a user-supplied pre-init table, but does not 
modify the user copy of  the table.  Instead, it copies the user entries into a 
"Language Environment-maintained table".

Similarly, when (add_entry) succeeds it adds the new entry into the "Language 
Environment-maintained table" (although it does not actually say so in so many 
words).

So the "user supplied" pre-init table is used to size and initialize the 
"Language Environment-maintained table" but is never actually updated by 
(init_sub) or (add_entry), nor is the user-supplied table ever used by 
(call_sub).

Have I got it right now?

Peter

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Farley, Peter x23353
Sent: Friday, March 17, 2017 11:16 AM
To: [email protected]
Subject: Re: Need help understanding use of CEEPIPI from non-LE assembler main 
programs

Gord,

That's what I have coded so far, but here is what happens:

1.      The (init_sub) returns RC=8, but based on the ASMPIPI example I let 
that go as not a fatal error since the pre-init table has only empty entries
2.      The first (add_entry) succeeds RC=0 in R15, but the pre-init table is 
not updated at all (see debugging display below).  The program being added was 
compiled with Enterprise COBOL V4.2 so it is certainly a valid LE HLL 
subroutine.

So why does the (add_entry) not update the pre-init table?  What am I doing 
wrong here?

Peter

The pre-init table is defined with four empty entries like this:

PPTBL    CEEXPIT  ,
         CEEXPITY ,
         CEEXPITY ,
         CEEXPITY ,
         CEEXPITY ,
         CEEXPITS ,

Debugging display (thank you Cole Software!) right after (add_entry) succeeds, 
sanitized (names are not what I actually use here):

XDC ===> d testpipi+4b8 2;d testpipi+4b8? 4;d testpipi+4308 2;d 
testpipi+4308+c?                 
_  00000000_0000EF48 8f (A.S.TSOUSERE) --- TESTPIPI.TESTPIPI+4B8, @R14+3A, 
@R1+50, @R12+4B8, 
_           TESTPIPI+4B8, PRIVATE+CF48                                          
           
_      +4B8  8f                    B70992D0 00000000          *..k}....*        
                                  <=== EP address of TESTSUBR and pre-init 
table index returned by (add_entry)
_  00000000_370992D0 8f (A.S.TSOUSERE) --- TESTSUBR+0, XPRIVATE+8992D0          
         
_        +0  8f  47F0F028 00C3C5C5 00000288 00000014  *.00..CEE...h....*        
                       <=== TESTSUBR module in storage
_       +10  8f  47F0F001 98CEAC00 37099386 00000000  *.00.q.....lf....*        
         
_       +20  8f  00000000 00000DFF 90ECD00C 4110F038  *..........}. .0.*        
         
_       +30  8f  98EFF04C 07FF0000 370992D0 00000000  *q.0<......k}....*        
         
_  00000000_00012D98 8f (A.S.TSOUSERE) --- TESTPIPI.TESTPIPI +4308, 
TESTPIPI+4308, PRIVATE+10D98
_     +4308  8f                    80042508 00000003          *........*        
                               <=== Address of CEEPIPI, two other constants, 
address of pre-init table
_     +4310  8f  00000009 00012EE4 00000000 3711BDB8  *.......U......].*        
         
_  00000000_00012EE4 8f (A.S.TDPEFARE) --- TESTPIPI.TESTPIPI +4454, 
TESTPIPI+4454, PRIVATE+10EE4
_     +4454  8f           C3C5C5E7 D7E3C2D3 00000004      *CEEXPTBL....*        
                      <=== Pre-init table after (add_entry) succeeds (RC = 0)
_     +4460  8f  00000010 00000002 00000000 40404040  *............    *        
         
_     +4470  8f  40404040 00000000 00000000 40404040  *    ........    *        
         
_     +4480  8f  40404040 00000000 00000000 40404040  *    ........    *        
         
_     +4490  8f  40404040 00000000 00000000 40404040  *    ........    *        
         
_     +44A0  8f  40404040 00000000 00000000 00278000  *    ............*        
         


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Gord Tomlin
Sent: Thursday, March 16, 2017 5:41 PM
To: [email protected]
Subject: Re: Need help understanding use of CEEPIPI from non-LE assembler main 
programs

On 2017-03-16 16:11, Farley, Peter x23353 wrote:
> Doesn't use of (add_entry) presume that you add to the table BEFORE you call 
> (init_subr) or (init_subr_dp)?  What if initialization is set up to be done 
> first, before any entries at all appear in the table?

We do INIT_SUB, followed by ADD_ENTRY calls for all the routines to be called 
via CEEPIPI. Then we do CALL_SUB for any routine using the index returned by 
ADD_ENTRY.

--


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


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

Reply via email to