All i-effect processes can be automated by using the *SERVER module. There are two methods of automation:
-
Event controlled automation
The process type *MONITOR defines a server job where any number of locations in the system can be monitored. One can defineIFS-, DB2-, or SPOOL monitors. -
Time controlled automation
The process type *SCHEDULE defines a server job, which executes tasks time-controlled. -
Manual controlled
The process type *SINGLE defines a server job, which executes only bymanually calling command STRSRVTSK (Start Server Task).
A license for the module *BASE, module licenses for the required processes, and a license for the *SERVER module are prerequisites for the use of these functions.
The *SERVER module consists of three parts:
-
Part 1 contains definitions of the particular processing types.
-
Part 2 contains definitions of the data sources.
-
Part 3 contains definitions of the processing steps.
These allow a high level of flexibility when defining server entries. Data may be chosen and processed within a *SERVER job.
Characteristics of the *MONITOR/*SPOOL Process
i-effect uses the QIM_NOTIFY_CRTSPLF environmental variable to write attributes of spooled files, which are newly created, into the EFFSRVLST data queue. This environmental variable is set as follows when *SERVER is running, and is erased when *SERVER is shut down.
QIBM_NOTIFY_CRTSPLF '*DTAQ IEFFECT/EFFSRVLST'
i-effect reads the spooled file characteristics from the EFFSRVLST data queue when *MONITOR has been specified. The entries are then compared with the data definitions table and if they match, then *SERVER calls up the corresponding server task.
To use *MONITOR, it must be determined that output queues are not assigned to a printer, or the spooled files, which are to be processed by *SERVER, are not created with the status *HLD (HELD).
*MONITOR/*IFS und *MONITOR/*DB2 Job Characteristics
To monitor IFS directories and DB2 libraries, i-effect works with processes which check the specified directories and/or libraries at definable intervals for data which is still to be processed. If a file in one of the specified directories or libraries matches the specified criteria, then the server will process it.
The file will not be erased from the directory or library. *MOVE or *DELETE can be used to further define the server process to either move or delete the files. If the file is left in the directory or library, then it will continue to be processed.
After *IFS/DB2 *MONITOR server entries have been set up, i-effect must be restarted for the changes in the data selection table (option 12) to take effect.
%SRVDIR% and Other Possible Variables
*SERVER's working directory %SRVDIR% is provided at the start of a server job to allow post-processing of data, which has been created in the processing steps before. Files that are stored here can be used as source files for further server processing steps, e.g. for distribution. The directory is specified in the default settings of the *SERVER module under menu item 80 of the i-effect start menu.
Further Variables:
|
%IFSPATH% |
Only the chosen path will be used for processing.
|
|
%IFSFILE% |
Only the chosen IFS file name will be used for processing.
|
|
%DB2FILE% |
Only the chosen DB2 file name will be used for processing.
|
|
%DB2LIB% |
Only the chosen library name will be used for processing.
|
|
%DB2MBR% |
Only the chosen member file will be used for processing.
|
|
%TMP% |
"/TMP" will be used as the output path. |
|
%HOME% |
The "home path"("/HOME/USERNAME") of the user. If the user does not have a home path, an error message will appear that recommends the creation of a home path for the current user. |
|
%CURDIR% |
Current Directory |
|
%SPLUSER% |
Name of the user of the spooled file. |
|
%USRDTA% |
USRDTA attribute of the spooled file. |
|
%SPLOUTQ% |
Name of the output queue |
|
%SPLFILE% |
The spooled file name, chosen for processing, will be used (only with JOBTYPE(*SPOOL/*MONITOR)). |
|
%SPLJOB% |
The name of the job that created the spooled file will be used (only with JOBTYPE(*SPOOL/*MONITOR)). |
|
%JOBN% |
The number of the job that created the spooled file will be used. (only with JOBTYPE(*SPOOL/*MONITOR)). |
|
%SPLFILNR% |
The file number of the spooled file will be used. (only with JOBTYPE(*SPOOL/*MONITOR)). |
|
%USRDFNDTA% |
USRDFNDTA attribute of the spooled file |
|
%USER% |
Name of the current user. |
|
%DATE% |
Date DD.MM.YYYY |
|
%YEAR% |
Current year YYYY. |
|
%YEAR2% |
Current year YY |
|
%MONTH% |
Current month MM. |
|
%MONTHNAME% |
Name of the current month. |
|
%DAY% |
Current day. |
|
%WEEKDAY% |
Current weekday, e.g. "Friday." |
|
%TIME% |
Current time HH:MM:SS |
|
%TIMESTAMP% |
Current time stamp, YYYY-MM-DD-HH.MM.SS.MSMSMS |
|
%DEFAULTPATH% |
This variable will be filled with the default value from the default settings of the *SERVER module. |
|
%LASTSERVER
|
The time stamp of the last access to this server job in the format:
|
|
%SESSIONNUMBER% |
The i-effect logbook session number used by the server task for run time. |
|
%IFSFILEBASE% |
Only the chosen IFS base file name (without extension) will be used for processing.
|
|
%IEFFECT_SERVER_ENVVAR% |
|
|
%GETENVVAR:xxx% |
|
|
%ARCHIVEFILE% |
|
|
PARMS-Parameter %ParameterX% |
|
|
%UNB_ORIGINATOR% |
|
|
%UNB_RECIPIPENT% |
|
|
%UNH_MESSAGETYPE% |
|
|
%UNH_MESSAGEVERSION% |
|
|
%UNH_MESSAGERELEASE% |
|
|
%UNH_MESSAGEAGENCY% |
|
|
%WEBCONTROLSESSIONLINK% |
|
|
%SERVERJOB% |
|
|
%SERVERJOBDESCRIPTION% |
|
|
%SERVERERRORMESSAGES% |
|
|
%SERVERERRORMESSAGESHTML% |
|
|
%STATUS% |
|