Common Shell Script

237
EDWS Common Cycle Shell Script Documentation

Transcript of Common Shell Script

EDWS Common Cycle Shell Script Documentation

Last modified: 08/24/2007

Revisions

Version 1.30 – 09/11/2001

Revisions made by Terry Rankin

- Modified BTEQ for Retry option- Modified ADDBAT for use of delimiters- Modified CATCNT for filename positions- PARSE Action added

Version 1.40 – 02/28/2002

Revisions made by Terry Rankin

- Modified ADDBAT for multiple files- Modified APPEND for multiple files

Version 1.50 – 09/16/2002

Revisions made by Terry Rankin

- Added MULTILOAD ERROR action- Added STANDARD PROCEDURE action- Added XMAIL action- Modified MLOAD to add warning level parameter

Version 1.60 – 08/24/2007

Revisions made by Terry Rankin

- Added ADDDLM (Add Record Delimiter) action- Added CHKREC (Check Record Size) action- Added CHMOD (Change File Permission) action- Added DECRY (PGP Decryption) action- Added DIFF (File Compare) action- Added ENCRY (PGP Encryption) action- Added LOBEXT (Large Object Extract) action- Added LOBLOD (Large Object Load) action- Added RMEXT (Remove File Extension) action- Added UNZIP action- Modified The COPY action to allow date/time change- Added section on system outage preparation- Added REPEAT parameter function

Table of Contents

Purpose 1Developer Requirements 3Security 5Cycle Script 7Configuration File 10Cycle Parameter File and REPEAT Function 13Action Parameter File 15Control File 23Directory Structure 24OCS Instructions 26Miscellaneous and System Outage preparation 28Hints, Tips, and Tricks 29

EDWS Common Cycle Shell Script Functions

ADDBAT = Adds sequence number to record 31ADDDLM = Add record delimiter 34ADDLENGTH = Adds record length to record 37ADDVLI = Adds 2 byte VLI to record 39APPEND = Concatenate multiple files 42ARCHIVE = Combined multiple files into a archive file 44BTEQ = Perform SQL commands 46BTEQ EXPORT = Create extract file from SQL commands 48CATCNT = Concatenate files within control file 50CHKBAT = Checks batch number and moves file 52CHKDSK = Checks disk space 55CHKREC = Check Record Size 57CHMOD = Change file permissions 59COMPRESS = Reduces file size 61COPY = Copies files from one directory to another 63CPRMCNT = Copies files in control file and removes original 65DECRY = PGP de-encryption 67DIFF = Compare files 69DUMP = Retrieves files from Sybase database 71EMAIL = Emails text files to individuals in control file 73ENCRY = PGP encryption 75FAST EXPORT = Create extract file from SQL commands 77FASTLOAD = Loads records into empty table 79FILE CHECK = Records empty and duplicate files 82FILE SEQUENCE MOVE = Moves files by sequence number 84INCBAT = Increment batch control file by one 87LOBEXT = Large Object extraction 89LOBLOD = Large Object load 91MOVE = Moves or renames files 93MULTILOAD = Loads records into a nonempty table 95MULTILOAD ERROR = Checks UV and ET MLOAD tables for entries 97OCS ERRORS = OCS Process – Creates error file 100

OCS FILE END PROCESSING – OCS Process – Creates end file 102OCS FILE RECEIVED = OCS Process – Creates received file 104OCS FILE START PROCESSING = OCS Process – Creates Start file 106 PARSE = Concatenates/Separates records 108RMEXT = Remove file extension 110REMOVE = Deletes files 112SEDCOPY = Applies an edit script to a file 114STPROC = Perform CALL commands to execute Stored Procedures 116UNARCHIVE = Extract files from a archive file 118UNCOMPRESS = Returns file to original size 120UNIX SHELL = Execute UNIX shell commands 122UNZIP = PKWARE Unzip utility 124WCCCNT = Checks character count of a file 126WCLCNT = Checks line count of a file 128XMAIL = Emails multiple files to individuals in control file 130

The primary goal of the Common Cycle Shell Script (or common script) is to minimize process implementation time and allow more time to be spent on the application design. The secondary goal is to create consistency across all applications, allowing for better maintainability and supportability of applications. The consistency that will develop through the use of this script will allow developers who are unfamiliar with a specific application to identify the logic flow and quickly support the application, if necessary.

The common script uses a primary “application” parameter file, which drives a secondary set of “action” parameter files. This parameter file nesting is used to allow for concurrency and recovery. The application parameter file is essentially a list of parameter files that will run the SQL or UNIX commands.

The common script is designed to address almost any Enterprise Data Warehouse Services(EDWS) script development need. Some important aspects include:

Concurrency - This is the method of allowing for multiple portions of a cycle to run simultaneously. The common script is designed to allow as many pieces of a cycle as necessary to run as a group. The common script will allow multiple logins that used to be contained in multiple cycles or run one after another within the same cycle, to process together. The script will not proceed to the next step until all concurrent portions have completed successfully.

Recovery - The common script does not have a ‘recovery’ script requirement. If the script fails, it will terminate immediately and issue a message to operations. After the problem is resolved, the script may simply be restarted, and the script will begin at the point and continue processing where the problem occurred. If a problem occurs during a concurrent section, the script will complete all of the concurrent sections currently running, except for the one(s) that had a problem. Upon restart, only the section(s) that had a problem will be rerun, and the script will not proceed further until all concurrent sections have completed successfully.

EDWS Common Cycle Shell Script 1

Purpose

Cycles - For any given cycle of processing (daily, weekly, monthly, etc.) there should only be 1 cycle required. The common script can handle all of the needs of any given cycle. Cycles no longer need to be broken into multiple pieces (for example, a fastload piece, an update piece, etc.). All of these pieces should now be executed by the common script, as one cycle with multiple “action” parameter files.

EXCEPTION: The only exception to this is ASF. ASF is run in a different way than everything else, and therefore must be handled separately.

EDWS Common Cycle Shell Script 2

To incorporate the common script into a process, several activities are required by the developer. (Refer to the appropriate section for detailed information about each of these topics.)

1. Establish the appropriate security setup with EDW Support and Maintenance via e-mail. Refer to Security for additional information.

2. A “cycle” script must be created to call the common script. Each cycle requires its own cycle script. Refer to Cycle Script for additional information and a sample template.

3. A configuration file must be created for this script. Refer to Configuration File for additional information and a sample template.

4. A cycle parameter file must be created. This file will drive the major stages in the process. The cycle parameter file keeps track of the recovery, as well as any concurrency that occurs in this process. Refer to Cycle Parameter File for additional information and a sample template.

5. Action parameter file(s). One action parameter file is required for each step defined in the cycle parameter file. This file defines the individual steps of the process, and contains actions such as Addlength, Fastload, Bteq, etc., and all information necessary to process the given actions. If there is no concurrency, only 1 action parameter file is required for any given cycle. Refer to Action Parameter File for additional information and a sample template.

EDWS Common Cycle Shell Script 3

Developer Requirements

6. Directory Structure. We have expanded the standard directory structure for future EDW applications, and this script is designed to use the expanded directory structure. Using this directory structure requires minimal script development time, and provides a consistency across all applications. The biggest change in the directory structure is when the application base directory is defined (appl1, appl2, appl3, etc.), the application’s root directory should be defined as ‘dss’ + [lower-case application identifier] (e.g., appl3/dsswt, appl2/dssdm) or ‘edw’ + [lower-case application identifier] (e.g., appl3/edwd1). The common script can handle current applications that do not use this directory structure. Because many current applications do not have the dss[id] as their base directory, the config.sh file will allow for modification to fit the current structure. Any new development should conform to the standard. Refer to Directory Structure for additional information.

7. A standard naming convention is used with this script. Many of the files created will be required to have the application identifier as part of the name. As each step of the process is discussed, the required or suggested file naming standards will be defined and labeled as required or suggested.

EDWS Common Cycle Shell Script 4

When a new application is developed and the application identifier (ID)is established, the Teradata logons must be created. This can be achieved by contacting an EDW DBA via e-mail and submit a request to obtain the Teradata logons for the new application identifier. After the Teradata logons have been established, EDW Maintenance and Support group must be contacted in order to add the new logons and password to Common Script’s password replacement file. This will allow for the application’s Teradata utility scripts (BTEQ, BEXP, FLOAD, FEXP, MLOAD) to logon and perform their function.

All Teradata utility scripts that require a logon command (BTEQ, BEXP, FEXP, FLOAD, MLOAD) must use the following syntax when logging in:

EDWS Common Cycle Shell Script 5

Security

User-Logon

.logon SSYYSSTTEEMM/LLOOGGOONNID;

Teradata System Database Application or Segment ID

EDWS Common Cycle Shell Script 6

The developer needs to replace the ID portion of LLOOGGOONNID with the application or segment ID. For Example, if the application ID is AK, the User-Logon would be LLOOGGOONNAK.

SSYYSSTTEEMM will be replaced by the Teradata System Database entered in Parameter 12 of the “action” parameter file.

EDWS Common Cycle Shell Script 7

BTEQ BREAK fn_temp.ren NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK rpc1356 t56prd DUMMY13 DUMMY14 DUMMY15

Teradata System Database(Parameter 12)

EDWS Common Cycle Shell Script 8

Next, the user-logon (LLOOGGOONNID) will be replaced by using a UNIX SED file containing the replacement string. This file is specified in the application’s configuration file. The UNIX SED file must be located in the application’s VLIPARM directory.UNIX SED file example (In the VLIPARM directory):

s/LLOOGGOONNID/tid1cre/g

Using the above described UNIX SED file and the Teradata system Database (Parameter 12), the follow replacements will occur on all Teradata scripts that contain the generic system and user-logon (SSYYSSTTEEMM/LLOOGGOONNID):

.logon SSYYSSTTEEMM/LLOOGGOONNID; => .logon T56PRD/tid1cre;

Lastly, the user-logon of tid1cre is passed through a second UNIX SED file to add the password. This is the password replacement file that was modified to contain the new logon and password.

NOTE: Modifying the password replacement file can only be done by the EDW Maintenance and Support group.

Second SED File: s/tid1cre/tid1cre,idxxxxxx/g

Scripts with system and user-logon will show the following after the substitutions:

EDWS Common Cycle Shell Script 9

.logon T56PRD/tid1cre,idxxxxxx;

Password (Password replacement file in DSSscript)

User-Logon (UNIX SED file in VLIPARM directory)

