Apply Engine Script Development |
Scroll |
Apply Engine scripts contain instructions that define the processing to be performed by the Apply Engine using source and target datastores. Apply Engine scripts can be created and modified using the text editor of your choice. That said, the editor of choice is often platform dependent; on z/OS for example, ISPF is the defacto standard; on windows many prefer using Notepad ++; Unix zealots need no recommendations... nor want one!
Once an Apply Engine script is created, it must be parsed before it can be executed. That can be a two step process using the PARSER component or using SQDENG which combines the parse with execution if the parse is successful. In either case the parse setp validates and then translates the script into the optimized machine readable format is used by the SQDATA Engine component or the second phase of SQDENG.
The following topics within this section describe the activities required to create and parse an Apply Engine script in your environment. Examples are provided to assist in the understanding of the various scenarios that are likely to be encountered during the development of scripts.
Getting Started - Discusses the importance of naming conventions and suggests some standard structure and file conventions.
Script Development Steps - Describes the steps required to create an Apply Engine script.
Parser Directives - Describes how to use the substitution (%) and #INCLUDE parser directives.
Exception Handling - Describes both the default behavior and methods for dealing with exceptions caused by invalid source data as well as environmental factors.
Apply Engine Script Structure - Describes the overall structure of an Apply Engine script and the command hierarchy / dependencies, use of comments and spacing.
Environment - Describes how the environmental commands affect run time operation.
Datastore Definitions - Outlines the commands used to describe and define source/target datastores and the relationships between the datastore definition commands.
Cursors - Describes the command / functions used to create SQL Cursors, perform lookups (return a single record) and joins (return multiple records) between the input, and other datastores.
Field Specifications - The commands that can be used to alter field attributes, define variables, set date formats and initialize target field values
Procedures (PROCs) - This describes how to use Procedures (PROCs) and Function Procs within an Apply Engine script to segment common processing routines and perform source to target mapping for specific objects.
Main Processing Section - The main processing loop beginning with the first record of the source datastore until the last record from the source datastore has been processed.
Parsing an Engine Script - Describes the methods of invoking the standalone Parser in the z/OS environment and the Multi-platforms (UNIX, Windows, Linux) environment, including the parameters used by the Parser and examples of executing the Parser.
Apply Engine Execution - Describes the methods of executing the Apply Engine using a parsed Engine script.