9.23 COMPOSER_RUN
Þ Note: Built-In Function Rules.
COMPOSER_RUN runs a LANSA Composer Processing Sequence, in the LANSA Composer system identified by the server symbolic name argument, through the LANSA Composer Request Server. It can pass up to five named parameter values to the processing sequence.
COMPOSER_RUN assumes that the target system (the system identified by the LANSA Composer server symbolic name argument) is a LANSA Composer system greater than Version 3, and contains the LANSA Composer Request Server software. This Built-In Function will fail if this is not the case.
You must execute the 9.24 COMPOSER_USE Built-In Function to define the server connection details and a symbolic name representing them before executing this Built-In Function.
Further important information about this Built-In Function is provided at the end of these notes.
For further information, also refer to the COMPOSER_RUN activity and
, in the .For use with
|
Arguments
|
Return Values
|
Examples
This example uses a previously defined connection to a LANSA Composer system, with the symbolic name COMPOSER (see COMPOSER_USE), to call the processing sequence 'EXAMPLE_AATEST1'.
use builtin(COMPOSER_RUN) with_args('COMPOSER' 'EXAMPLE_AATEST1')
This example uses the same connection as above to call processing sequence 'EXAMPLE_AATEST2'. A single parameter: 'DIRECTORY' is passed with the value of '/'. The result code is received in variable #RESULT.
use builtin(COMPOSER_RUN) with_args('COMPOSER' 'EXAMPLE_AATEST2' 'DIRECTORY' '/') to_get(#RESULT)
This example uses the same connection as above to call processing sequence 'EXAMPLE_AATEST1', passing no parameters. The timeout value has been doubled from 30 seconds to 60 seconds.
Use Builtin(COMPOSER_RUN) With_Args('COMPOSER' 'EXAMPLE_AATEST1' *Default *Default *Default *Default *Default *Default *Default *Default *Default *Default *Default 60) to_get(#RESULT)
Processing Sequence Parameters
The Built-In Function arguments can be used to pass up to five parameter values to the processing sequence run. A pair of Built-In Function arguments is used for each processing sequence parameter:
- The first argument in each pair (Parameter name n) should specify the parameter name as defined in the processing sequence to be run. If not specified, a default of '*NONE' is used which means that parameter pair is not used.
- The second argument in each pair (Parameter value n) should specify the value that is to be passed to the processing sequence for the corresponding parameter name. The maximum value length that can be passed is 200. If not specified, a default of '*NONE' is used. However, you should specify the parameter value for each parameter name that is specified.
Further considerations for processing sequences executed through the LANSA Composer Request Server
This Built-In Function will run the processing sequence through the LANSA Composer request server.
When executed this way, the processing sequence runs in another process or job (the request server). The Built-In Function and the request server process or job communicate cooperatively to execute the request and return the results.
This is generally transparent to your application. However, some special considerations apply to this mode of execution, including considerations related to:
- User profiles, authorities and execution environment
- IBM i work management (jobs and subsystems)
For information about requests executed through the LANSA Composer request server, refer to
(The LANSA Composer Request Server) in the .