Teradata System Database (System in Parameter 12 of Action scrip

EDWS Common Cycle Shell Script 10

EDWS Common Cycle Shell Script 11

The cycle script drives all of the common scripts through the use of the parameter files. The example below demonstrates what a typical cycle script should look like. For most application cycles, there will only be minimal changes to this script. This script must be named using the cycle name.

NOTE: The line that runs the application configuration file is very important. This configuration file name should be changed to reflect the application/cycle identifier for this collection. It is recommended to use the application ID/CycleID in this location as the name for the configuration file. This will allow greater flexibility as new cycles are added.

After loading the configuration file, the application parameter file is set up and tested for locks. The locks being tested are based on the logging. This way only one process can write to a log at any given time.

EDWS Common Cycle Shell Script 12

Cycle Script

Sample Cycle Script TemplateNOTE: The standard cycle script template is located on rpc1262 It is in the data path /appl2/DSSscript/Templates. It is called CYCLE_SCRIPT.TPL.

################################################################################ Script: XXXXXXX ## Description: This script kicks off the generic script for an application. ################################################################################

################################################################################develop PID and generate for logging this allows all process ID's to have#the same length for cleaner logging.###############################################################################PIDSIZE=`expr $$ : ".*"`if [ $PIDSIZE -eq 1 ]then PID=`echo $$ |sed 's/^.$/0000&/`elif [ $PIDSIZE -eq 2 ]then PID=`echo $$ |sed 's/^..$/000&/`elif [ $PIDSIZE -eq 3 ]then PID=`echo $$ |sed 's/^...$/00&/`elif [ $PIDSIZE -eq 4 ]then PID=`echo $$ |sed 's/^....$/0&/`else PID=$$fi################################################################################ Define Function to Log Date, Script name, and message###############################################################################LOG_DATE(){ echo "$UCID $PID `date '+%D %T'`: $BASENAME...$1" | tee -a $IOLOG >> $SCRIPTLOG}################################################################################set -vx

### Enter directory path and application configuration file name ##############

. /apple/edwxx/exec/script/config/xxxconfig.sh

###

touch $ERRLOG

#create the lockfiles if they don't already existls $RUNLOCK*if [ $? -ne 0 ]then touch $RUNLOCK.lock1fi

EDWS Common Cycle Shell Script 13

ls $BKRUNLOCK*if [ $? -ne 0 ]then touch $BKRUNLOCK.lock1fiBASENAME=`basename $0`export BASENAME

#Begin Cycle Loggingecho "=======================================" | tee -a $IOLOG >> $SCRIPTLOGLOG_DATE " ...JOB STARTED"echo "=======================================" | tee -a $IOLOG >> $SCRIPTLOG$WRITELOG

#Load main parameter file for logical ordering MAINPARM=${CYCLE_NAME}.FILexport MAINPARM

nohup $GENERICDIR/edwmain.shSTAT=$?

if [ $STAT -eq 0 ]then echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOG LOG_DATE " ...JOB TERMED OK" echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOGelse echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOG LOG_DATE " ...JOB ABORTED" echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOGfi$WRITELOG

#write system information to system logscat $PROCESSLOG >> $SYSLOGrm -f $PROCESSLOGchmod 666 $SYSLOG > /dev/null 2>&1

#Date Logic for Runlogif [ $STAT -eq 0 ]then cd $LOGDIR cat $RUNLOG >>$RUNLOG.`date '+%m%d%H%M'` rm -f $RUNLOGfirm -f $ERRLOG#Delete backup Runlogif [ $STAT -eq 0 ]then cd $BKLOGDIR rm -f $BKRUNLOGfiexit $STAT

EDWS Common Cycle Shell Script 14

The new configuration file is much simpler than the old file. Based on the standard directory structure, most of the actual environment paths are not required. This file should be located in the exec/script/config/ directory. To make this configuration compatible with the application, these things must be done:

1. Define UCID - This is the upper-case version of the application identifier (max 2 characters).

2. Define LCID - This is the lower -case version of the application identifier (max 2 characters).

3. Define CYCLE_NAME - This is the actual cycle name.

4. Define CYCLE_ID - This is the upper -case cycle identifier. For example: D - Daily; M - Monthly; etc. If more than one cycle is run during a given period, it is recommended to use a cycle identifier such as : D1 - daily cycle 1; D2 - daily cycle 2, etc.

5. Define APPLDIR - This is the base directory; and should usually begin with appl1-appl8 or edw1-edw8.

NOTE: If you have an older application, this is where you should modify the directory path so that the application base directory matches the current directory. For example, invoice imaging would be defined as: APPLDIR = /appl2/dsstracker

6. Define BKLOGDIR - Alternate directory for backup runlog. This should be placed in a different file system than the main runlog. Preferable in /dssdatn/edwxx/logs.

7. Define LOGDIRDEL - Enter the number of days that you wish to keep your runlogs. Take into consideration whether this is a daily, weekly or monthly cycle. If you enter 10, 10 daily runlogs would be keep but only two weekly logs would be kept (the current log and one previous weekly log).

EDWS Common Cycle Shell Script 15

Configuration File

8. Define SEDFILE - Enter the name of your application sed control file. This file must be located in the vliparm directory. Instructions for using this feature can be found under ‘Miscellaneous Common Scripts Functions - Stream Editor’

NOTE: Naming convention recommendation: Because the configuration file now reflects cycle script configuration rather than an entire application configuration, it is recommended that new configuration files be named with {APPLID/CYCLEID}config.sh names. For example: fndconfig.sh shown below is the configuration file for the fn application daily cycle.

New applications should follow the standard /appl?/edw$[LCID] format. This will allow any application to be easily located by application identifier.

The GENERICDIR environment variable should not be modified - This is strictly for the common script’s use. This variable defines where the pieces of the common script are located to enable the application to find them. After this variable has been defined, the configuration file then activates the Common Configuration File, which establishes standard directory paths.

Please note that the Common Configuration File (edwconfig.sh) cannot be modified! However, variables within this file should be checked with the job’s configuration file to avoid duplicate or invalid variables. The calling of the Common Configuration File is located at the end of the job’s configuration file. If there are any additional directory variables that need to be defined, please do so after the Common Configuration File is called.

The Common Configuration File defines the following variables and should not be redefined:

DATDIR=$APPLDIR/data # Data DirectoryLOGDIR2=$APPLDIR/logs # Log DirectoryADDLENDIR=/bin # Directory of Addlength executableLOGDIR=$LOGDIR2/${CYCLE_NAME} # Log DirectorySEDDIR=/appl2/DSSscript/runapps/${UCID} # Log DirectoryEXECDIR=$APPLDIR/exec # Execute base DirectoryEMAILDIR=$APPLDIR/email # Email base DirectoryFEXPDIR=$EXECDIR/fexp # FastExport DirectoryFLDIR=$EXECDIR/fastload # Fasload DirectoryMLDIR=$EXECDIR/mload # Multiload DirectoryBTEQDIR=$EXECDIR/bteq # BTEQ Directory

EDWS Common Cycle Shell Script 16

PARMDIR=$APPLDIR/parm # Parameterfile DirectoryVLIPARMDIR=$APPLDIR/vliparm # Vli Parameterfile DirectoryCOBJDIR=$EXECDIR/cobj # Object DirectoryCSRCDIR=$EXECDIR/csrc # C - Source DirectoryWORKDIR=$APPLDIR # Working DirectorySCRIPTDIR=$EXECDIR/script # Application Script Directory

NOTE: The standard config file template is located on rpc1262. It is in the data path /appl2/DSSscript/Templates. It is called CYCLE_CONFIG.TPL.

EDWS Common Cycle Shell Script 17

Sample Configuration File Template

#THIS IS A TEMPLATE FOR THE EDW CYCLE CONFIG FILE IN THE SDS GENERIC SCRIPT################################################################################ Script Name: XXXconfig.sh## Copyright: NCR CORPORATION 1996# Description: This script is the edw environment configuration script for the# Generic Scripting System.###############################################################################

################################################################################Unless something special must happen in your application, these should be#the only lines that need altering -- Use your Application ID in the UCID and# the LCID slots. CYCLE ID refers to when to run the cycle###############################################################################UCID="XX" # Upper Case System identifierLCID="xx" # Lower Case System identifierCYCLE_NAME="XXXXXXX" # Cycle name to differentiate parametersCYCLE_ID="D" # Cycle Identifier ('D'aily, 'W'eekly, etcAPPLDIR=/appl2/edwxx # Application root DirectoryBKLOGDIR=/dssdat2/edwxx # Application root backup DirectoryLOGDIRDEL=10 # Number of days to keep log filesSEDFILE="xxxxxxxx" # Control file containing sed parameters###############################################################################

export UCID LCID CYCLE_NAME CYCLE_ID APPLDIR BKLOGDIR LOGDIRDEL SEDFILE

GENERICDIR=/appl2/DSSscript/prod_script # Generic Script Directoryexport GENERICDIR

. $GENERICDIR/edwconfig.sh

EDWS Common Cycle Shell Script 18

This is the parameter file that drives the cycles’ action scripts. All concurrency is handled by this primary cycle parameter file and the recovery files are defined here. This script will be called by the cycle script, and will then generate the necessary shell(s) to complete the application cycle.

The format of the cycle shell script parameter file is described below:

The first parameter is the name of the action parameter file to run. Refer to the Sample Cycle Parameter File for more detailed information. The Cycle Parameter File is similar in function to the older parameter files that run the SQL or UNIX commands and scripts.

The second parameter reflects the recovery filename. This file is automatically created and deleted by the script as necessary, but you must provide the name. Each cycle parameter must have an associated recovery file. Any action parameter files that run concurrently will require different filenames. It is recommended that you always use different file names for each step, but this is only a requirement in concurrent steps.

NOTE: It is recommended that you use [action parameter file name]. RCV as the recovery filename. This assists in consistency across applications.

The third parameter designates concurrency. If a 1 is entered here, the application script will run single-threaded until completion. If any number greater than 1 is entered, the entered number of action parameter files will be started automatically, and will run simultaneously until completion. Only the first concurrent parameter is relevant to determine concurrency; thus, in the above example, any script running concurrently that is listed after the first one in the group will have a value of 0.

NOTE: A value of 0 is only valid if it is part of a concurrent block of action parameter files that will be run.

All scripts running concurrently must terminate successfully before the next stage in the application parameter file will be activated. The entire concurrent section is considered to be one section by the script, and

EDWS Common Cycle Shell Script 19

Cycle Parameter File

all portions of it must terminate successfully before the next step will occur.

REPEAT Function

This function will allow an action parameter file to be repeated. Only one action parameter file can be used in a REPEAT function. The cycle parameter file can only contain one action file if this function is used. The REPEAT will allow an action file to be repeated a specified number of times or run until the system date/time is greater then the defined end date/time. A sleep option in between each cycle can also be given.

The syntax is as follows:

REPEAT 1-9999 00:00:00 – 23:59:59,N 0-3600

The first value is the number of times the action parameter file will repeat. The Second is the time in which the repeat will end. If ‘N’ is used here, the repeat will not complete until value 1 is reached. The third value is the number of seconds the function will wait until the action file is re-executed.

The below example is of an action file that will repeat up to 9999 times or until the current time is greater than 23:00:00. This cycle will also wait 10 minutes before repeating.

ABCLOAD.FIL ABCLOAD.RCV 1REPEAT 9999 23:00:00 600

Sample Cycle Parameter File Template

REM This is a WLPARTDN.FIL

sample para file WLPARTDN.RCV 1

WLPORDDN.FIL WLPORDDN.RCV 3WLSORDDN.FIL WLSORDDN.RCV 0WL0000DN.FIL WL0000DN.RCV 0WL0200DN.FIL WL0200DN.RCV 2WL0400DN.FIL WL0400DN.RCV 0WL0300DN.FIL WL0300DN.RCV 1WLASOFN.FIL WLASOFN.RCV 1

EDWS Common Cycle Shell Script 20

SPECIAL NOTE: Any parameter can be preceded by the REM command. The script will completely ignore any line that begins with this command. Any number of comment lines are valid, but special characters cannot be used.

It is recommended that you use remarks/comments liberally in both the cycle parameter files and the action parameter files to guarantee clarity for any future support activities done by others.

EDWS Common Cycle Shell Script 21

The format for the action Parameter file is as follows:

Parameter 1 ACTION

Parameter 2 BREAKPOINT

Parameter 3 SCRIPT Parameter 4 SOURCE FILE EXIST CHECK Parameter 5 DESTINATION FILE EXIST CHECK Parameter 6 SOURCE DIRECTORY Parameter 7 SOURCE FILENAME Parameter 8 DESTINATION DIRECTORY Parameter 9 DESTINATION FILENAME Parameter 10 ERROR CHECK Parameter 11 UNIX ID Parameter 12 TOS ID Parameter 13 MISC

Parameter 14 UNUSED

Parameter 15 UNUSED

PARAMETER 1 (ACTION) shows which action will be taken. If the entered action is not one of the pre-defined actions, then the entire row will be considered a comment line and will be skipped.

Currently supported script actions:

FUNCTION ACTION IDADDBAT ADDBATADDLENGTH ADDLENADDVLI ADDVLI append APPEND archive ARCH BTEQ BTEQ BTEQ EXPORT BEXP CHKBAT CHKBAT dpspace CHKDISK check file CHKFILE compress COMP cp - UNIX copy COPY FAST EXPORT FEXP FASTLOAD FLOAD File sequence move FSEQMV INCBAT INCBAT MULTILOAD MLOAD

EDWS Common Cycle Shell Script 22

Action Parameter File

mv MOVE rm REMOVE Stored Procedure STPROC unarchive UNARC uncompress UNCOMP UNIX SHELL UNIXSH

The following require a pre-established control fileconcatenate CATCNTcp and rm CPRMCNTemail EMAILxmail XMAILmultiload error MLDERRsed editing SEDCOPYcheck character count WCCCNTcheck line count WCLCNT

The script ID is the identifier you use in the first column to tell the script the type of action to take. The “UNIX SHELL” action is provided to allow flexibility. This shell is provided to allow the script to process in ways other than those defined above.

NOTE: If an application has processing needs other than those supported above, please notify the common script developers. A log is being kept to determine if there are other steps that need to be implemented in a standard way.

PARAMETER 2 (BREAKPOINT) identifies whether this step is a valid restart point. If the script fails, it will recover to the most recent valid “breakpoint.” Some steps should be kept together, and if one fails, the process must “rewind” itself and begin the logical section again. This capability is provided by the second parameter.

Valid entries are:

BREAK - Restarting at this point is allowed

NOBRK - Restarting at this point is not allowed

PARAMETER 3 (SCRIPT) is the name of the script that this action will use. In the example below, it will be the name of the BTEQ or fast export script that is used to generate that step. NOTE: This is also the action name that is stored in the recovery file to allow the script to locate where to recover. In any parameter file, these names MUST be unique.

EDWS Common Cycle Shell Script 23

Even though UNIX commands do not use shells, this name must be entered. In the sample Tracker parameter file shown below, notice REMOVE1 and REMOVE2 differentiates the different removes that are being used. If the names are not differentiated, the script will always restore to the first location it finds with that name.

PARAMETER 4 (SOURCE FILE EXIST CHECK) is used as a source file location check. If CHECK is used in this parameter, the script will locate the source dir/source filename.

Depending on the Action defined, this check will either:

error only if the filename does not exist

-OR-

error if the filename does not exist or if the filename exists but the file size is 0

The various options will be specifically defined within the given actions that they represent.

Valid Entries: CHECK, NOCHK

PARAMETER 5 (DESTINATION FILE EXIST CHECK) is used as a destination file location check. If CHECK is used in this parameter, the script will locate the destination dir/destination filename. If a file is located and has a size larger than 0, an ABORT message will be generated. If no file is located, the script will proceed as normal. This command could be used to prevent COPY, MOVE, FEXP, or BEXP from overwriting a data file that should already have been processed and was not removed.

Valid Entries: CHECK, NOCHK

PARAMETER 6 (SOURCE DIRECTORY) is the source data path. If a data path is entered here, PARAMETER 7 must NOT be DUMMY7. Parameter 7 must be changed to reflect the source file name if this is a UNIX action. If this is an SQL action, PARAMETER 7 may or may not require a file name to be provided. If this parameter is left as DUMMY6 and a filename is entered for PARAMETER 7, the data path will be the default data directory for this application. That path is defined as $APPLDIR/data. $APPLDIR is the application base directory defined in the cycle configuration file.

EDWS Common Cycle Shell Script 24

PARAMETER 7 (SOURCE FILE NAME) refers to the flat file used as input. If this is a fastload or multiload, this field must contain the name of the addlength-ed flat file. If this is a BTEQ related to a fastload or multiload, this field should have the addlength-ed file name as well. If this script is unrelated to any previous flat file, “DUMMY7” must be entered in this column to indicate there is no relationship.

PARAMETER 8 (DESTINATION DIRECTORY) is the destination data path. If a data path is entered here, PARAMETER 9 must NOT be DUMMY9. Parameter 9 must be changed to reflect the destination file name if this is a UNIX action. With an SQL action, this parameter may or may not be defaulted, depending on the action.

If this parameter is left as DUMMY8 and a filename is entered for PARAMETER 9, the data path will be the default data directory for this application. That path is defined as $APPLDIR/data. $APPLDIR is the application base directory defined in the cycle configuration file.

PARAMETER 9 (DESTINATION FILE NAME) refers to the flat file used as output. If this is a BEXP or FEXP related to a fastload or multiload, this field should have the addlength-ed file name as well). If this script is unrelated to any previous flat file, “DUMMY9” must be entered in this column to indicate there is no relationship.

PARAMETER 10 (ERROR CHECK) This parameter is designed for UNIX and the FLOAD actions only. For UNIX commands, the only valid options in this column are CHECK and NOCHK. For FLOAD, the valid options are NOCHK and the values 0-7. Other TOS actions have their own error checking, and do not need a method to do this.

NOTE: Fastload is the only TOS function that allows the ERROR CHECK parameter to be defined as anything other than “NOCHK”

Valid Entries:

UNIX FASTLOAD TOS CHECK NOCHK NOCHK NOCHK 0-7

PARAMETER 11 (UNIX ID) is the UNIX system ID.

EDWS Common Cycle Shell Script 25

PARAMETER 12 (TOS ID) is the TOS system ID.

PARAMETER 13 (MISC) is used to check the percentage of disk space available with CHKDSK, and to identify the control file which will be used with the SED function.

PARAMETER 14 is reserved for future use. The only valid entry is DUMMY14.

PARAMETER 15 is reserved for future use. The only valid entry is DUMMY15.

NOTE: Even if a parameter is unused, it must contain the DUMMY# flag. This indicates to the script that this parameter is unused and keeps the parameter file in synch.

EDWS Common Cycle Shell Script 26

Sample Action Parameter File Template

REM********************************************************************************************REM the destination directory path will need to be changed in production

REMOVE BREAK REMOVE1 NOCHK NOCHK DUMMY6 maffddss.al DUMMY8DUMMY9 CHECK ipc53t DUMMY12 DUMYY13 DUMMY14 DUMMY15

BTEQ BREAK cssetflg.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15

BTEQ BREAK cssetflg74.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15

REM BTEQ BREAK cssetflg74.upd NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn010tbl.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn010tbl.ins NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_skext.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_add_code.bld NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_assign_code.

bldNOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_cat_code.bld NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_mfg_code.bld NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15FEXP BREAK fn_inven.fx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15FEXP BREAK fn_add_cd.fx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15FEXP BREAK fn_asgn_cd.fx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15FEXP BREAK fn_cat_cd.fx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15FEXP BREAK fn_mfg_cd.fx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_drop.tq NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn_drop.tq NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wct74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_tmp_del.tq NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn_tmp_del.tq NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15MLOAD BREAK fn_inven.ml NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM MLOAD BREAK fn_inven.ml NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15MLOAD BREAK fn_add_cd.ml NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM MLOAD BREAK fn_add_cd.ml NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15MLOAD BREAK fn_asgn_cd.ml NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM MLOAD BREAK fn_asgn_cd.ml NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15MLOAD BREAK fn_cat_cd.ml NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

EDWS Common Cycle Shell Script 27

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM MLOAD BREAK fn_cat_cd.ml NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15MLOAD BREAK fn_mfg_cd.ml NOCHK NOCHK DUMMY6 DUNNY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM MLOAD BREAK fn_mfg_cd.ml NOCHK NOCHK DUMMY6 DUNNY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_ins.tq NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn_ins.tq NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_perm.ren NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn_perm.ren NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_temp.ren NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn_temp.ren NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn_buff.ren NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn_buff.ren NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15REMOVE BREAK REMOVE2 NOCHK NOCHK DUMMY6 MAFFDDSS DUMMY8

