I can only imagine that a LOAD (or equivalent) is used under the covers...
-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On
Behalf Of David S.
Sent: Friday, January 01, 2016 1:47 PM
To: [email protected]
Subject: Re: Review My Program
Dale R. Smith wrote:
> I recently found out that similar Assembler tables can be loaded and
> used by COBOL Batch programs. Here is a sample COBOL program to load
> and use an Assembler table ...
>
>
[...]
05 WS-TABLE-NAME Pic X(8) Value 'DI000024'.
>
05 WS-TABLE-POINTER Function-Pointer.
> 05 WS-TABLE-DISPLAY Redefines WS-TABLE-POINTER.
> 10 WS-TABLE-ADDRESS Pointer.
> [...]
> Linkage Section.
> 01 PROG-PSB-TABLE.
> [...]
> Procedure Division.
>
> Set WS-TABLE-POINTER to Nulls
> Set WS-TABLE-POINTER to Entry WS-TABLE-NAME
> [...]
> Set Address of PROG-PSB-TABLE to WS-TABLE-ADDRESS
I was about to say "How was the table loaded??" when I noticed the 2nd SET
statement ("SET <func ptr> TO ENTRY <entry name>"). This is an interesting
method of *dynamic load* I've never seen before! I wonder if there's an
Assembler equivalent This could be the solution to a problem which has vexed me
for years: How do you cause an external CSECT to be loaded dynamically (i.e. at
run time) without actually issuing a LOAD??
See a discussion of this problem at
http://www.linkedin.com/groups/1462937/1462937-146145097
All I want is to make the Loader aware of all the necessary module components
at run time so it can do a "just-in-time" build and I can simply say EXEC PGM=
and have the loader take care of the rest. I specifically want to have AMODE
31 programs obtain their DCBs dynamically from a pool of reusable generic ones
pre-assembled for this purpose.
The information contained in this electronic communication and any document
attached hereto or transmitted herewith is confidential and intended for the
exclusive use of the individual or entity named above. If the reader of this
message is not the intended recipient or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that any
examination, use, dissemination, distribution or copying of this communication
or any part thereof is strictly prohibited. If you have received this
communication in error, please immediately notify the sender by reply e-mail
and destroy this communication. Thank you.