Both designations for the instruction are equivalent.
|
VADELIA |
SADELIA |
WADELIA |
MADELIA |
|
(I/B) (C/S) |
(B) (S) |
(I/B) (C/S) |
(I) (C/S) |
Warning: This instruction is ignored on a server part generated for the AS/400.
Section for use
All
Syntax
LOAD_DLL DLLorClassName
or
LOAD_CLASS DLLorClassName
DLLorClassName |
→ |
'AlphaConstant' |
|
|
| PgmName |
|
|
| &AlphaVarId |
Description
This instruction loads a DLL or a Java class into memory, in situations where you need to call one of its functions several times.
The name of the DLL or class can be an alphanumeric constant, the guide word for a Visual Adelia program or a variable preceded by the character "&".
This instruction prepares the execution of the CALL and CALL_DLL instructions.
To check whether the operation has been performed successfully, you can test the *RETURN_CODE reserved word.
Note: In the case of a client part of a WADELIA program, PgmName can only be the name of a VADELIA batch program (generated in Java client).
Example
LOAD_DLL '\MY_DLLS\CUSTLST.DLL'
LOAD_DLL CUST_LST
LOAD_DLL &DLL_NAME
LOAD_DLL 'VaToolBx.dll'
CALL_DLL 'VaToolBx.dll' 'Fbeep' Freq Duration ReturnCode
...
UNLOAD_DLL 'VaToolBx.dll'
Other example
* Read loop on the list to
* collect all the selected lines
LOAD_DLL personnel
READ_LST PERSO_LST:LIST *SELECT
*
P_ACTION_CODE = 'MO'
P_IDNBR_CODE = *BLANK
P_IDNBR_CODE = ZZ_IDNBR_CODE
*
CALL personnel P_IDNBR_CODE P_ACTION_CODE
IF P_ACTION_CODE = 'OK'
CHAIN_SQL PERSONNEL *COND(PE_IDNBR_CODE = :P_IDNBR_CODE)
PRESENT PERSONNEL
CHANGE_ELT PERSO_LST:LIST *UNSELECT
END
*
END_READ_LST
UNLOAD_DLL personnel