DUMMY9 CHECK ipc53t DUMMY12 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn999tbl.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK fn999tbl74.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15REM BTEQ BREAK fn999tbl74.upd NOCHK NOCHK DUMMY6 DUMMY7DUMMY8 DUMMY9 NOCHK ipc35t wtc74 DUMMY13 DUMMY14 DUMMY15BTEQ BREAK cssetdte.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15BTEQ BREAK cssetdte74.upd NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8

DUMMY9 NOCHK ipc53t ipc54t DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 28

EDWS Common Cycle Shell Script 29

A complete parameter file for DssTracker was included to illustrate various items in the parameter file. Note the following:

Commenting capabilities in the parameter file. These can be used at any time to describe the file.

The system used. There is no need to remove lines from a parameter file between testing, certification, and production. Simply use the REM command to comment out the lines that are specific to one area (in this case, this is a parameter file located on the IPC53T test system, and therefore the WTC74 loads have no relevance) and change the others as necessary to point to the appropriate UNIX and Teradata systems.

EDWS Common Cycle Shell Script 30

The control file contains a list of data files created by using the UNIX command ‘wc -lc *’. Used with the following functions, you can verify that all files contain in the control file have been received correctly , move all files to another directory or concatenate files from more than one control file.

Sample Control File

127 3693 xxxxxx.abcd.1.060669 1692 xxxxxxx.efgh.1.0606125 3194 xxx.ijkl.1.0606..4211 15832 total

The control file is used in conjunction with the following functions: WCLCNT will compare the line count (first field) of

each file name in the control file to the line count of the file name in designated file directory. The control file does not have to be in same directory as the files that are being checked.

WCCCNT will compare the character count (second field) of each file name in the control file to the character count of the file name in designated file directory. The control file does not have to be in same directory as the files that are being checked.

CPRMCNT will copy all files contained in the control file to the designated file directory, then remove the files contained in the control file. The control file must be in the same directory as files being copied.

CATCNT will concatenate file within the control file into a corresponding file, which is derived by the following UNIX command - cut -f2 -d”.” filename. This would concatenate ‘xxxxxx.abcd.1.0606’ into abcd. It then adds a ‘.dat. extension, creating a final file named abcd.dat.

EDWS Common Cycle Shell Script 31

Control File

We have developed a standard directory structure for DSS applications, the format of which is shown below. Not all directories are required by the script, but are intended for maintenance purposes. For example, the support directory off of exec. is a scratch directory that should be used for support purposes rather than using the production BTEQ, mload, fastload, etc. directories.

Off of the application base directory, there are 6 primary directories:

data: Base directory for incoming and outgoing data. The data locations are usually application and size dependent.

email: Used for email messages and control files.

exec: Path to any TOS and executable files.

logs: Contains all of the application logs. All logs are date stamped by MMDDhhmm immediately upon successful completion of processing. The date stamp provides an accurate reflection of the run date.

parm: Contains the all cycle parameter files and all action parameter files.

stproc: Contains all CALL command scripts to execute Stored Procedures.

vliparm: Contains any parameter files used by Addvli and also the SED control files.

EDWS Common Cycle Shell Script 32

Directory Structure

Standard Data Warehouse Directory Structure

/appln

/edwID

/data ( .dat .al )

/email

/exec

/bteq (.ins .del .upd .bx )

/cobj ( .sh )

/cscr ( .c )

/create

/macro ( .mac )

/table ( .tq )

/view ( .vq .vie )

/stproc ( .sp )

/fastload ( .fl )

/fexp ( .fx )

/mload ( .ml )

/script ( .sh )

/config ( .sh )

/profile

/stproc ( .stp )

/support

/logs

/cycle_name

/parm ( .FIL .fil )

/vliparm ( .parm .sed )

/dssdatn

/edwID

/ backup

/data

EDWS Common Cycle Shell Script 33

/logs

EDWS Common Cycle Shell Script 34

OCS actions will create files containing information such as: data file received date and time, start processing date and time for each data file, end processing date and time for each data file, and Terdata/UNIX errors. These files are generated in an application specific directory under /appl2/DSSscript/ocsapps. The OCS application will then process these files and populate tables to be later used by Business Objects.

Four types of OCS actions will need to be used in each application. Some will only be used once, while others may need to be used several times. OCSFIL will need to be place in the beginning of every job that retrieves files from a Connect Direct directory. Typically this OCSFIL is only used once. OCSSTR will need to be place at the end of every job that begins processing data files. An OCSSTR action will need to be created for each data file to be processed. Processing a data file can begin at a Split program or a Fastload/Multiload action. OCSERR will need to be place at the end of every job and OCSEND will only need to be place at the end of the final processing job. OCSEND must be place after all other OCS actions

EDWS Common Cycle Shell Script 35

Online Control System (OCS) Actions

Order of Use:

1) OCSFIL 2) OCSSTR3) OCSERR4) OCSEND

Here is an example:

REM Beginning of job!OCSFIL BREAK OCSFIL1 CHECK NOCHK DUMMY6 FW DUMMY8 DUMMY9 NOCHK rpc1451 t62tst 4 4 DUMMY15

.

.

. Here is where data is retrieved from the cdunix directory and processed…

.

.OCSSTR BREAK OCSSTR1 NOCHK NOCHK DUMMY6 FW.7400.1 DUMMY8 DUMMY9 NOCHK rpc1451 t62tst SPLIT FW.7400.1 DUMMY15

OCSSTR BREAK OCSSTR2 NOCHK NOCHK DUMMY6 FW.6360.1 DUMMY8 DUMMY9 NOCHK rpc1451 t62tst SPLIT FW.6360.1 DUMMY15

OCSSTR BREAK OCSSTR3 NOCHK NOCHK DUMMY6 FW.6360.2 DUMMY8 DUMMY9 NOCHK rpc1451 t62tst SPLIT FW.6360.2 DUMMY15

OCSSTR BREAK OCSSTR4 NOCHK NOCHK DUMMY6 FW.7100.1 DUMMY8 DUMMY9 NOCHK rpc1451 t62tst SPLIT FW.7100.1 DUMMY15

OCSERR BREAK OCSERR1 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8 DUMMY9 NOCHK rpc1451 t62tst DUMMY13 DUMMY14 DUMMY15

OCSEND BREAK OCSEND1 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8 DUMMY9 NOCHK rpc1451 t62tst DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 36

Run LogsRun logs provide an audit trail by writing to two places, thus creating a backup. Be aware of the following information you need to know about run logs:

When the process is complete, a time and date stamp will be appended to the end of the log file’s filename.

If the process is successful, no notification is given. If the process is unsuccessful, an error is listed in the error log (in the name of the directory that you specified with BKLOGDIR).

If the process is successful, the backup copy is deleted.

Another directory level has been added by cycle name, using the following syntax: logs/cyclename/APPIDrunlog

System Outage Preparation

Teradata scheduled outage

If a Teradata outage is required and the UNIX only node is not affected, Teradata processing can be paused. This can ensure that no jobs will fail during the outage. By placing an empty file called passlock.lock in the /app2/DSSscript/prod_script directory, all future Common Script actions will not execute. Instead, all jobs and future jobs will be placed into an endless loop, which will only break out when the passlock.lock file is removed. This will not abort active actions. For example, if a BTEQ script is executing during the time of the passlock.lock creation, the BTEQ script will not abort and will be allowed to complete. It is only right before the next action (BTEQ, MLOAD, MISC UNIX commands) will the job enter the endless loop. Therefore, it is always wise to create the passlock.lock file 15 minutes prior to the scheduled outage. This will allow enough time for the current action to complete. After the Teradata nodes are back online and fully functional, remove the passlock.lock file to free up processing. All jobs affected will continue on processing within 60 seconds.

UNIX scheduled outage

If the UNIX only node is scheduled for an outage and unable to place jobs on HOLD, all active jobs can be aborted. This can be accomplished by placing an empty file called abortlock.lock in the /appl2/DSSscript/prod_script directory. This will not abort active actions. For example, if a BTEQ script is executing during the time of the abortlock.lock creation, the BTEQ script will not abort and will be allowed to complete. It is only right before the next action (BTEQ, MLOAD, MISC UNIX commands) will the job abort out. This is a clean abort. Meaning, the only action required to restart a job is to call operations to execute. The job will pick up right where it left off. It is always wise to create the abortlock.lock file 15 minutes prior to the scheduled outage. This will allow enough time for the current action to complete prior to the outage.

EDWS Common Cycle Shell Script 37

Miscellaneous Common Script Functions

EDWS Common Cycle Shell Script 38

This section provides hints, tips, and tricks that may be helpful when you use the common script. Please notify EDW Maintenance and Support- if you would like to add information to this list in the next release of this document.

Forward-slash in directory namesThe common script automatically inserts a forward-slash between the directories (SRCDIR, DESTDIR) and the filenames (SRCFILE, DESTFILE). When entering in a directory instead of the defaults (DUMMY6, DUMMY8), make sure you do not enter in a forward-slash at the end of the directory parameter. If you add a forward-slash at the end of the directory name, the resulting directory will contain a double forward-slash (//).

Wildcard searchIt is possible to use wildcards on the move, remove, copy, and other functions by splitting the directory path between the SRCDIR and SRCFILE. For example if you wanted to use the following directory with a wildcard on a filename: /appl1/dssys/data/*, a user of Common Script will need to set SRCDIR to ‘/appl1/dssys’ and SRCFILE to ‘data/*.

Variables in Parameter FilesWhen using variables in a Parameter file a backslash must be placed in front of the variable at all times. If a wildcard is used with a variable, a backlash must also be place in front of the wildcard. For example, If a SRCDIR is set to $TMPWRK and a SRCFILE is set to FW.1601*, the SRCDIR and SRCFILE will need to be defined as follows: \$TMPWRK FW.1601\*. In this example, if the SRCDIR was written out (/tmpwrk4/edwep/data), the backslash in front of the wildcard is not needed.

Other concerns with using a variable in a parameter file is when the variable in imbedded within a filename. For example: FW.1601.1.\$BATCHNO_99\*. The ‘_99’ is not part of the variable name and therefore should be in-closed within curly-brackets to avoid confusion. The above mentioned filename in the parameter file should be written out as follows: FW.1601.1.\${BATCHNO}_99\*.

EDWS Common Cycle Shell Script 39

Hints, Tip, and Tricks

Comments in Action Parameter FilesWhen adding a comment line to an Action Parameter File, be careful not to add any special characters. Only use alpha, numeric and punctuation characters. For example instead of writing ‘Loads & extracts data files’, write ‘Loads and extracts data files’. Removing the ‘&’ from the comment. Special characters can cause a great deal of problems with Common Script. Odd error messages may be displayed or a job may ‘hangup’. Reasons for these errors are still under investigation. In addition, make sure a space is provided after the REM command. For example, ‘REM This is a valid comment line!’.

Unique names when you are searching and replacing text stringsBe cautious of the order in which you are searching, renaming and replacing text strings. The order of the execution of the command impacts what text strings will be found.

EDWS Common Cycle Shell Script 40

EDWS Common Cycle Shell Script Functions

The following section provides all of the functions that are used with EDWS Common Cycle Shell Script.

EDWS Common Cycle Shell Script 41

This action adds the data file’s sequence number to the end of each record. ADDBAT reads in the data file’s sequence number from a batch file located in the application’s PARM directory. ADDBAT must be executed before the sequence number is incremented or before the INCBAT action.

ADD Batch can only be executed after it’s corresponding Check Batch (CHKBAT) action has been performed.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID SEQFILE Delimiter Extension

ADDBAT BREAK ADDBAT1 CHECK NOCHK DUMMY6 US.PROD1 DUMMY8DUMMY9 CHECK Rpc1356 DUMMY12 US.PROD DUMMY14 DUMMY15

ADDBAT NOBRK ADDBAT2 NOCHK NOCHK /tmpwrk1 ALLFILES DUMMY8DUMMY9 NOCHK Rpc1356 DUMMY12 US.PROD 2 4

ACTION - ADDBAT adds a sequence number to the end of each record stored in the source file. The sequence number is retrieved from the batch file located in the PARM directory.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If “CHECK” is selected and the SRC FILE is not located, this step will be skipped and considered to terminate normally. If ”NOCHK” is selected, file existence will not be checked.

EDWS Common Cycle Shell Script 42

ADDBAT

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file already exists. The destination file is the source file with a “out” extension. If DEST CHECK is set to “NOCHK”, an existing file will be overwritten.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application’s data directory is the default directory.

SRC FILE - This is the source filename. This is the file that contains the records that the sequence number will be added to. If “ALLFILES” is used here, all files within the source directory will have a sequence number added.

DEST DIR - This is the destination file path. If this parameter is defaulted to “DUMMY8”, then the cycle’s default data path is used. When using “ALLFILES”, make sure your destination directory is NOT the source directory. After new files are placed into the destination directory, all files in the source directory will be removed upon successful completion of this action.

DEST FILE - This is the destination filename. If “DUMMY9” is used here, the destination filename will be set to the source filename with a “out” extension. (see parameter #15 to specify other extension)

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and ADDBAT returns a failure, the process will abort. If this parameter is set to “NOCHK,” ADDBAT will always return a successful status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not needed.

EDWS Common Cycle Shell Script 43

SEQFILE – This is the name of the batch file. The batch file that is located in the PARM directory is entered here. This parameter must be present or ADDBAT will abort.

DELIMITER – This parameter is used for delimited file types. If numbers 1 through 4 are used, a delimiter is placed BEFORE the batch number. 1=TAB, 2=PIPE, 3=COMMA, 4=PERIOD. The only valid options are 1 through 4 and “DUMMY14”.

EXTENSION – This parameter is used to determine which extension to place on the destination filename. DUMMY15=out, DUMMY=out, 1=dat, 2=fil, 3=txt, 4=no extension. To be used only with multiple files.

EDWS Common Cycle Shell Script 44

This action changes fixed length data files into pipe delimited data files.

In order to determine where to place a pipe delimiter, a parameter file is needed. This parameter file should have a ‘.parm’ extension and needs to reside in the application’s vliparm directory.

The parm file consists of a WRITEACTION command, which is always placed on the first line and must be in CAPS. The rest of the parm file consists of field type and length definitions. This is usually cut and pasted from a Multiload script. ‘.field’ and ‘.filler’ are the only valid options.

There are two WRITEACTION options when placing a pipe delimiter. First, is the OVERWRITE option. OVERWRITE will replace any characters with a pipe in between each defined field. Second, is the INSERT option. INSERT will place a pipe between each define field and will not replace any characters.

Example of OVERWRITE parm and data before/after files:

WRITEACTION OVERWRITE .field RECORD_TYPE *VARCHAR(1); .field FIELD_INDICATOR *VARCHAR(1); .field BUYER_ID *VARCHAR(9); .field BUYER_NAME *VARCHAR(25);.field LOCALITY *VARCHAR(10);.field BATCH_NUMBER *VARCHAR(5);

Before data file:D,I,123456789,Terry Rankin ,12345678 ,00010

After data file:D|I|123456789|Terry Rankin|12345678|00010

EDWS Common Cycle Shell Script 45

Add Delimiter

Example of INSERT parm and data before/after files:

WRITEACTION INSERT .field RECORD_TYPE *VARCHAR(1); .field FIELD_INDICATOR *VARCHAR(1); .field BUYER_ID *VARCHAR(9); .field BUYER_NAME *VARCHAR(25);.field LOCALITY *VARCHAR(10);.field BATCH_NUMBER *VARCHAR(5);

EDWS Common Cycle Shell Script 46

Before data file:DI123456789Terry Rankin 12345678 00010

After data file:D|I|123456789|Terry Rankin|12345678|00010

Notice that the extra spaces are also removed. This will only happen if parameter #13 has NOSPACE specified.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID NO SPACE UNUSED UNUSED

ADDDLM BREAK xyz.parm CHECK NOCHK DUMMY6 xyz.dat DUMMY8xyz.fil CHECK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ADDDLM NOBRK xyz.parm NOCHK NOCHK DUMMY6 xyz.dat DUMMY8xyz.fil NOCHK DUMMY11 DUMMY12 NOSPACE DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 47

ACTION – ADDDLM identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is where the name of the parameter file is placed. This should have a ‘.parm’ extension and reside in the application vliparm directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then ADDDLM will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then ADDDLM will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE – The name is the fixed length data file is placed here.

DEST DIR - This is the destination file path. If no path is provided, the application’s data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the destination file name.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to

“CHECK,” then ADDDLM will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and ADDDLM will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by ADDDLM. If this parameter contains anything other than “DUMMY12,” ADDDLM will fail.

NO SPACE - This parameter will determine if extra spaces should be removed. Extra spaces are defined as back to back spacing. If NOSPACE is placed here, all extra spaces will be removed within the resulting data file. If “DUMMY13” or “DUMMY” is used, all spacing will remain.

Addlength reads the input file, calculates the length of each record, and adds it onto the front of each record. Lastly, Addlength writes the new record to the output file.

This action is no longer required to be located in the cobj sub-directory of an application. There is a standard addlength program that runs out of /bin, and the common script takes advantage of this.

ADDLENGTH

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

ADDLEN BREAK ADDLEN1 CHECK CHECK DUMMY6 abc /dataAbc.al NOCHK Ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ADDLEN NOBRK ADDLEN2 NOCHK NOCHK /dssdat2 xyz DUMMY8xyz.al NOCHK Ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - ADDLEN identifies this as an Addlength parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If “CHECK” is selected and the SRC FILE is either not located or is located but has a length of 0, this step will be skipped and considered to terminate normally. If ”NOCHK” is selected, file existence will not be checked. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file in DEST FILE already exists. If this is set to “NOCHK,” the destination file in DEST FILE will be created if the file does not exist, or will be overwritten if the file does exist. The DEST FILE parameter must not be defaulted to DUMMY9.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

EDWS Common Cycle Shell Script 52

SRC FILE - This is the source filename. This is the input file for addlength. Addlength will fail if this parameter is defaulted to DUMMY7.

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this directory as addlength creates it. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the destination filename. This is the name of the file output by addlength. If this parameter is defaulted to DUMMY9, addlength will abort.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and addlength returns a failure, the process will abort. If this parameter is set to “NOCHK,” addlength will always return a successful status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by addlength. If this parameter contains anything other than DUMMY12, addlength will fail.

EDWS Common Cycle Shell Script 53

You DO NOT need to use this action if “FORMAT VARTEXT” is used in the MLOAD script. The default is a “|” delimiter.

Addvli creates a Fastload formatted UNIX file by adding a 2 byte VLI to the front of each data record.

A parameter file must be created defining the criteria for generating the VLI in the records of the output file. The parameter file must have the extension “.parm” and must be loacted in the “vliparm” directory under the /appl*/edw**/ directory. The parameter file contains 3 lines:

1 st line: (choose one)

MODE1 (to denote fixed length input, fixed length output).

MODE2 (to denote fixed length input, variable length output).

MODE3 (to denote variable length input, variable length output).

2 nd line: (choose one)

DELIMITER “?” (any valid text character may be included where “?” is).

DELIMETER “NONE” (to denote no delimination).

NOTE: The standard WWIS delimiter is a TAB.

3 rd line:

Looks like this: 50t|9N|8N|10T|10T|3N

Each field would contain a 1). Maximum record length

