This tag starts the execution of a service program. Options, parameters and libraries to be used by the service are specified by ServiceOpts, ServiceArgs and ServiceLibs tags.
StartService ( program)
where:
program | The name of the service program to run. If a relative path is specified, the path is relative to the directory that contains the .srf file. If no directory is specified, the RUNPATH is searched (see below). |
BIS only allows one service program to be active in a session. Note the following:
When a service program is started, BIS saves the name of the program. When another service program is started, BIS compares the new program name against the name of the program currently running. If there is an exact match (ignoring differences in letter case), the service is the same. If there is any difference, the new StartService tag refers to a different service and the currently running service program is stopped.
Once the service program is started, page rendering resumes. Rendering and the service program run in parallel.
Examples:
1. {{ StartService ( myapp ) }} 2. {{ ServiceLibs ( mylibrary.acu ) }} {{ StartService ( myapp ) }} 3. {{ ServiceLibs ( xmlif mylibrary.acu ) }} {{ StartService ( myapp.cob ) }} 4. {{ ServiceOpts ( -c alt.cfg ) }} {{ ServiceLibs ( xmlif ) }} {{ StartService ( myapp ) }}
In the examples above, the .ACU, and library files must be in a directory specified by CODE_PREFIX, and .CFG files must be in the FILE_PREFIX.
The StartService tag follows all the regular Service Engine program loading rules. See the ACUCOBOL-GT documentation for a detailed description.