Operation Types

Following are brief outlines of each operation type.  For more detailed information on operation type functionality please refer to the SLIK Functionality section later in this guide.

Alert Operator

As SLIK processes each job  both error and custom alert messages may be remitted.  SLIK alerts the nominated Batch Administrator(s) of any errors encountered, or actions completed that generated custom alert messages referenced from a job, using either the email or pager notification facility available in SLIK. 

A column is provided in the Alert Operator Maintenance form that allows you to specify one or more file/path patterns to send with the email.  Use a semicolon to separate the file patterns.

e.g [C:\SLIK\Output\*.txt;C:\SLIK\Output\*.log]

Column Mapping

The Column Mapping operation allows you to map specific columns to transfer between the source and destination  tables.  When configuring a Column Mapping record you must also configure an associated Table Mapping. 

EDI Export and Import

The EDI Transfer operation provides a mechanism to import and export flat-files (i.e., text files) to and from an ODBC database.  Flat files can be either delimited by a character or fixed length.  Required logic to support a number of custom existing (and future) EDI interfaces is included in SLIK.

File Operation

This File operation supports the copy, move, remove and concatenation of files. These functions can be performed using file pattern and/or date or file size criteria.

File Test

SLIK supports a built-in file test operation able to perform the following tests.

Test Type

Argument

File exists

File name

Directory exists

Directory name

Ping host

Host name

File pattern

File pattern

File size

Integer file size

File date

File date

Disk space

Integer disk space

Regular Expression

Grep type expression

 

A comparison operator (e.g., <=,> etc) and a value is used to determine if the test condition is meet.

Note: by default a failed condition will be logged as an error.  Therefore you could set the processing option "Never log error" to avoid logging what is only a logical failed condition rather than a runtime error.

FTP Transfer

SLIK includes a built-in FTP operation that allows you to transfer files between hosts.  Any machine that supports an FTP server can be used with SLIK.  These include various platforms including Windows NT, UNIX, VAX machines. 

Goto Job

You can explicitly define a job (or enable an existing goto job) that unconditionally goes to a particular job. 

You would use this functionality:

q      to jump over a range of jobs as an alternative to disabling and re-enabling jobs between runs

q      to define a batch that runs frequently

Note: by using the Goto Job and Sleep operation (described below) you can define a batch that operates persistently.  From a system resource perspective, this is more efficient than running a batch every two minutes as it avoids the overhead in the SLIK server from having to create and delete a new batch object (in memory) between each run.

Group Variable

The Group Variable operation is related to a feature in SLIK called User Defined Variables.  When defining various operations rather than using a literal value, you can use a symbolic name or variable (i.e., $division_code).  At runtime SLIK substitutes the variable value based on the current group variable name.  Typically a group variable name is specified at the batch level.

However this operation type allows you to install a different group variable as part of the processing steps. This makes it is possible to set up different groups for each division within a company.  As each job runs it uses the currently installed group variable collection to perform variable substitution.

For example, an SQL Statement operation may be specified as “DELETE from Orders where DIVCODE = $division_code”. At runtime SLIK will change the $division_code to be the value specified in the User Defined Variable for the currently selected Group Variable.

Group Variable Name

Variable

Value

Admin

division_code

123

Sales

division_code

456

Manuf

division_code

789

Systems

division_code

234

By attaching Group Variables to Operation Types you do not need to create duplicate operation type records within the system for each division.

Halt Batch

This operation type provides a mechanism to stop processing a batch.  Generally it is used with the On Success and On Failure branch to a job option.

Iterate Collection

SLIK provides a simple mechanism for iterating over a collection of values and calling a SLIK operation for each element.  Iteration consists of an SQL statement that returns one or more rows.  For each row fetched SLIK creates a variable for every column name in the query as well as $element1…n.  These variables are consequently available to be referenced in the nested operation.  If a user provided column name in the SQL statement matches the SLIK operation column name then this values replaces any existing values.  This allows substitutions to be performed on numeric and date type fields without needing to see $element in the string.

The SLIK control database includes two tables called Collection and Element. This can be populated by the user and used as base tables when defining an Iteration. Note, however that the SQL Statement specified in the Iteration operation can be selecting data from any ODBC compliant database.

This feature makes it possible to have a specific operation in SLIK driven with data coming from an external datasource.

Map Drive

SLIK provides a drive mapping function to eliminate the need to call external Batches to map a drive (i.e., net use).

The following fields are provided (with example data):

Attribute

Example data

Usage

LocalName                  

: X:\

 

RemoteName

\\server\JDE

If the RemoteName field is left blank it implies the LocalName drive will be unmapped or removed.

UserName

NZSLIK

Optional NT User account name

Password

******

Optional user name and password. If not specified then the mapping will be performed using the user account SLIK is running under.

ReuseConnection

y/n

Tests the drive to determine if is already mapped to the remote name. If not it maps the drive otherwise it exits with a success status.

DropExistingConnection

y/n

This option will drop any existing connection before performing the drive mapping.