2). Type identifier: T = Text

EDWS Common Cycle Shell Script 54

ADDVLI

N = Numeric.

Each length & identifier must be separated by pipe “|” symbol.

All records within that file must conform to the parameter file

definitions.

EDWS Common Cycle Shell Script 55

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

ADDVLI BREAK Xxx.parm CHECK CHECK DUMMY6 abc DUMMY8abc.fil NOCHK rpc1261 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ADDVLI NOBRK Zzz.parm NOCHK NOCHK /dssdat2 xyz DUMMY8xyz.fil NOCHK rpc1261 DUMMY12 DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 56

ACTION - ADDVLI identifies this as an ADDVLI parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - (use the xxxxx_xxxxx.parm file that defines the input record here) This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If “CHECK” is selected and the SRC FILE is either not located or is located but has a length of 0, this step will be skipped and considered to terminate normally. If ”NOCHK” is selected, file existence will not be checked. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file in DEST FILE already exists. If this is set to “NOCHK,” the destination file in DEST FILE will be created if the file does not exist, or will be overwritten if the file does exist. The DEST FILE parameter must not be defaulted to DUMMY9.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the input file for addvli. Addvli will fail if this parameter is defaulted to DUMMY7.

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this directory as addvli creates it. If no path is provided,

EDWS Common Cycle Shell Script 57

the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the destination filename. This is the name of the file output by addvli. If this parameter is defaulted to DUMMY9, addvli will abort.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and addvli returns a failure, the process will abort. If this parameter is set to “NOCHK,” addvli will always return a successful status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by addvli. If this parameter contains anything other than DUMMY12, addvli will fail.

EDWS Common Cycle Shell Script 58

Append will concatenate multiple files into one file.

EDWS Common Cycle Shell Script 59

APPEND

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED EXTENSION

APPEND BREAK APPEND1 CHECK NOCHK /tmpwrk1 tmp/abc* DUMMY8Abc NOCHK Rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

APPEND NOBRK APPEND2 CHECK NOCHK /tmpwrk1 ALLFILES DUMMY8Xyz CHECK Rpc1356 DUMMY12 DUMMY13 DUMMY14 1

EDWS Common Cycle Shell Script 60

ACTION - APPEND identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If the “CHECK” option is used, the SRC FILE parameter must not be defaulted to “DUMMY7.” If “CHECK” and the file is either not there or empty, then APPEND will be skipped and a normal status returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file in DEST FILE already exists. If this is set to “NOCHK,” the destination file in DEST FILE will be created if it does not exist or overwritten if it does exist. The DEST FILE parameter must not be defaulted to “DUMMY9.” “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the filename that will reference the files to be concatenated. If “ALLFILES” is used here, all files in the source directory will be concatenated.

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this path as MOVE creates it. If this parameter is

EDWS Common Cycle Shell Script 61

defaulted to “DUMMY8,” then the cycle’s default data path is used. When using “ALLFILES”, make sure your destination directory is NOT the source directory. After new files are placed into the destination directory, all files in the source directory will be removed upon successful completion of this action.

