Note: Built-In Function Rules Usage Options
This Built-In Function associates a symbolic name with the details necessary for COMPOSER_CALLF or COMPOSER_RUN to connect to a nominated LANSA or LANSA Composer server system.
The association persists only for the duration of the current session or until COMPOSER_USE is used again to specify different LANSA Composer or LANSA Systems with the associated symbolic name.
The Result code of OK must be received before the LANSA Composer server symbolic name is used with the COMPOSER_RUN or COMPOSER_CALLF Built-In Functions.
Note that no connection is actually attempted until either the COMPOSER_RUN or COMPOSER_CALLF Built-In Functions is executed. Thus, connection errors arising from incorrect values used in this Built-In Function will not be evident until the connection is attempted by either the COMPOSER_RUN or COMPOSER_CALLF Built-In Functions.
Arguments
|
Arguments - IBM i server only
These arguments are ignored when running on a Windows server.
For a Windows Windows server, specify *DEFAULT for these arguments.
|
Arguments - Windows server only
These arguments are ignored when running on an IBM i server system.
Note that although this Built-In Function allows for the long user names and passwords to be specified, the current version (3.0) of LANSA Composer does not yet support the use long user names and passwords.
|
Return Values
|
Examples
This example defines a connection with the symbolic name, COMPOSER, to the LANSA or LANSA Composer system in partition LIC (the default value) in the default LANSA Composer installed location on either IBM i or Windows servers:
use builtin(COMPOSER_USE) with_args('COMPOSER')
This example defines a connection with the symbolic name ISERVER1 to partition 'PRD' in a LANSA or LANSA Composer system on the IBM i server that is executing the Built-In Function. The program library name for the target system is specified in variable #PGMLIB. The result code is received in variable #RESULT:
use builtin(COMPOSER_USE) with_args('ISERVER1' 'PRD' #PGMLIB) to_get(#RESULT)
This example defines a connection with the symbolic name WINSERVER1 to partition 'PRD' in a LANSA or LANSA Composer system on the Windows server that is executing the Built-In Function. The path to the target system is specified n variable #XWIN95. Literal values have been used to specify the remaining connection details - for example, the user name and password is specified as 'PCXUSER', and the target system uses a Sybase SQL anywhere database with name LX_LANSA. LANSA Composer request server logging is enabled. The result code is received in variable #RESULT:
use builtin(COMPOSER_USE) with_args('WINSERVER1' 'PRD' *default *default *default #XWIN95 'PCXUSER' 'PCXUSER' 'LX_LANSA' 'SQLANYWHERE' 'DBA' 'SQL' *default 'Y') to_get(#RESULT)