Beruflich Dokumente
Kultur Dokumente
Script Documentation
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.
.logon SSYYSSTTEEMM/LLOOGGOONNID;
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):
Scripts with system and user-logon will show the following after
the substitutions:
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.
###############################################################################
# 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 >> $SCRIPTLO
G
}
###############################################################################
#set -vx
### Enter directory path and application configuration file name ##############
. /apple/edwxx/exec/script/config/xxxconfig.sh
###
touch $ERRLOG
nohup $GENERICDIR/edwmain.sh
STAT=$?
if [ $STAT -eq 0 ]
then
echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOG
LOG_DATE " ...JOB TERMED OK"
echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOG
else
echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOG
LOG_DATE " ...JOB ABORTED"
echo "=====================================" | tee -a $IOLOG >> $SCRIPTLOG
fi
$WRITELOG
#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 identifier
LCID="xx" # Lower Case System identifier
CYCLE_NAME="XXXXXXX" # Cycle name to differentiate parameters
CYCLE_ID="D" # Cycle Identifier ('D'aily, 'W'eekly, etc
APPLDIR=/appl2/edwxx # Application root Directory
BKLOGDIR=/dssdat2/edwxx # Application root backup Directory
LOGDIRDEL=10 # Number of days to keep log files
SEDFILE="xxxxxxxx" # Control file containing sed parameters
###############################################################################
. $GENERICDIR/edwconfig.sh
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.
REPEAT Function
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.
ABCLOAD.FIL ABCLOAD.RCV 1
REPEAT 9999 23:00:00 600
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
FUNCTION ACTION ID
ADDBAT ADDBAT
ADDLENGTH ADDLEN
ADDVLI 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
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.
Valid Entries:
REM********************************************************************************************REM the
destination directory path will need to be changed in production
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.
1) OCSFIL
2) OCSSTR
3) OCSERR
4) OCSEND
Here is an example:
Run Logs
Run 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.
Another directory level has been added by cycle name, using the following syntax:
logs/cyclename/APPIDrunlog
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.
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.
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.
Wildcard search
It 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/*.
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\*.
Unique names when you are searching and replacing text strings
Be 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.
The following section provides all of the functions that are used with EDWS Common
Cycle Shell Script.
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);
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);
Notice that the extra spaces are also removed. This will
only happen if parameter #13 has NOSPACE specified.
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.
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.
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.
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.
3rd line:
N = Numeric.
Each length & identifier must be separated by pipe “|” symbol.
definitions.
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 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.
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 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 checking:
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.
Error checking:
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.
DEST FILE - This is the destination filename. For BTEQ, this must
be set to “DUMMY9.”
TOS ID - This is the DBC on which the BTEQ action will run.
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 (;).
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.”
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.
TOS ID - This is the DBC that the BEXP action will run on.
Error checking:
This function will concatenate all files within a control file. Refer to
Control File for more information.
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.”
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”.
TMPWRK=/tmpwrkX/dssYY/work
Files in the tmpwrk directory should be remove after all data file
have been processed.
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
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.
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.
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.
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”.
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 checking:
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.”
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.
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 DESTDIR
DESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED
CPRMCNT BREAK CPRM CHECK NOCHK DUMMY6 abc /dssdat1
DUMMY9 CHECK ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15
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.
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.”
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.
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
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.
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.
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.
DEST FILE - This is not used for this action. This needs to be
“DUMMY9” or “DUMMY”.
COMP DIR - This is the directory where past processed data files
reside.
This action retrieves files from a Sybase database and puts them
into a specified destination directory.
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.”
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.
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.
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
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.
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 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.
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.
SCRIPT - This is the name of the fastload script this step will run.
This script must be located in the APPLDIR/exec/fastload directory.
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.”
TOS ID - This is the DBC that the FLOAD action will run on.
Error checking:
Error table 1 (bad data) can be handled within the fastload script by
using the “ERRLIMIT #;” command.
“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.
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).
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 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.
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.
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.
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.
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.”
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.
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.
SCRIPT - This is the name of the fastload script this step will run.
This script must be located in the APPLDIR/exec/mload directory.
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.”
TOS ID - This is the DBC that the MLOAD action will run on.
This action uses SED files that are defined in the application’s
VLIPARM directory to apply database or segment information.
Please note, the ‘:’ is required and no spaces are allowed. Also,
variable names cannot be modified and must remain in lowercase.
tablename:TTMMPPDDBB.cs_country_code
received_filename:EX996001.COUNTRY
processed_filename:EX996001.COUNTRY.FIL
unique_field1:source_country_code
unique_field2:instance_id
unique_field3:as_of_date
EOR
tablename:TTMMPPDDBB.cs_instance_desc
received_filename:EX996001.INSTANCE
processed_filename:EX996001.INSTANCE.FIL
unique_field1:source_country_code
unique_field2:instance_id
unque_field3:as_of_date
EOR
<ttmp.cs_instance_desc_dup.xls>
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.”
TOS ID - This is the DBC that the MLDERR action will run on.
SRC DIR - This is the source file path. “DUMMY6” is the only valid
option.
SRC DIR - This is the source file path. “DUMMY6” is the only valid
option.
DEST DIR - This is the destination file path. “DUMMY8” is the only
valid option.
CDRCVDIR=/cdunix/edw/xx/rcv
Export CDRCVDIR
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!
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.
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.
This action concatenates all records in a delimited data file that has
the same filename defined in the first field of each corresponding
record.
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.”
Error checking:
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 it’s extension removed.
DEST FILE - This is not used for this action. This needs to be
“DUMMY9” or “DUMMY”.
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.
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.
Error checking:
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.
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.
MISC PARM - This is the name of the control file containing SED
commands which is located in the VLIPARM directory.
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.”
TOS ID - This is the DBC on which the STPROC action will run.
Error checking:
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 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 checking:
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.
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 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.
UNIX SHELL
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.
Error checking:
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.
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”.
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.
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 DESTDIR
DESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED
WCLCNT BREAK CPRM CHECK NOCHK DUMMY6 Abc /dssdat1
DUMMY9 CHECK Ipc35t DUMMY12 DUMMY13 DUMMY14 DUMMY15
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.
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.
XMAIL can send multiple text files through E-mail to individuals defined
within a control file.
ACTION BREAKPOINT SCRIPT SOURCE CHK DESTCHK SRCDIR SRCFILE DESTDIR
DESTFILE ERR CHK UNIX ID TOS ID UNUSED UNUSED UNUSED
XMAIL BREAK \*.err CHECK NOCHK DUMMY6 xmail.ctl DUMMY8
DUMMY9 CHECK rpc1261 t61edw DUMMY13 DUMMY14 DUMMY15
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.
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.