CEEPDDA can be used to define data in WSA, and optionally specify
it as either exported or imported data.
If the CEEPDDA macro is followed by data constants, it is declared
data, and must be followed by a subsequent CEEPDDA invocation with
only the END parameter to mark the end of the declared
data. If there are no subsequent data constants, a reference is created
for the imported data.
Syntax
>>-+-------+--CEEPDDA--+-END-----------------------------+-----><
'-label-' '-dataname--,--SCOPE= -+-LOCAL--+-'
+-EXPORT-+
'-IMPORT-'
- label
- Optional label beginning in column 1.
- dataname
- Specifies the name of the data item. It is case sensitive and
can be up to 255 characters in length. This entry name can reside
in the same program object, or can be an exported DLL function.
- SCOPE= {LOCAL|EXPORT|IMPORT}
- Optional keyword parameter that results in the data being exported
if SCOPE=EXPORT is specified and this instance of CEEPDDA is to declare
data, or the data being imported if SCOPE=IMPORT is specified and
this instance of CEEPDDA generates a reference to data (i.e. no data
constants follow macro). The use of SCOPE=LOCAL can be used to declare
data in WSA that is not exported.
- END
- The use of CEEPDDA with the END parameter is used to indicate
the end of this defined data item, and must be used in conjunction
with an invocation of CEEPDDA with the SCOPE=EXPORT or SCOPE=LOCAL
keyword parameter.
Usage notes: - This macro requires the GOFF Assembler option.
- This macro requires the binder to link-edit, and the RENT and
DYNAM(DLL) binder options. You will also need the CASE(MIXED) binder
option if the dataname is mixed case.
- The output from the binder must be a PM3 (or higher) format program
object, and therefore must reside in either a PDSE or the HFS.
For more details on DLLs, including full sample assembler DLL routines,
see Building and using dynamic link libraries (DLLs).
The following example illustrates how to export data from Assembler.
The first exported data item is an integer with the initial value
123, and the second exported data item is the character string "Hello
World" with a terminating NULL (x'00') character:
CEEPDDA DllVar,SCOPE=EXPORT
DC A(123)
CEEPDDA END
CEEPDDA DllStr,SCOPE=EXPORT
DC C'Hello World'
DC X'00'
CEEPDDA END
The following example illustrates how to import the variable named
Biv1 into Assembler.
CEEPDDA Biv1,SCOPE=IMPORT