ForceDropConnection

y/n

This option forces any existing connection to be dropped even if the drive is marked as in use. Use with caution.

OneWorld Report

This operation provides a mechanism to launch an existing OneWorld report on to a particular server or to run locally.

SLIK calls a JDE API to submit the report to the nominated server and then polls the remote server’s report queue waiting for the completion of the report.  If the report completes with an ‘E’ (error) status then the standard processing option is to log the error and to stop further processing of jobs in the batch.  This can be overridden using the Jobs Processing options.

By default the system waits up to 60 minutes before considering the report timed-out. However you can specify the expected wait period at the time you define the OneWorld report operation.

OW SubSystem

The OW SubSystem operation is a variant of the OneWorld report that runs as a sub system job on the AS/400 or other JDE logic server.

Two additional fields are included in the Report properties form that allow for a user defined “OneWorld Report Interconnect data structure” to be supplied at runtime (refer OW Report).

SQL Statement

The SQL Statement operation allows the user to define any valid SQL statement that SLIK will execute during batch processing.  Typically these SQL statements are used to execute pre and/or post processing steps before and/or after performing a transfer.

Generally most SQL statements in SLIK are “UPDATE” and “DELETE” types that do not return any rows. However, SLIK also has a simple built-in ODBC reporting feature that executes any SQL “SELECT” statement and emails the resulting data rows as either a “CSV” or “HTML” formatted file as an email attachment. This functionality can even be made conditional on the availability of data by using the “Conditional comparison operator” option available in the SQL Statement properties form (refer to SQL Statement).

SLIK uses the system reported SQL error status to determine the success of the job.

Sleep Period

The Sleep Period operation type that takes a single time value that suspends processing for the specified period in seconds.  This operation type can to be used in conjunction with the  "Goto Job " operation to allow a batch to pause between recurring runs.

The Sleep operation is fully interruptible, meaning that in the event of a shutdown or abort request the sleep operation is aborted prematurely causing the batch to terminate.

Polled Statement

The Polled Statement operation type is similar to the SQL Statement but has additional functionality that can be used to co-ordinate pre and/or post processing. 

A polled statement is used to execute an SQL statement or database procedure that returns a result.  The result is then assessed and if the specified condition is meet then subsequent jobs will be activated.

A typical example would be where you do not want to begin processing a batch that may consist of many inter-dependent jobs until the source database table has some data available.  By defining an SQL Statement as “SELECT COUNT(*) FROM TABLE1” and a polled condition as > 0 then the system will either find some data rows or time-out after the specified polling interval.

SLIK Batch

The SLIK Batch operation allows you to create sub-batches that can be appended to top level Batch records. 

Table Mapping

The TableMap operation allows you to map the tables that you wish to transfer between each DataSource . 

A list of the predefined tables is available for both the source DataSource:Table Name and the destination  DataSource:Table Name. 

Additionally, you can enter a valid SQL WHERE  clause that is applied to the source table to qualify the data to be transferred.  Note: this SQL WHERE  condition does not include the “WHERE” keyword. 

Operation Type Examples

The following tables provides examples of operation type usage:

JobID

Seq.

Operation Type

Operation

OnSuccess

OnFailure

Processing Option

100

10

Execute Command

Abc.exe

 

200

Abort batch

110

20

Polled Stmt

select...

 

 

Abort batch

120

30

Column Map

Table1=>Table2

140

 

Abort batch

130

40

SQL Stmt

delete from...

220

 

Abort batch

140

50

Sleep Period

600 seconds

 

 

Abort batch

150

60

Goto Job

110: Polled Stmt: select...

 

 

Abort batch

200

80

Alert Operator

Admin: $batch_id failed for command abc...

 

 

Abort batch

210

90

Halt Batch

Stop batch processing

 

 

Abort batch

220

100

Alert Operator

Admin: column map failed. dst data deleted.

 

 

Abort batch

 

Providing all jobs run successfully the sequence of jobs is executed as follows:

First run: 100 Exec Command, 110 Polled Stmt, 120 column Map, 140 Sleep Period, 150 Goto Job

Subsequent runs:

110 Polled stmt, 120 Column Map, 140 Sleep Period, 150 Goto Job …

If job 100 fails then control is passed to job 200 that sends a custom alert and halts processing.

If job 120 fails then job 130 runs which if successful will branch to job 220 that also sends an alert and halts batch processing (by reaching end of batch). Job 130 (the delete operation) is not executed if job 120 (Column map) succeeds.

Caution:  It should be noted that given the nature of Goto’s and conditional branching there is the potential for creating "spagetti type interfaces". However, by using these features judiciously, the control over the flow of jobs will compensate for the possible added complexity in interpreting an interface.

Operation Record Housekeeping

So that your SLIK Control Database does not become overcrowded with unused Operation records SLIK contains a Batch file – Batch Operations - that will periodically run to remove all unused Operation records after a predefined period of time.  By altering the Batch Schedule you can define how often the Batch Operations clean-up batch runs.