DEST FILE - This is the destination filename. This is the new name of the file created by APPEND. “DUMMY9” will be used here if appending multiple files. (See parameter #15 to specify extension)

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and the APPEND returns a failure, the process will abort. If this parameter is set to “NOCHK” and the APPEND fails, the process will continue processing and ignore the failure.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by APPEND. If this parameter contains anything other than “DUMMY12,” APPEND will fail.

EXTENSION – This parameter will determine which extension to place on the destination filenames. DUMMY15=out, DUMMY=out, 1=dat, 2=fil, 3=txt, 4= no extension. To be used only with multiple files.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then APPEND will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and APPEND will return a normal status.

EDWS Common Cycle Shell Script 62

Archive will combined multiple files into a archive file.

EDWS Common Cycle Shell Script 63

ARCHIVE

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

ARCH BREAK ARCH1 CHECK NOCHK DUMMY6 Abcd* DUMMY8Zipped.arc CHECK rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ARCH NOBRK ARCH2 NOCHK NOCHK DUMMY6 Wxyz* /dssdat2Zipped2.arc NOCHK rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 64

ACTION - ARCHIVE identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file either does not exist or is empty, then ARCHIVE will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist , then ARCHIVE will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be archived. If no filename is specified, all files that reside in the source directory will be archived. The common script recognizes this by the use of the name “DUMMY7” in this parameter.

DEST DIR - This is the destination file path. If no path is provided, the SRC DIR is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

EDWS Common Cycle Shell Script 65

DEST FILE - This is the archived filename, that will be created from the source. ARCHIVE will fail if this parameter is defaulted to “DUMMY9”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then ARCHIVE will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and ARCHIVE will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by ARCHIVE. If this parameter contains anything other than “DUMMY12,” ARCHIVE will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then ARCHIVE will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and ARCHIVE will return a normal status.

EDWS Common Cycle Shell Script 66

BTEQ actions can perform any SQL command defined in query scripts location in the application’s BTEQ directory.

Every SQL command in a bteq script must now be followed by: .if errorcode > 0 then .quit

EDWS Common Cycle Shell Script 67

BTEQ

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID Retry Wait Time UNUSED

BTEQ BREAK fn010tbl.ins CHECK NOCHK DUMMY6 abc DUMMY8DUMMY9 NOCHK ipc35t Ipc44t DUMMY13 DUMMY14 DUMMY15

BTEQ NOBRK fn010tbl.ins NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc35t Ipc44t YES 10 DUMMY15

EDWS Common Cycle Shell Script 68

ACTION - BTEQ identifies this as a TOS BTEQ parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is the name of the bteq script to be executed. This script must be located in the APPLDIR/exec/bteq directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If this parameter is set to “NOCHK,” the SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. “CHECK and “NOCHK” are the only valid options. If “CHECK” is chosen, the file given will be located. If the file does not exist, or if the file exists with a length of 0, the BTEQ will be skipped and terminate with a normal status.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. For BTEQ, this must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter. If SOURCE CHECK is set to “NOCHK,” then SRC DIR must be set to “DUMMY6.”

SRC FILE - This is the source filename. This filename is not actually used by BTEQ. If SOURCE CHECK contains “CHECK,” the script will check to see if the source file exists. If the file does not exist or the file is empty, the script will be skipped. If SOURCE CHECK is set to “NOCHK,” this parameter must be set to “DUMMY7” , and the script will unconditionally run.

EDWS Common Cycle Shell Script 69

DEST DIR - This is the destination file path. For BTEQ, this must be set to “DUMMY8.”

DEST FILE - This is the destination filename. For BTEQ, this must be set to “DUMMY9.”

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. For BTEQ, this must be set to “NOCHK.”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC on which the BTEQ action will run.

RETRY – If this parameter is set to “YES” the retry option is invoked. This is used if an another application or job renames the table being accessed in your BTEQ statement. The WAIT TIME parameter is also needed if RETRY is used. The only valid options are “DUMMY13” or “YES”.

WAIT TIME – This parameter is used to give the retry option a waiting period before re-executing the BTEQ statement. The only valid options are 1 through 10 and “DUMMY14”. 1=60 seconds and 10=600 seconds.

Error checking:

All error checking in BTEQ is done using the .”IF ERRORCODE > 0 then .QUIT” command. This command must follow all BTEQ statements terminated by a semicolon (;).

EDWS Common Cycle Shell Script 70

BTEQ EXPORT is a Teradata utility that reads a table and extracts rows into a UNIX file.Every SQL command in a bteq export script must now be followed by: .if errorcode > 0 then .quit

EDWS Common Cycle Shell Script 71

BTEQ EXPORT

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

BEXP BREAK fn004dl.bx CHECK CHECK DUMMY6 abc DUMMY8Tracker.out NOCHK ipc35t ipc44t DUMMY13 DUMMY14 DUMMY15

BEXP NOBRK fn004dl.bx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc35t ipc44t DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 72

ACTION - BEXP identifies this as a TOS BTEQ export parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is the name of the BTEQ export script to be executed. This script must be located in the APPLDIR/exec/bteq directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK,” then SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. “CHECK” and “NOCHK” are the only valid options. If this is set to “CHECK” then the filename given will be checked. If located and not empty, processing will continue. If not, the BTEQ Export will be skipped and a normal status will be returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. If this parameter is set to “NOCHK,” existing data files will be overwritten. If this parameter is set to “CHECK” and the DEST FILE exists with a length greater than 0, the script will abort. “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, then the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter. If SOURCE CHECK is set to “NOCHK” this parameter must be set to “DUMMY6.”

EDWS Common Cycle Shell Script 73

SRC FILE - This is the source filename. This filename is not actually used by BEXP. If the SOURCE CHECK contains “CHECK,” the script will check to see if the source file exists. If it does not exist or is empty, the script will be skipped. If “NOCHK” is chosen, this parameter must be set to “DUMMY7.”

DEST DIR - This is the destination file path to put the BEXP output file. If it is defaulted to “DUMMY8,” then the Fast Export will output the data into the $APPLDIR/data directory.

DEST FILE - This is the destination filename. For BEXP, this must be set to “DUMMY9” unless DEST CHECK contains “CHECK.” If DEST CHECK contains “CHECK,” DEST FILE must not be defaulted to “DUMMY9.” The BEXP script contains the output filename.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. For BEXP, this must be set to “NOCHK.”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC that the BEXP action will run on.

Error checking:

All error checking in BTEQ export is done using the .”IF ERRORCODE > 0 then .QUIT” command. This command must follow all BTEQ statements terminated by a semicolon (;).

EDWS Common Cycle Shell Script 74

This function will concatenate all files within a control file. Refer to Control File for more information.

EDWS Common Cycle Shell Script 75

CATCNT

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID NEW FILE UNUSED UNUSED

CNTCAT BREAK CATI CHECK NOCHK DUMMY6 abc /dssdat1DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

CATCNT NOBRK CAT2 NOCHK NOCHK /dssdat2 xyz DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 2 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 76

ACTION - CATCNT identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, CATCNT will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, CATCNT is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. With this function this parameter must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name to “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the control file that contains the text files that will be concatenated. CATCNT will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. The destination filenames derived from the control file will be placed in this path as CATCNT creates it. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

EDWS Common Cycle Shell Script 77

DEST FILE - This is the destination filename. This parameter must be set to “DUMMY9.”

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and the CATCNT returns a failure, the process will abort. If this parameter is set to “NOCHK” and the CATCNT fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by CATCNT. Currently this parameter is not checked.

NEW FILE – Shows what part of the filenames within the control file is used to derive the final filename. The default in position 2 which is set by entering “DUMMY13” or “2”.

EDWS Common Cycle Shell Script 78

Check Batch compares data files in a receive directory to the sequence number defined in a batch file located in the application’s PARM directory. If the data file’s sequence number matches the batch file’s value, then the data file is copied to a destination directory and the old data file in the receive directory is removed. A null copy of the original data file is also placed in the application’s temp directory. This creates a running list of data files that were checked and are readly for loading. This list is later accessed by the Increment Batch action to determine whether to advance the batch sequence number.

A batch file must be located in the application’s PARM directory for each data file! Each batch file must be named after the corresponding data file excluding the time stamp and sequence number. Each batch filemust have a ‘SEQ’ extension. For example if the data file is called US.PRODUCT.0730991230.301, the batch file will need to be named US.PRODUCT.SEQ. Each batch file will contain only one line with a sequence number. For example, using the above data file, US.PRODUCT.SEQ will contain only one line reading 301. IF a batch file is not present for each data file, CHKBAT will abort!

A variable TMPWRK must be defined in the application’s configuration file. This variable will point to the application’s TMPWRK work directory. The application’s configuration file must have the variable TMPWRK defined as the following:

TMPWRK=/tmpwrkX/dssYY/work

Where X=1-4 and YY=application id.

Files in the tmpwrk directory should be remove after all data file have been processed.

EDWS Common Cycle Shell Script 79

CHKBAT

EDWS Common Cycle Shell Script 80

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID SEQ POS UNUSED UNUSED

CHKBAT BREAK CHKBAT1 CHECK CHECK DUMMY6 US.PROD DUMMY8US.PROD1 CHECK Rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

CHKBAT NOBRK CHKBAT2 NOCHK NOCHK DUMMY6 US.PROD /tmpwrk1US.PROD1 NOCHK Rpc1356 DUMMY12 3 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 81

ACTION - CHKBAT checks the sequence number stored in the batch file located in the PARM directory with data files located in the Source directory. If the sequence number matches, then the data file is copied to the destination directory and the old data file is removed.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If “CHECK” is selected and the SRC FILE is not located, this step will be skipped and considered to terminate normally. If ”NOCHK” is selected, file existence will not be checked. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file in DEST FILE already exists. If this is set to “NOCHK,” the destination file in DEST FILE will be created if the file does not exist, or will be overwritten if the file does exist. The DEST FILE parameter must not be defaulted to DUMMY9.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application’s Connect-Direct Receive directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. A standard data file name has four parts (CC.NAME.DATE.SEQ). 1 – Country Code (US), 2 – Name (PRODUCT), 3 – Time Stamp (0730991230), 4 – Sequence number (301). The Source File must be named after the corresponding data

EDWS Common Cycle Shell Script 82

file excluding the time stamp and sequence number. Wildcards cannot be used here! If a file called US.PRODUCT.0730991230.301 is to be checked, the Source File name can only be US.PRODUCT (Not US.PRODUCT*). CHKBAT will fail if this parameter is defaulted to DUMMY7.

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the destination filename. This is the name of the data file after it is placed in the destination directory. If this parameter is defaulted to DUMMY9, the SOURCE filename will be used here.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and CHKBAT returns a failure, the process will abort. If this parameter is set to “NOCHK,” CHKBAT will always return a successful status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - Because CHKBAT is a UNIX action, the TOS ID is not needed. If this parameter contains anything other than DUMMY12, CHKBAT will fail.

SEQ POS – This is the position of the sequence number located in the data file’s name. CHKBAT has to match the sequence number in the batch file to the sequence number located in the data file’s name. The default for this parameter is 4 . The common script recognizes this by the use of the name “DUMMY13” in this parameter. A standard data file’s name has the sequence number in it’s fourth position. For example, US.PRODUCT.0730991230.301.

EDWS Common Cycle Shell Script 83

The purpose of this function is to determine the amount of free UNIX disk space available for a specific directory path.

EDWS Common Cycle Shell Script 84

CHKDSK

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

CHKDSK BREAK DSKCHK1 DUMMY4 DUMMY5 /appl1 DUMMY7 /DUMMY8DUMMY9 ipc35t DUMMY12 10 DUMMY14 DUMMY15

CHKDSK NOBRK DSKCHK2 DUMMY4 DUMMY5 /dssdat2 DUMMY7 DUMMY8DUMMY9 CHECK ipc35t DUMMY12 30 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 85

ACTION - CHKDSK identifies this line as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if it fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. It is not used by this function and should be set to NOCHK.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. It is not used by this function and should be set to NOCHK.

SRC DIR - This is the directory which will be checked to determine the percentage of free disk space. It must be set to the file system to be checked.

SRC FILE - This is the source filename. This parameter is not used by this function and should be set to DUMMY7.

DEST DIR - This is the destination file path. This parameter is not used by this function and should be set to DUMMY8.

DEST FILE - This is the destination filename. This parameter is not used by this function and should be set to DUMMY9.

ERROR CHK - If this parameter is set to “CHECK” and the CHKDSK returns a failure, the process will abort. If this parameter is set to “NOCHK” and the CHKDSK fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

EDWS Common Cycle Shell Script 86

UNIX ID - This is the UNIX processor where the action runs.

TOS ID - The TOS ID is not used by CHKDSK and should be set to DUMMY12.

MISC PARM - Enter the minimal amount of free disk space to check for.

EDWS Common Cycle Shell Script 87

This action checks a fixed length data file’s record size. If a record’s length varies from what has been defined, an error message is generated in the application’s email directory. In addition, the data file is rebuilt without the invalid records or incorrect record lengths.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID REC SIZE LOOP UNUSED

CHKREC BREAK chkrec1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 512 50 DUMMY15

CHKREC NOBRK chkrec2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 256 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 88

Check Record

ACTION – CHKREC identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then CHKREC will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then CHKREC will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - Fixed length data file is placed here.

DEST DIR - This is the destination file path. If no path is provided, the application’s data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the destination file name.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then FILECHK will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and CHKREC will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by CHKREC. If this parameter contains anything other than “DUMMY12,” CHKREC will fail.

REC SIZE - This is the record length parameter. Place the fixed record length value here.

LOOP - This parameter is used to determine how many times CHKREC will loop through a data file if any invalid lengths are encountered. For example, if the value of 50 is used here, a data file could have up to 50 invalid records removed and reported. Anything greater then this value will cause this action to abort. If “DUMMY14” or “DUMMY” is used, LOOP is defaulted to 1 pass.

This action will change permissions on a specified file name.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID PERMIS UNUSED UNUSED

CHMOD BREAK CHMOD1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 777 DUMMY14 DUMMY15

CHMOD NOBRK CHMOD2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 755 DUMMY14 DUMMY15

CHMOD

ACTION – CHMOD identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then CHMOD will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then CHMOD will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the file name to have its permissions changed.

DEST DIR - This is not used for this action. This needs to be “DUMMY8” or “DUMMY”.

DEST FILE - This is not used for this action. This needs to be “DUMMY9” or “DUMMY”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then CHMOD will fail if an error occurs, and

the script will abort. If “NOCHK” is set, then any error received will be ignored and CHMOD will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by CHMOD. If this parameter contains anything other than “DUMMY12,” CHMOD will fail.

PERMIS – Permissions are placed here. For example, 777 or 755.

Compress reduces the size of the named file using adaptive Lempel-Ziv coding. Whenever possible, each file is replaced by one with a .Z extension. The ownership modes, access time, and modification time will stay the same.

COMPRESS

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

COMP BREAK COMP1 CHECK NOCHK DUMMY6 Zipped.arc DUMMY8DUMMY9 CHECK rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

COMP NOBRK COMP2 NOCHK NOCHK /dssdat1 Zipped2.arc DUMMY8DUMMY9 NOCHK rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION – COMP identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the file either does not exist or is empty, then COMPRESS will be skipped and a normal status is returned.

DEST CHECK - This parameter must be set to “NOCHK” for COMPRESS.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the source file that will be compressed. If no filename is given, then all files that reside in the source directory will be compressed. The common script recognizes this by the use of the name “DUMMY7” in this parameter.

DEST DIR – This is the destination file path. This parameter must be set to “DUMMY8”.

DEST FILE – This is the destination file name. This parameter must be set to “DUMMY9”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then COMPRESS will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and COMPRESS will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by COMPRESS. If this parameter contains anything other than “DUMMY12,” COMPRESS will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then COMPRESS will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and COMPRESS will return a normal status.

This action copies file(s) to a specified destination directory. The UNIX command ‘cp –p’ is used here to maintain filename’s date and time.

COPY

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID CHG DATE UNUSED UNUSED

COPY BREAK COPY1 CHECK CHECK DUMMY6 abc /dssdat1Abc NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

COPY NOBRK COPY2 CHECK NOCHK /dssdat2 xyz DUMMY8Xyz NOCHK ipc35t DUMMY12 CHG DUMMY14 DUMMY15

ACTION - COPY identifies this as a UNIX parameter line

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK,” then SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and the file either does not exist or is empty, then COPY is skipped and returns a normal status.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file in DEST FILE already exists. If DEST CHECK is set to “NOCHK,” an existing file will be overwritten. “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be copied. Copy will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this path as COPY creates it. If this parameter is

EDWS Common Cycle Shell Script 100

defaulted to “DUMMY8,” then the cycle’s default data path is used.

DEST FILE - This is the destination filename. This is the new name of the file created by COPY. This parameter must be present or COPY will abort.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and the COPY returns a failure, the process will abort. If this parameter is set to “NOCHK” and the COPY fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by COPY. If this parameter contains anything other than “DUMMY12,” COPY will fail.

CHG DATE – If this parameter is “DUMMY13” or “DUMMY”, a ‘cp –p’ command is used. This will preserves the modification time, access time and permission modes. Anything other than the default “DUMMY” value will result in a regular copy.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then the copy will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and the copy will return a successful status.

EDWS Common Cycle Shell Script 101

The purpose of this function is to copy files listed within a control file from one directory to another and then remove the source files.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

CPRMCNT BREAK CPRM CHECK NOCHK DUMMY6 abc /dssdat1DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

CPRMCNT NOBRK CPRM NOCHK NOCHK /dssdat2 xyz DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - CPRMCNT identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if it fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, CPRMCNT will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, CPRMCNT is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to determine its recovery point if it fails. This parameter must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the

EDWS Common Cycle Shell Script 102

CPRMCNT

default directory. The common script recognizes this by the use of the name to “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the control file that contains the text files that are to be moved. CPRMCNT will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. The destination filenames derived from the control file will be placed in this path as CPRMCNT creates it. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

DEST FILE - This is the destination filename. This parameter must be set to “DUMMY9.”

ERROR CHK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK” and the CPRMCNT returns a failure, the process will abort. If this parameter is set to “NOCHK” and the CPRMCNT fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by this function. It should be set to DUMMY12.

EDWS Common Cycle Shell Script 103

This action will decrypt a specified PGP file name. Please note that this process does not take place on the EDW server. File Transfer Services is owner of the PGP server and license. Therefore, data files are simply just moved into a Connect Direct directory and transferred over to the PGP server for decryption. Once the process is complete, the decrypted data file will be sent back over to EDW via Connect Direct without the ‘.pgp’ extension.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

DECRY BREAK DECRY1 CHECK NOCHK DUMMY6 xyz.pgp DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

DECRY NOBRK DECRY2 NOCHK NOCHK DUMMY6 xyz.pgp DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION – DECRY identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then DECRY will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then DECRY will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the

EDWS Common Cycle Shell Script 104

DECRY

default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the file name to be decrypted.

DEST DIR – This is the destination path. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter

DEST FILE - This is not used for this action. This needs to be “DUMMY9” or “DUMMY”. Destination file will always be source file name without the ‘.pgp’ extension.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then DECRY will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and DECRY will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by DECRY. If this parameter contains anything other than “DUMMY12,” DECRY will fail.

EDWS Common Cycle Shell Script 105

This action will compare a data file to a set of data files already processed and determine if any differences exist. If a file is ‘alike’, the file is then moved to a specified directory. This action ensures the same data file is not processed twice.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID COMP DIR COMP FILE NO.FILE

DIFF BREAK DIFF1 CHECK NOCHK cdunix xyz.dat edw/dupDUMMY9 CHECK DUMMY11 DUMMY12 dssdat5 xyz.dat 1

DIFF NOBRK DIFF2 NOCHK NOCHK cdunix xyz.dat edw/dupDUMMY9 NOCHK DUMMY11 DUMMY12 dssdat5 xyz.dat 100

ACTION – DIFF identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then DIFF will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then DIFF will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

EDWS Common Cycle Shell Script 106

DIFF

SRC FILE - This is the source file name.

DEST DIR – This is the destination path. This is the directory in which duplicate files or files that are ‘alike’ are placed. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter

DEST FILE - This is not used for this action. This needs to be “DUMMY9” or “DUMMY”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and DIFF will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by DIFF. If this parameter contains anything other than “DUMMY12,” DIFF will fail.

COMP DIR - This is the directory where past processed data files reside.

COMP FILE - This is the past processed data file name

NO.FILE - This parameter defines how many data files ordered by UNIX date/time will be compared. For example, if the value of 100 is used here, the last 100 data files listed of UNIX date/time will be compared (ls -lrt).

EDWS Common Cycle Shell Script 107

COMPRESS

This action retrieves files from a Sybase database and puts them into a specified destination directory.

EDWS Common Cycle Shell Script 108

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

DUMP BREAK DUMP1 CHECK NOCHK /home/ sybase/bin

dsslog.sh DUMMY8

DUMMY9 CHECK rpc1356 3600PROD DUMMY13 DUMMY14 DUMMY15

DUMP NOBRK DUMP2 NOCHK NOCHK /home/ sybase/bin

dsslog.sh DUMMY8

DUMMY9 NOCHK rpc1356 3600PROD DUMMY13 DUMMY14 DUMMY15

ACTION - DUMP identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, DUMP will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, DUMP is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. With this function this parameter must be set to “NOCHK.”

SRC DIR - This is the source file path used for OLTP logs. The log script filename chosen in SRC FILE must be located in this directory. If no path is provided, the application will abort.

SRC FILE - This is the log script filename. DUMP will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

DEST FILE - This is the destination filename. This parameter must be set to “DUMMY9.ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and the DUMP returns a failure, the process will abort. If this parameter is set to

“NOCHK” and the DUMP fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID – This is the name of the Sybase database.

EMAIL sends a specified text file through E-mail to individuals defined within a control file.

EDWS Common Cycle Shell Script 112

EMAIL

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

EMAIL BREAK Email.txt CHECK NOCHK DUMMY6 Contrl DUMMY8DUMMY9 CHECK rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

EMAIL NOBRK Email.txt NOCHK NOCHK DUMMY6 Contrl DUMMY8DUMMY9 NOCHK rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 113

ACTION – EMAIL identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – Insert the name of the E-mail text file here. Please note, your E-mail text file must be located in the application’s EMAIL directory. If an EMAIL directory does not exist, you must create one (for example: appl1/dssbs/email). Also, this is a unique identifier that the common script uses to determine its recovery point if it fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, EMAIL will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, EMAIL is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to determine its recovery point if it fails. This parameter must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name to “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the control file that contains a list of E-mail addresses that will be checked. Please note, the control file can only contain one column or one E-mail address per line. The last line of the control file must read “EOF”. This is to let the action know that it has reached the end of the file and to continue on with processing.

EDWS Common Cycle Shell Script 114

DEST DIR - This is the destination file path. This parameter must be set to DUMMY8.

DEST FILE - This is the destination filename. This parameter must be set to DUMMY9.

ERROR CHK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK” and the EMAIL returns a failure, the process will abort. If this parameter is set to “NOCHK” and the EMAIL fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where the action runs.

TOS ID - The TOS ID is not used by EMAIL. Currently this parameter is not checked.

EDWS Common Cycle Shell Script 115

This action will apply PGP encryption to a specified file name. Please note that this process does not take place on the EDW server. File Transfer Services is owner of the PGP server and license. Therefore, data files are simply just moved into a Connect Direct directory and transferred over to the PGP server for encryption. Once the process is complete, the encrypted data file will be sent back over to EDW via Connect Direct with a ‘.pgp’ extension.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

ENCRY BREAK ENCRY1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ENCRY NOBRK ENCRY2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION – ENCRY identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then ENCRY will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then ENCRY will be aborted and a error status is returned.

EDWS Common Cycle Shell Script 116

ENCRY

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the file name to be encrypted.

DEST DIR – This is the destination path. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter

DEST FILE - This is not used for this action. This needs to be “DUMMY9” or “DUMMY”. Destination file will always be source file name with a ‘.pgp’ extension.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then ENCRY will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and ENCRY will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by ENCRY. If this parameter contains anything other than “DUMMY12,” ENCRY will fail.

EDWS Common Cycle Shell Script 117

FAST EXPORT is a Teradata utility that reads a table and extracts rows into a UNIX file.

EDWS Common Cycle Shell Script 118

FAST EXPORT

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

FEXP BREAK fn004dl.fx CHECK CHECK DUMMY6 abc /dataTracker.out NOCHK ipc35t ipc44t DUMMY13 DUMMY14 DUMMY15

FEXP NOBRK fn004dl.fx NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc35t ipc44t DUMMY13 DUMMY14 DUMMY15

ACTION - FEXP identifies this as a TOS fast export parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options. SCRIPT - This is the name of the fast export script this step will run. This script must be located in the APPLDIR/exec/fexp directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK,” then SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the file does not exist or is empty, FEXP will be skipped and return a normal status.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. If DEST CHECK is set to “NOCHK,” existing data files will be overwritten. If DEST CHECK is set to “CHECK” and the DEST FILE exists, the script will abort. “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter. If SOURCE CHECK is set to “NOCHK,” this parameter must be set to “DUMMY6.”

SRC FILE - This is the source filename. This filename is not actually used by FEXP. If the SOURCE CHECK contains “CHECK,” the script will check to see if the source file exists. If it does not exist or has a length of 0, the script will be skipped. If “NOCHK” is chosen, this parameter must be set to “DUMMY7.”

DEST DIR - This is the destination file path to put the Fast export output file. If it is defaulted to “DUMMY8,” then

EDWS Common Cycle Shell Script 120

the Fast Export will output the data into the $APPLDIR/data directory.

DEST FILE - This is the destination filename. For FEXP, DEST FILE must be set to “DUMMY9” unless DEST CHECK contains “CHECK.” If DEST CHECK contains “CHECK,” DEST FILE must not be defaulted to “DUMMY9.” The Fast Export script contains the actual output filename.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. For FEXP, this must be set to “NOCHK.”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC that the FEXP action will run on.

Error checking:

FEXP will return with whatever status the TOS fast export returned. 0 is considered valid, anything else is an error. No additional error checking is defined.

EDWS Common Cycle Shell Script 121

MULTILOAD should only be used! FASTLOAD will no longer be supported. MULTILOAD is easier to support and has more options.

FASTLOAD is a utility which loads records into a empty table using blocks of records and multiple amps. FASTLOAD is composed of 2 phases, the first phase reads the UNIX records, and writes them to TOS buffers on the amps. The second phase reads the TOS buffers and writes them to a TOS database table.

EDWS Common Cycle Shell Script 122

FASTLOAD

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

FLOAD BREAK fn010tmp.fl CHECK NOCHK /dssdat2 abc DUMMY8DUMMY9 0 ipc35t Ipc44t DUMMY13 DUMMY14 DUMMY15

FLOAD NOBRK fn010tmp.fl NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 7 ipc35t Ipc44t DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 123

ACTION - FLOAD identifies this as a TOS fastload parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is the name of the fastload script this step will run. This script must be located in the APPLDIR/exec/fastload directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If SOURCE CHECK is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If this parameter is set to “NOCHK,” then SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the SRC FILE either doesn’t exist or is empty, then FLOAD will be skipped and terminate with a normal status.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. For FLOAD, this must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This filename is not actually used by Fastload because the filename used for fastload is contained within the fastload script, but if the SOURCE CHECK option is chosen, FLOAD will check to see if the source file exists. If it does not exist or is empty, the script will be skipped. If SOURCE CHECK is set to “NOCHK,” SRC FILE must be set to “DUMMY7.”

DEST DIR - This is the destination file path. For FLOAD, this must be set to “DUMMY8.”

DEST FILE - This is the destination filename. For FLOAD, this must be set to “DUMMY9.”

EDWS Common Cycle Shell Script 124

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. For FLOAD, valid options are “0,” “1,” “2,” “3,” “4,” “5,” “6,” or “7”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC that the FLOAD action will run on.

Error checking:

Fastload has various levels of error checking because TOS doesn’t handle it.

Standard CLI errors are automatically trapped.

Error table 1 (bad data) can be handled within the fastload script by using the “ERRLIMIT #;” command.

Error table 2 (duplicate primary index) can be handled in various levels by using the ERROR CHECK parameter. This parameter will also handle duplicate records that may be ignored by the process. these levels are:

”0” - No error checking occurs

“1” Test to be sure that at least 1 record was read from the file. “2”Test to guarantee that the number read equals the number inserted.“3” Test to be sure that at least 1 record was read and that the number read equals the number inserted. “4” Test to be sure that error table 2 is empty.

“5” Test to be sure that at least 1 record was read and that error table 2 is empty.

“6” Test to be sure that records read equal the records inserted and that error table 2 is empty.

“7” Test to be sure that at least 1 record was read, that the number read equals the number inserted, and that error table 2 is empty.

EDWS Common Cycle Shell Script 125

This action checks for duplicate and empty data files. If any are found, a text message is generated naming all invalid files (date and byte size is also given).

EDWS Common Cycle Shell Script 126

File Check

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID BYTE SIZE RM EMPTY UNUSED

FILECHK BREAK FILECHK1 CHECK NOCHK /FW/RCV FW.1630.1.* DUMMY8FileChkMgs CHECK Rpc1356 DUMMY12 100 YES DUMMY15

FILECHK NOBRK FILECHK2 NOCHK NOCHK /FW/RCV FW.1630.2.* DUMMY8FileCHkMgs NOCHK Rpc1356 DUMMY12 50 NO DUMMY15

EDWS Common Cycle Shell Script 127

ACTION – FILECHK identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then FILECHK will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist , then FILECHK will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE – This is the source filename. This is the file that will be checked. Only use the unique portion of the filename for this parameter. If the file to be checked is called FW.1601.1.123456.Z and 123456 is the sequence number which changes every time the file gets created, you would use FW.1601.1.* as the source filename. If no filename is specified, FSEQMV will fail.

DEST DIR – This is the destination file path. If no path is provided, the application’s data directory is the default

EDWS Common Cycle Shell Script 128

directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE – This is the destination file name. This is the filename given to the error text message. The error text message will contain a list of duplicate and empty data files. If “DUMMY9” is used here, no text message will be generated.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then FILECHK will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and FILECHK will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by FILECHK. If this parameter contains anything other than “DUMMY12,” FILECHK will fail.

BYTE SIZE – Since some empty data files still contain a trailer record or filename, a minimum byte size will need to be specified. If a byte size of ‘50’ is given, all data files with a byte size of 50 or less will be considered empty.

RM EMPTY - This parameter determines if the action should remove any empty data files. A data file is determined empty by the BYTE SIZE parameter. “YES” or “NO” are the only valid options. If this parameter is defaulted to “DUMMY14”, FILECHK will fail.

If the ERROR CHECK flag is set to “CHECK,” then FILECHK will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and FILECHK will return a normal status.

EDWS Common Cycle Shell Script 129

The FSEQMV action executes a conditional move based on the filename’s sequence number. This action has the option to grab the file with the highest or lowest sequence number and can remove remaining files in the application’s source directory.

EDWS Common Cycle Shell Script 130

File Sequence Move

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID SEQ POS RM DUPS RANGE

FSEQMV BREAK FSEQMV1 CHECK NOCHK /FW/RCV/ FW.1630.1.* DUMMY8DUMMY9 CHECK rpc1356 DUMMY12 4 YES HIGH

FSEQMV NOBRK FSEQMV2 CHECK NOCHK /FW/RCV/ FW.1630.2.* DUMMY8DUMMY9 NOCHK rpc1356 DUMMY12 4 NO LOW

EDWS Common Cycle Shell Script 131

ACTION – FSEQMV identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file either does not exist or is empty, then FSEQMV will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist , then FSEQMV will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be move. Only use the unique portion of the filename for this parameter. If the file to be moved is called FW.1601.1.123456.Z and 123456 is the sequence number which changes every time the file gets created, you would use FW.1601.1.* as the source filename. If no filename is specified, FSEQMV will fail.

DEST DIR - This is the destination file path. If no path is provided, the application’s data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

EDWS Common Cycle Shell Script 132

DEST FILE - This is the destination filename. This must be set to “DUMMY9” for a FSEQMV command. The destination filename will always be set to the source filename.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then ARCHIVE will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and ARCHIVE will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by FSEQMV. If this parameter contains anything other than “DUMMY12,” FSEQMV will fail.

SEQ POS – This is the position of the sequence number located in the data file’s name. FSEQMV will need to read in this number to determine which data file to move. If a data file’s name is FW.1630.1.123456.Z and 123456 is the sequence number, then the sequence number is located in the fourth position. Please note, this action assumes that all filenames are delimited by a period.

RM DUPS - This parameter determines if the action should remove any duplicates or left over data files sharing the same unique filename after the selected data file has been moved. “YES” or “NO” are the only valid options. If this parameter is defaulted to “DUMMY14”, FSEQMV will fail.

RANGE – This parameter will determine which sequence number contained within the data file’s name is to be used when selecting a data file for the move process. If a range of “HIGH” is given, the filename containing the highest sequence number is selected to be moved. If a range of “LOW” is given, the filename containing the lowest sequence number is selected to be moved. “HIGH” or

EDWS Common Cycle Shell Script 133

“LOW” are the only valid options. If this parameter is defaulted to “DUMMY15”, FSEQMV will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then FSEQMV will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and FSEQMV will return a normal status.

EDWS Common Cycle Shell Script 134

This action advances the sequence number in a batch file located in the application’s PARM directory by one. INCBAT checks a running list of processed files in the application’s temp work directory to determine whether to advance the sequence number. If the sequence number matches, the sequence number will be incremented.

Increment Batch can only be executed after it’s corresponding Check Batch (CHKBAT) action has been performed.

EDWS Common Cycle Shell Script 135

INCBAT

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID SEQ POS UNUSED UNUSED

INCBAT BREAK INCBAT1 CHECK NOCHK DUMMY6 US.PROD DUMMY7DUMMY8 CHECK Rpc1356 DUMMY12 DUMMY13 DUMMY14 DUMMY15

INCBAT NOBRK INCBAT2 NOCHK NOCHK DUMMY6 US.PROD DUMMY7DUMMY8 NOCHK Rpc1356 DUMMY12 3 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 136

ACTION - INCBAT checks the sequence number stored in a batch file located in the PARM directory with a list of processed data files stored in the application’s TMPWRK directory. If the sequence number matches, the sequence number is incremented by one.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If “CHECK” is selected and the SRC FILE is not located, this step will be skipped and considered to terminate normally. If ”NOCHK” is selected, file existence will not be checked. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. This must be set to “NOCHK” for a INCBAT command.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. This must be set to “DUMMY6” for a INCBAT command.

SRC FILE - This is the source filename. The batch file name with no ‘SEQ’ extension is defined here. This must not be defaulted to “DUMMY7”.

EDWS Common Cycle Shell Script 137

DEST DIR - This is the destination file path. This must be set to “DUMMY8” for a INCBAT command.

DEST FILE - This is the destination filename. This must be set to “DUMMY9” for a INCBAT command.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and INCBAT returns a failure, the process will abort. If this parameter is set to “NOCHK,” INCBAT will always return a successful status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - Because INCBAT is a UNIX action, the TOS ID is not needed. If this parameter contains anything other than DUMMY12, INCBAT will fail.

SEQ POS – This is the position of the sequence number located in the data file’s name. CHKBAT has to match the sequence number in the batch file to the sequence number located in the data file’s name. The default for this parameter is 4 . The common script recognizes this by the use of the name “DUMMY13” in this parameter. A standard data file’s name has the sequence number in it’s fourth position. For example, US.PRODUCT.0730991230.301.

EDWS Common Cycle Shell Script 138

This action is used to extract Large Object (LOB) data. For this action to work, the /appl2/DSSscript/prod_script/Lobextract file must be present.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID TBL NAME SYS NAME LOGON

LOBEXT BREAK LOBEXT1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 ttmp.xyz t56prd tke1cre

LOBEXT NOBRK LOBEXT2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 ttmp.xyz t56prd tke1cre

ACTION – LOBEXT identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then LOBEXT will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then LOBEXT will be aborted and an error status is returned.

SRC DIR - This is the source file path or the location of the LOB data file. The source

EDWS Common Cycle Shell Script 139

LOBEXT

filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the name of the Large Object (LOB) data extract file.

DEST DIR - This is the directory where the LOB extract output will reside. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the LOB extract output file name. If “DUMMY9” or “DUMMY” is used, the default name of tablename.runlog is used. Tablename is obtained from parameter #13.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then LOBEXT will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and LOBEXT will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by LODEXT. If this parameter contains anything other than “DUMMY12,” LODEXT will fail.

TBL NAME - The name of the table to be extracted from is placed here. Database name is required. For example, ttmp.xyz

SYS NAME – This is the system name or ID used in a logon string.

LOGON – This is the logon used to extract the LOB data. No password is required. Password is automatically obtained from the /appl2/DSSscript/prod_script/*pass* files.

EDWS Common Cycle Shell Script 140

This action is used to load Large Object (LOB) files. For this action to work, the /appl2/DSSscript/prod_script/Lobload file must be present.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID TBL NAME SYS NAME LOGON

LOBLOD BREAK LOBLOD1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 ttmp.xyz t56prd tke1cre

LOBLOD NOBRK LOBLOD2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 ttmp.xyz t56prd tke1cre

EDWS Common Cycle Shell Script 141

LOBLOD

ACTION – LOBLOD identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then LOBLOD will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then LOBLOD will be aborted and an error status is returned.

SRC DIR - This is the source file path or the location of the LOB data file. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the name of the Large Object (LOB) data file

DEST DIR - This is the directory where the LOB load output will reside. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the LOB load output file name. If “DUMMY9” or “DUMMY” is used, the default name of

tablename.runlog is used. Tablename is obtained from parameter #13.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then LOBLOD will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and LOBLOD will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by LODLOB. If this parameter contains anything other than “DUMMY12,” LODLOB will fail.

TBL NAME - The name of the table to be loaded is placed here. Database name is required. For example, ttmp.xyz

SYS NAME – This is the system name or ID used in a logon string.

LOGON – This is the logon used to load the LOB data. No password is required. Password is automatically obtained from the /appl2/DSSscript/prod_script/*pass* files.

This action moves file(s) to a specified destination directory.

MOVE

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

MOVE BREAK MOVE1 CHECK NOCHK DUMMY6 abc /dssdat1abc NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

MOVE NOBRK MOVE2 CHECK NOCHK /dssdat2 xyz DUMMY8xyz CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - MOVE identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If the “CHECK” option is used, he SRC FILE parameter must not be defaulted to “DUMMY7.” If “CHECK” and the file is either not there or empty, then MOVE will be skipped and a normal status returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” indicates that the script should abort if the destination file in DEST FILE already exists. If this is set to “NOCHK,” the destination file in DEST FILE will be created if it does not exist or overwritten if it does exist. The DEST FILE parameter must not be defaulted to “DUMMY9.” “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be copied. Copy will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this path as MOVE creates it. If this parameter is defaulted to “DUMMY8,” then the cycle’s default data path is used.

EDWS Common Cycle Shell Script 146

DEST FILE - This is the destination filename. This is the new name of the file created by MOVE. This parameter must be present or MOVE will abort.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If this parameter is set to “CHECK” and the MOVE returns a failure, the process will abort. If this parameter is set to “NOCHK” and the MOVE fails, the process will continue processing and ignore the failure.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by MOVE. If this parameter contains anything other than “DUMMY12,” MOVE will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then MOVE will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and MOVE will return a normal status.

EDWS Common Cycle Shell Script 147

Multiload is a Teradata utility that will read a UNIX file and update (insert, delete, modify) a populated target table. Use “FORMAT VARTEXT” for delimited data files. DO NOT use ADDVLI. ADDVLI is no longer supported.

The commands ‘DISPLAY ERRORS’ and ‘NOSTOP’ should also be used with the ‘FORMAT VARTEXT’ option. ‘NOSTOP’ tells the Multiload utility to ignore and continue processing when an invalid row is encountered. In conjunction, setting the warning level (parameter #13) to ‘1’ will ignore all warning messages (return code of 4). The warning level will NEED to be defined as ‘1’ to allow the ‘NOSTOP’ command to work properly. In addition, the MLDERR action should also be used to capture and report invalid rows. See MLDERR for more details.

EDWS Common Cycle Shell Script 148

MULTILOAD

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID WNG LVL UNUSED UNUSED

MLOAD BREAK fn010tmp.ml CHECK NOCHK /dssdat2 abc DUMMY8DUMMY9 NOCHK ipc35t ipc44t DUMMY13 DUMMY14 DUMMY15

MLOAD NOBRK fn010tmp.ml NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc35t ipc44t 1 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 149

ACTION - MLOAD identifies this as a TOS multiload parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is the name of the fastload script this step will run. This script must be located in the APPLDIR/exec/mload directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If this parameter is set to “NOCHK,” then SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. ”CHECK” and “NOCHK” are the only valid commands. If “CHECK” and either the file does not exist or is empty, then MOVE is skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. For MLOAD, this must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This filename is not actually used by Multiload because the filename used for Multiload is contained within the Multiload script, but if the SOURCE CHECK option is chosen, MLOAD will check to see if the source file exist. If it does not exist or is empty, the script will be skipped. If SOURCE CHECK is set to “NOCHK,” SRC FILE must be set to “DUMMY7.”

DEST DIR - This is the destination file path. For MLOAD, this must be set to “DUMMY8.”

DEST FILE - This is the destination filename. For MLOAD, this must be set to “DUMMY9.”

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error

EDWS Common Cycle Shell Script 150

status is returned. For MLOAD, this must be set to “NOCHK.”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC that the MLOAD action will run on.

WARNING LEVEL – This parameter determines what action to take for a return code of ‘4’. A ‘4’ is NOT a fatal error, it is only a warning. If “DUMMY13” or ‘0’ is used here, MLOAD will abort for all warning messages. Setting this parameter to ‘1’ will cause MLOAD to ignore and continue processing when a warning message is encountered. In addition, a file containing the MLOAD run log will be generated in the application’s EMAIL directory. The format for this file is as follows: Scriptname.date.wng

EDWS Common Cycle Shell Script 151

MLDERR is an error capturing action for the Multiload utility. This action will scan a specified table for it’s corresponding ET/UV entries and create a file containing a text message describing the error with an Excel attachment showing invalid row details. The file is stored in the application’s EMAIL directory.

A control file containing table names, filenames and unique fields will need to be created and placed into the application’s EMAIL directory. The name of this control file can be defined using the action’s SRCFILE parameter or a default name of ‘load_error.ctl’ will be assigned if ‘DUMMY7’ is used. If user chooses to define the control file’s name, it must have a ‘ctl’ extension. The table names defined in the control file cannot have the ‘ET’ or ‘UV’ extensions. The MLDERR action automatically applies these extensions. Therefore, if the table name of ‘cs_country_code’ is given, the MLDERR action would scan through the ‘cs_country_code_ET’ and ‘cs_country_code_UV’ tables for any entries. Please note that the ‘ET’ and ‘UV’ extensions are tagged at the end and NOT the beginning of the table name. This may require some Multiload scripts to be updated. Any filenames included in the control file are used only in the text message error description and are not required. However, the more information that is given, the easier it is to locate the problem. Unique fields are the Multiload table’s unique index and at least one is required to be defined in the MLDERR’s control file. A user cannot have any more than eight unique fields defined per table. Lastly, the letters ‘EOR’ (end of record) are placed at the end of each table description set in the control file. This lets the MLDERR action know that all of the information for a particular table is given and to start processing the information.

This action uses SED files that are defined in the application’s VLIPARM directory to apply database or segment information.

The format of a MLDERR control file is as follows:

tablename:(Multiload table name)received_filename:(Filename in cdunix directory)processed_filename:(Filename prior to Multiload)unique_field1:(Multiload table’s unique index field #1)…

EDWS Common Cycle Shell Script 152

MULTILOAD ERROR

unique_field8:(Multiload table’s unique index field #8)EOR(Mark end of record)

Please note, the ‘:’ is required and no spaces are allowed. Also, variable names cannot be modified and must remain in lowercase.

The following is an example using ttmp.cs_country_code and ttmp.cs_instance_desc MLOAD tables:

tablename:TTMMPPDDBB.cs_country_codereceived_filename:EX996001.COUNTRYprocessed_filename:EX996001.COUNTRY.FILunique_field1:source_country_codeunique_field2:instance_idunique_field3:as_of_dateEORtablename:TTMMPPDDBB.cs_instance_descreceived_filename:EX996001.INSTANCEprocessed_filename:EX996001.INSTANCE.FILunique_field1:source_country_codeunique_field2:instance_idunque_field3:as_of_dateEOR

There is no limit to the number of tables that can be defined in the MLDERR control file.

The UV text message/Excel attachment file is shown below and can be emailed using the XMAIL action (XMAIL can use wildcards or ALLFILES).

Subject: D1 Duplicate Data Notification!This is a duplicate data notification!

Table name: ttmp.cs_instance_descReceived File Name: $rcvfileProcessed File Name: $pcsfileThe following attachment contains a list of duplicate rows.(The attached file is pipe delimited.)Please note, these rows were not loaded!Only row numbers and unique columns are shown!

<ttmp.cs_instance_desc_dup.xls>

The ET text message will vary slightly.

The filenames produced by this action are in the following format: tablename.dup or tablename.err (EX. Ttmp.cs_instance_desc.dup)

EDWS Common Cycle Shell Script 153

EDWS Common Cycle Shell Script 154

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

MLDERR BREAK MLDERR1 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15

MLDERR NOBRK MLDERR1 NOCHK NOCHK DUMMY6 d1_mld.ctl DUMMY8DUMMY9 NOCHK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 155

ACTION – This is an error capturing action for the Multiload utility.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is not used for this action. For MLDERR, this must be set to “NOCHK”.

DEST CHECK - This parameter is not used for this action. For MLDERR, this must be set to “NOCHK”.

SRC DIR - This parameter is not used for this action. For MLDERR, this must be set to “DUMMY6”.

SRC FILE - The name of this control file can be defined using this parameter or a default name of ‘load_error.ctl’ will be assigned if ‘DUMMY7’ is used. If user chooses to define the control file’s name, it must have a ‘ctl’ extension.

DEST DIR - This parameter is not used for this action. For MLDERR, this must be set to “DUMMY8.”

DEST FILE - This parameter is not used for this action. For MLDERR, this must be set to “DUMMY9.”

ERROR CHK - This parameter is not used for this action. For MLDERR, this must be set to “NOCHK.”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC that the MLDERR action will run on.

EDWS Common Cycle Shell Script 156

EDWS Common Cycle Shell Script 157

OCS Errors

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

OCSERR BREAK OCSERR1 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK Rpc1261 T61edw DUMMY13 DUMMY14 DUMMY15

OCSERR BREAK OCSERR2 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK Rpc1261 T61edw DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 158

ACTION – This action creates a file containing a list of all Teradata and UNIX errors. The file created will then later be loaded into table by the OCS application.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “NOCHK” is the only valid option.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “NOCHK” is the only valid option.

SRC DIR - This is the source file path. “DUMMY6” is the only valid option.

SRC FILE – This is the source filename. “DUMMY7” is the only valid option.

DEST DIR – This is the destination file path. “DUMMY8” is the only valid option.

DEST FILE – This is the destination file name. “DUMMY9” is the only valid option.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. “NOCHK” is the only valid option.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is used here.

EDWS Common Cycle Shell Script 159

EDWS Common Cycle Shell Script 160

OCS File End Processing

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

OCSEND BREAK OCSEND1 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK Rpc1261 T61edw DUMMY13 DUMMY14 DUMMY15

OCSEND BREAK OCSEND2 NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK Rpc1261 T61edw DUMMY13 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 161

ACTION – The OCSEND action creates a file containing the date and time of when a file processing ends. The file created will then later be loaded into table by the OCS application.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “NOCHK” is the only valid option.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “NOCHK” is the only valid option.

SRC DIR - This is the source file path. “DUMMY6” is the only valid option.

SRC FILE - This is the source filename. “DUMMY7” is the only valid option.

DEST DIR - This is the destination file path. “DUMMY8” is the only valid option.

DESTFILE – This is the destination file name. “DUMMY9” is the only valid option.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. “NOCHK” is the only valid option.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is placed here.

EDWS Common Cycle Shell Script 162

The applications Connect Direct directory must be defined in the load job’s configuration file if DUMMY6 is used for SRCDIR.

Must use the following syntax:

CDRCVDIR=/cdunix/edw/xx/rcv

Export CDRCVDIR

EDWS Common Cycle Shell Script 163

OCS File Received

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID STR POS LENGTH UNUSED

OCSFIL BREAK OCSFIL1 NOCHK NOCHK DUMMY6 FW DUMMY8DUMMY9 NOCHK Rpc1261 T61edw 4 4 DUMMY15

OCSFIL BREAK OCSFIL2 NOCHK NOCHK DUMMY6 AP DUMMY8DUMMY9 NOCHK Rpc1261 T61edw 3 4 DUMMY15

EDWS Common Cycle Shell Script 164

ACTION – This action creates a file containing date and time of when a data file was received. The file created will then later be loaded into table by the OCS application.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “NOCHK” is the only valid option.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “NOCHK” is the only valid option.

SRC DIR - This is the source file path. “DUMMY6” is the only valid option.

SRC FILE – This is the source filename. This is the data file that resides in the Connect Direct directory that will be examined. Only use the unique portion of the filename for this parameter. Wildcards are NOT needed!

DEST DIR – This is the destination file path. “DUMMY8” is the only valid option.

DEST FILE – This is the destination file name. “DUMMY9” is the only valid option.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. “NOCHK” is the only valid option.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is used here.

EDWS Common Cycle Shell Script 165

INSTANCE STARTING POSITION – Where an Instance id within a filename begins. For example: FW.1601.1.46373.Z – the Instance id starts in the filename’s 4th position. A “4” would be placed here

INSTANCE LENGTH – Shows how long an Instance id is. For example: FW.1601.1.46373.Z – the length of the Instance if of “1601” is 4 characters. A “4” would be placed here.

EDWS Common Cycle Shell Script 166

EDWS Common Cycle Shell Script 167

OCS File Start Processing

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID GREP ACTION GREP FILE UNUSED

OCSSTR BREAK OCSSTR1 NOCHK NOCHK DUMMY6 Tkc_orders DUMMY8DUMMY9 NOCHK Rpc1261 T61edw MLOAD Orders.al DUMMY15

OCSSTR BREAK OCSSTR2 NOCHK NOCHK DUMMY6 FW.1630.2 DUMMY8DUMMY9 NOCHK Rpc1261 T61edw SPLIT FW.1630.2 DUMMY15

EDWS Common Cycle Shell Script 168

ACTION – The OCSSTR action creates a file containing the date and time of when a file started to be processed. The file created will then later be loaded into table by the OCS application.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “NOCHK” is the only valid option.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “NOCHK” is the only valid option.

SRC DIR - This is the source file path. “DUMMY6” is the only valid option.

SRC FILE - This is the source filename. This is the filename that will be recorded in the OCS process table. The actual filename must be placed here if the start of processing is defined during a Multiload or Fastload action. Use only the unique portion of the filename, if the start of processing is defined during a SPLIT action. Wildcards are NOT needed! If no filename is specified, OCSSTR will fail.

DEST DIR - This is the destination file path. “DUMMY8” is the only valid option.

DESTFILE – This is the destination file name. “DUMMY9” is the only valid option.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. “NOCHK” is the only valid option.

EDWS Common Cycle Shell Script 169

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is placed here.

GREP ACTION – This parameter indicates when processing begins for a particular file. FLOAD, MLOAD, SPLIT, and MISC are the only valid options. MISC is used when the FLOAD, MLOAD, and SPLIT options cannot determine a starting point for file processing.

GREP FILE - This parameter is used to determine the filename to look for during a Multiload, Fastload, Split, and Misc process. This could be an Addlength file for a load action or a partial filename for a Split action.

MISC GREP – This parameter is used only when the MISC GREP ACTION is used. Place a unique word used by the action to determine when processing begins.

EDWS Common Cycle Shell Script 170

This action concatenates all records in a delimited data file that has the same filename defined in the first field of each corresponding record.

EDWS Common Cycle Shell Script 171

PARSE

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID Delimiter UNUSED UNUSED

PARSE BREAK PARSE1 CHECK NOCHK DUMMY6 abc DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 2 DUMMY14 DUMMY15

PARSE NOBRK PARSE2 NOCHK NOCHK /dssdat2 xyz DUMMY8DUMMY9 CHECK ipc35t DUMMY12 2 DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 172

ACTION – Concatenates/Separates records in a delimited data file.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the file either does not exist or is empty, then REMOVE will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination directory. If DEST CHECK is set to “CHECK,” the script will abort if the destination file in DEST FILE already exists. If DEST CHECK is set to “NOCHK,” an existing file will be overwritten. “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be removed. REMOVE will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this path as SEDCOPY creates it. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

DEST FILE - This is the destination filename. This must be set to “DUMMY9” for a PARSE command.

EDWS Common Cycle Shell Script 173

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then REMOVE will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and REMOVE will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by REMOVE. If this parameter contains anything other than “DUMMY12,” REMOVE will fail.

DELIMITER – Defines the type of delimiter used in the data file. If “DUMMY13” is used here, the delimiter value will be set to a TAB. Numbers 1 through 4 can also be used and are defined as the following: 1=TAB, 2=PIPE, 3=COMMA, 4=PERIOD. The only valid options are 1 through 4 and “DUMMY13”.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then REMOVE will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and REMOVE will return a normal status.

EDWS Common Cycle Shell Script 174

This action will remove an extension on a specified file name.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID EXT POS UNUSED UNUSED

RMEXT BREAK RMEXT1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 2 DUMMY14 DUMMY15

RMEXT NOBRK RMEXT2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 2 DUMMY14 DUMMY15

ACTION – RMEXT identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then RMEXT will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then RMEXT will be aborted and an error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

EDWS Common Cycle Shell Script 175

RMEXT

SRC FILE - This is the file name to have it’s extension removed.

DEST DIR - This is the destination file path. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is not used for this action. This needs to be “DUMMY9” or “DUMMY”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then RMEXT will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and RMEXT will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by RMEXT. If this parameter contains anything other than “DUMMY12,” RMEXT will fail.

EXT POS – This parameter defines the position of the file extension. All file names have a period ‘.’ delimiter. Each section of a file name is separated with a period. For example, the file P2998001.PROC.dat has the extension in section 3.

EDWS Common Cycle Shell Script 176

This action removes all specified files in the application’s source directory.

EDWS Common Cycle Shell Script 177

REMOVE

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID CONRMV UNUSED UNUSED

REMOVE BREAK REMOVE1 CHECK NOCHK DUMMY6 abc DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

REMOVE NOBRK REMOVE2 CHECK NOCHK /dssdat2 xyz DUMMY8DUMMY9 CHECK ipc35t DUMMY12 5 DUMMY14 DUMMY15

ACTION - REMOVE identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the file either does not exist or is empty, then REMOVE will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. This must be set to “NOCHK” for a REMOVE command.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be removed. REMOVE will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. This must be set to “DUMMY8” for a REMOVE command.

DEST FILE - This is the destination filename. This must be set to “DUMMY9” for a REMOVE command.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then REMOVE will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and REMOVE will return a normal status.

EDWS Common Cycle Shell Script 179

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by REMOVE. If this parameter contains anything other than “DUMMY12,” REMOVE will fail.

CONRMV – This parameter is used by the common script to determine a conditional remove. If “DUMMY13” is used here, a full remove will be performed. If a number is used here, a partial remove will be performed. This number represents the number of days a file will be kept before being removed. For example, if a 5 is used here, all files greater than 5 days old will be removed.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then REMOVE will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and REMOVE will return a normal status.

EDWS Common Cycle Shell Script 180

SEDCOPY applies a script of editing commands to the contents of a file.

EDWS Common Cycle Shell Script 181

SEDCOPY

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID MISC PARM UNUSED UNUSED

SEDCOPY BREAK SED1 CHECK CHECK DUMMY6 abc /dssdat1abc NOCHK ipc35t DUMMY12 sedcnt.sed DUMMY14 DUMMY15

SEDCOPY NOBRK SED2 CHECK NOCHK /dssdat2 xyz DUMMY8abc CHECK ipc35t DUMMY12 myfile.sed DUMMY14 DUMMY15

EDWS Common Cycle Shell Script 182

ACTION - SEDCOPY identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if it fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of the identifier.

SOURCE CHECK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, SEDCOPY will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, SEDCOPY is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination directory. If DEST CHECK is set to “CHECK,” the script will abort if the destination file in DEST FILE already exists. If DEST CHECK is set to “NOCHK,” an existing file will be overwritten. “CHECK” and “NOCHK” are the only valid options.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

EDWS Common Cycle Shell Script 183

SRC FILE - This is the source filename. This is the source file that will be edited. SEDCOPY will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. The destination filename chosen in DEST FILE will be placed in this path as SEDCOPY creates it. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

DEST FILE - This is the destination filename. This is the new name of the file created by SEDCOPY. This parameter must be present or SEDCOPY will abort.

ERROR CHK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK” and the SEDCOPY returns a failure, the process will abort. If this parameter is set to “NOCHK” and the SEDCOPY fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where the action runs.

TOS ID - The TOS ID is not used by SEDCOPY. This parameter should be set to DUMMY12.

MISC PARM - This is the name of the control file containing SED commands which is located in the VLIPARM directory.

EDWS Common Cycle Shell Script 184

STPROC action can perform CALL commands to execute Stored Procedures defined in a query script located in the application’s STPROC directory. All stored procedure scripts need to have an ‘stp’ extension.

Every CALL command in a Stored Procedure script must now be followed by:

.if errorcode > 0 then .quit

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID Retry Wait Time UNUSED

STPROC BREAK fn010tbl.stp CHECK NOCHK DUMMY6 abc DUMMY8DUMMY9 NOCHK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15

STPROC NOBRK fn010tbl.stp NOCHK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15

ACTION – STPROC identifies this action as a Stored Procedure execution script.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If NOBRK is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is the name of the Stored Procedure execution. This script must be located in the APPLDIR/exec/stproc directory.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If this parameter is set to “NOCHK,” the SRC DIR and SRC FILE must contain “DUMMY6” and “DUMMY7” respectively. “CHECK and “NOCHK” are the only valid options. If “CHECK” is chosen, the file given will be located. If the file does not exist, or if the file exists with a length of 0, the STPROC will be skipped and terminate with a normal status.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. For STPROC, this must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no

EDWS Common Cycle Shell Script 185

STPROC

path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter. If SOURCE CHECK is set to “NOCHK,” then SRC DIR must be set to “DUMMY6.”

SRC FILE - This is the source filename. This filename is not actually used by STPROC. If SOURCE CHECK contains “CHECK,” the script will check to see if the source file exists. If the file does not exist or the file is empty, the script will be skipped. If SOURCE CHECK is set to “NOCHK,” this parameter must be set to “DUMMY7” , and the script will unconditionally run.

DEST DIR - This is the destination file path. For STPROC, this must be set to “DUMMY8.”

DEST FILE - This is the destination filename. For STPROC, this must be set to “DUMMY9.”

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. For BTEQ, this must be set to “NOCHK.”

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - This is the DBC on which the STPROC action will run.

Error checking:

All error checking in STPROC is done using the .”IF ERRORCODE > 0 then .QUIT” command. This command must follow all STPROC statements terminated by a semicolon (;)

EDWS Common Cycle Shell Script 186

Unarchive extracts files from a archive file into the specified destination directory.

UNARCHIVE

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

UNARC BREAK UNARC1 CHECK NOCHK DUMMY6 abc DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

UNARC NOBRK UNARC2 CHECK NOCHK /dssdat2 xyz DUMMY8DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - UNARCHIVE identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the file either does not exist or is empty, then UNARCHIVE will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination directory. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the directory does not exist , then UNARCHIVE will be aborted and a error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the file that will be unarchived. UNARCHIVE will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. If no path is provided, the SRC DIR is the default directory. The common script recognizes this by the use of the name “DUMMY8” in this parameter.

DEST FILE - This is the filename, that will be extracted from the source. If no file name is specified, all files will be extracted from the source. The common script recognizes this by the use of the name “DUMMY9” in this parameter. If like files need to be extracted, set the

parameter value as “like string^*”. Eg. For extracting files starting with ‘abc’, set the value as ‘abc^*’

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then UNARCHIVE will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and UNARCHIVE will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by UNARCHIVE. If this parameter contains anything other than “DUMMY12,” UNARCHIVE will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then UNARCHIVE will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and UNARCHIVE will return a normal status.

Uncompress expands a compressed file into a specified destination directory.

UNCOMPRESS

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

UNCOMP BREAK UNCOMP1 CHECK NOCHK DUMMY6 DUMMY7 DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

UNCOMP NOBRK UNCOMP2 CHECK NOCHK /dssdat2 xyz.Z DUMMY8DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION – UNCOMP identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used, then if the file either does not exist or is empty, then UNCOMPRESS will be skipped and a normal status is returned.

DEST CHECK - This parameter must be set to “NOCHK” for UNCOMPRESS.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the source filename. If no file name is specified, all (*.Z) files will be uncompressed from the source directory. The common script recognizes this by the use of the name “DUMMY7” in this parameter. If like files need to be uncompressed, set the parameter value as “like string*.Z”. Eg. For uncompressing the files starting with ‘abc’, set the value as ‘abc*.Z’

DEST DIR – This is the destination file path. This parameter must be set to “DUMMY8” for UNCOMPRESS command.

DEST FILE – This is the destination file name. This parameter must be set to “DUMMY9”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to

“CHECK,” then UNCOMPRESS will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and UNCOMPRESS will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by UNCOMPRESS. If this parameter contains anything other than “DUMMY12,” UNCOMPRESS will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then UNCOMPRESS will fail if an error occurs and the script will abort. If “NOCHK” is set, then any error received will be ignored and UNCOMPRESS will return a normal status.

This sub-shell will run any UNIX shell you create.

UNIX SHELL

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

UNIXSH BREAK SHELL1 CHECK NOCHK DUMMY6 myshell.sh DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

UNIXSH NOBRK SHELL2 CHECK NOCHK /appl1/jobx yourshell.sh DUMMY8DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - UNIXSH denotes that this is a user defined UNIX shell script.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - SOURCE CHECK is used to verify that the shell to be executed exists. This must be set to “CHECK” for a UNIXSH command.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. This must be set to “NOCHK” for a UNIXSH command.

SRC DIR - This is the path that the script to be executed is located in. If SRC DIR is defaulted to “DUMMY6” , the script will assume a default path of APPLDIR/exec/script.

SRC FILE - This is the source filename. SRC FILE is the name of the UNIX script to be executed. This must not be defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. This must be set to “DUMMY8” for a UNIXSH command.

DEST FILE - This is the destination filename. This must be set to “DUMMY9” for a UNIXSH command.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then UNIXSH will fail if the user shell returns a status other than 0, and the script will abort. If “NOCHK” is set, then any status received will be ignored and the script will consider the UNIXSH to complete successfully.

UNIX ID - This is the UNIX processor where this action runs.

EDWS Common Cycle Shell Script 197

TOS ID - The TOS ID is not used by UNIXSH. If this parameter contains anything other than “DUMMY12,” UNIXSH will fail.

Error checking:

If the ERROR CHECK flag is set to “CHECK,” then UNIXSH will fail if the user shell returns a status other than 0, and the script will abort. If “NOCHK” is set, then any status received will be ignored and the script will consider the UNIXSH to complete successfully.

EDWS Common Cycle Shell Script 198

This action will extract compressed files in a ZIP format. This is compatible with archives created by PKWARE's PKZIP and PKUNZIP for MS-DOS/Windows.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

UNZIP BREAK UNZIP1 CHECK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 CHECK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

UNZIP NOBRK UNZIP2 NOCHK NOCHK DUMMY6 xyz.dat DUMMY8DUMMY9 NOCHK DUMMY11 DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION – UNZIP identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – This is a unique identifier that the common script uses to determine its recovery point if the script fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to verify the existence of a source file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the file does not exist, then UNZIP will be skipped and a normal status is returned.

DEST CHECK - This parameter is used by the common script to verify the existence of a destination file. “CHECK” and “NOCHK” are the only valid options. If “CHECK” is used and if the destination file does exist, then UNZIP will be aborted and an error status is returned.

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name “DUMMY6” in this parameter.

SRC FILE - This is the Zipped file name.

EDWS Common Cycle Shell Script 199

UNZIP

DEST DIR - This is not used for this action. This needs to be “DUMMY8” or “DUMMY”.

DEST FILE - This is not used for this action. This needs to be “DUMMY9” or “DUMMY”.

ERROR CHK - This parameter is used by the common script to determine the action to be taken when an error status is returned. If the ERROR CHECK flag is set to “CHECK,” then UNZIP will fail if an error occurs, and the script will abort. If “NOCHK” is set, then any error received will be ignored and UNZIP will return a normal status.

UNIX ID - This is the UNIX processor where this action runs.

TOS ID - The TOS ID is not used by UNZIP. If this parameter contains anything other than “DUMMY12,” UNZIP will fail.

EDWS Common Cycle Shell Script 200

WCCCNT checks the character count of a file against the character count within a control file created by the 'WC-LC' command. Refer to Control File for more information.

EDWS Common Cycle Shell Script 201

WCCCNT

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

WCCCNT BREAK WCC1 CHECK NOCHK DUMMY6 abc /dssdat1DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

WCCCNT NOBRK WCC2 NOCHK NOCHK /dssdat2 xyz DUMMY8DUMMY9 NOCHK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - WCCCNT identifies this an a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if it fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, WCCCNT will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, WCCCNT is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to determine its recovery point if it fails. This parameter must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name to “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the control file that contains a list of text files that will be checked. WCCCNT will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. This is the directory which contains the files to be chosen. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

EDWS Common Cycle Shell Script 203

DEST FILE - This is the destination filename. This parameter must be set to DUMMY9.

ERROR CHK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK” and the WCCCNT returns a failure, the process will abort. If this parameter is set to “NOCHK” and the WCCCNT fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where the action runs.

TOS ID - The TOS ID is not used by WCCCNT. Currently this parameter is not checked.

EDWS Common Cycle Shell Script 204

WCCCNT checks the line count of a file against the line count within a control file created by the 'WC-LC' command. Refer to Control File for more information.

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

WCLCNT BREAK CPRM CHECK NOCHK DUMMY6 Abc /dssdat1DUMMY9 CHECK Ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

WCLCNT NOBRK CPRM NOCHK NOCHK /dssdat2 xyz DUMMY8DUMMY9 NOCHK Ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15

ACTION - WCCCNT identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT - This is a unique identifier that the common script uses to determine its recovery point if it fails. Each SCRIPT identifier for a UNIX action must be unique. If they are not, the common script will restart at the first occurrence of that identifier.

SOURCE CHECK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, WCCCNT will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, WCCCNT is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to determine its recovery point if it fails. This parameter must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name to “DUMMY6” in this parameter.

EDWS Common Cycle Shell Script 205

WCLCNT

SRC FILE - This is the source filename. This is the control file that contains a list of text files that will be checked. WCCCNT will fail if this parameter is defaulted to “DUMMY7.”

DEST DIR - This is the destination file path. This is the directory which contains the files to be chosen. If this parameter is defaulted to “DUMMY8,” the cycle’s default data path is used.

DEST FILE - This is the destination filename. This parameter must be set to DUMMY9.

ERROR CHK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK” and the WCCCNT returns a failure, the process will abort. If this parameter is set to “NOCHK” and the WCCCNT fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where the action runs.

TOS ID - The TOS ID is not used by WCCCNT. Currently this parameter is not checked.

EDWS Common Cycle Shell Script 206

XMAIL can send multiple text files through E-mail to individuals defined within a control file.

XMAIL

ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIRDESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED

XMAIL BREAK \*.err CHECK NOCHK DUMMY6 xmail.ctl DUMMY8DUMMY9 CHECK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15

XMAIL NOBRK ALLFILES NOCHK NOCHK DUMMY6 xmail.ctl DUMMY8DUMMY9 NOCHK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15

ACTION – EMAIL identifies this as a UNIX parameter line.

BREAKPOINT - This variable indicates a restart point. If “BREAK” is used, this SCRIPT is a valid restart point. If “NOBRK” is used, this SCRIPT is not a valid restart point. “BREAK” and “NOBRK” are the only valid options.

SCRIPT – Insert the name of the E-mail text file here. Please note, your E-mail text file must be located in the application’s EMAIL directory. If an EMAIL directory does not exist, you must create one (for example: appl1/dssbs/email). If the command ‘ALLFILES’ is used here, all files in the application’s EMAIL directory (except ‘ctl’ extension files) will be mailed.

SOURCE CHECK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK,” the SRC FILE parameter must contain a file name. If the parameter is not set to a file name, the script will abort. If SOURCE CHECK is set to “NOCHK” and the SRC FILE is missing or empty, EMAIL will abort and return an error status. If SOURCE CHECK is set to “CHECK” and the SRC FILE is missing or empty, EMAIL is skipped and returns a normal status. “CHECK” and “NOCHK” are the only valid options.

DEST CHECK - This parameter is used by the common script to determine its recovery point if it fails. This parameter must be set to “NOCHK.”

SRC DIR - This is the source file path. The source filename chosen in SRC FILE must be located in this directory. If no path is provided, the application data directory is the default directory. The common script recognizes this by the use of the name to “DUMMY6” in this parameter.

SRC FILE - This is the source filename. This is the control file that contains a list of E-mail addresses that will be checked. Please note, the control file can only contain one column or one E-mail address per line. The last line of the control file must read “EOF”. This is to let the action know that it has reached the end of the file and to continue on with processing.

DEST DIR - This is the destination file path. This parameter must be set to DUMMY8.

DEST FILE - This is the destination filename. This parameter must be set to DUMMY9.

ERROR CHK - This parameter is used by the common script to determine its recovery point if it fails. If this parameter is set to “CHECK” and the EMAIL returns a failure, the process will abort. If this parameter is set to “NOCHK” and the EMAIL fails, the process will continue processing and ignore the failure. “CHECK” and “NOCHK” are the only valid options.

UNIX ID - This is the UNIX processor where the action runs.

TOS ID - The TOS ID is not used by EMAIL. Currently this parameter is not checked.