ADELIA |
|
|
|
|
(I/B) |
|
|
|
|
Section for use
All
Syntax
CALL PgmNameOrAlphaVarId SeriesParameters
PgmNameOrAlphaVarId |
→ |
PgmName | &AlphaVarId |
|
|
|
SeriesParameters |
→ |
SeriesParameters Parameter | None |
Description
This instruction allows control to be passed to the program whose Adelia name is PgmName or to the program whose IBM name is contained in the alphanumeric variable AlphaVarId.
The program must be referenced in the Adelia program glossary.
PgmName must be the program guide word in the glossary. If the program name is placed into a variable (&W_PROGNAME for instance), Adelia will not check its existence in the program glossary.
The program name is followed by parameter variables SeriesParameters (99 maximum).
These parameters must correspond to the description indicated in the glossary (type, length and number of decimals).
Association between the calling program variables and those of the program being called is determined by their position in the instructions CALL and RECEIVE.
Notes:
With the C generator, use the following syntax:
CALL PgmNameOrAlphaVarId SeriesParameters *SERVER(name)
where name is an entry of the client-server configuration file allowing to direct the command to the appropriate server.
- When the command is used without the *SERVER parameter, the call is done locally on the micro-computer.
- When *SERVER is indicated, then the call of the program is done on the AS/400 server (via a "Remote Procedure Call") that is identified by the name.
This entry requires the name of the job library in which Adelia will create (if it does not exist) a CLP program with the same name as your program. The CLP program will manage the call parameters of your program. The library you specified must not be part of the execution context of the AS/400 used to connect your AS/400 server. In the case the call parameters of your program are modified, the corresponding program must be deleted in the job library.
With RPG generator, the *SERVER parameter is ignored.
Example
* call the program to control a date
IF SELECTION_DATE <> 0
CALL CONTROL_DATE SELECTION_DATE RETURN_CODE
IF RETURN_CODE <> *BLANK
PREPARE_MSG 0035 SELECTION_DATE
ANOMALY
END
END
* call the batch report program to list the customers
IF *F21
CALL CUSTOMER_LIST
END
* in next call, PGM_NAME is loaded by either DMC010 or DMC020
* depending on function key
*
IF *F15 OR *F16
IF *F15
PGM_NAME = 'DMC010'
ELSE
PGM_NAME = 'DMC020'
END
CALL &PGM_NAME COMPANY_CODE OFFICE_CODE
SEND_MSG CNY0002 PGM_NAME
END
*
* Prompt functions
*
SFTKYS_PROCESS 02
SFTKY ZZ_CUST_CODE
CALL CUSTOMER_WDW ZZ_CUST_CODE
END_SFTKY
*
SFTKY ZZ_CUST_CODE 01
W_MEMBER_NAME = 'CUSTCODE'
CALL FLD_LVL_HELP W_MEMBER_NAME
END_SFTKY
END_SFTKYS_PROC
*
*
* Example in client-server mode
* The calling program is generated in C for a micro ;
* the called program is an RPG one on an AS/400 of the network.
*
IF *F21
CALL CUSTOMER_LIST *SERVER(AS400_LONDON)
END
See also the list of 4GL instructions by topic
↑ Top of page Copyrights Ι ©Hardis Group 2025 - Any partial or total reproduction of the content, not expressly authorized by Hardis Group, is strictly prohibited.