Home | Previous Page | Next Page   The onpladm Utility > Defining Jobs >

Creating Jobs

You can create two types of jobs:

Creating Conversion Jobs

When you create a conversion load or unload job using command-line parameters, all maps, formats, and query objects automatically have the same name as the job name. When you create a conversion job with detailed specification files, the HPL objects can have different names from the job name.

Creating Conversion Jobs Using a Quick Command

When you create a conversion job using a quick command, the onpladm utility creates all HPL objects associated with the job. The HPL objects that it creates have the same name as the job.

The following diagram illustrates the syntax to create a conversion job from the command line.

Read syntax diagramSkip visual syntax diagramCreating a Conversion Job
 
>>-onpladm create job--job--+--------------+-- -d--device------->
                            '- -p--project-'
 
>-- -D--database-- -t--table------------------------------------>
 
>--+---------------------------------------+-------------------->
   '-| Setting the 

Run Mode |-' >--+-------------------------------------+--+-------------+-----> +- -n---------------------------------+ '- -T--target-' '-| Setting the
Format |-' >--+-------------+--+-----------------+--+----------------+---->< '- -S--server-' '- -M--devicesize-' '- -B--blocksize-'

Element Purpose Key Considerations
-B blocksize Sets the tape I/O block size (bytes) Additional Information: No default value
-d device Sets the name of device, such as a file, device array, tape, or pipe Additional Information: No default value
-D database Name of the target database that contains the information to be loaded or unloaded Additional Information: No default value.
job Names a load or unload job from the onpload database None
-M devicesize Tape device size in kilobytes Additional Information: The device size must be greater than zero.
-n Sets no-conversion express job None
-p project Identifies the project where the format and map are stored Additional Information: The default is the project created when the onpload database is built.
-S server Sets the onpload database server Additional Information: The default is the value of the INFORMIXSERVER environment variable.
-t table Name of the table to be loaded or unloaded None
-T target Name of the target server to which the data will download Additional Information: The default is the value of the INFORMIXSERVER environment variable.

The following diagram illustrates the syntax to set the run mode with the -f option.

Read syntax diagramSkip visual syntax diagramSetting the Run Mode:
 
               .-l--+---+-.
               |    '-c-' |
|-- -f--+---+--+----------+--+---+--+---+-----------------------|
        +-d-+  '-u--------'  '-n-'  '-N-'
        +-p-+
        '-a-'
 

Element Purpose Key Considerations
a Treats data source as a device-array Additional Information: The definition of the device array is extracted from the onpload database.
c Sets mode to deluxe mode Additional Information: If this flag is not set, onpladm uses express mode.
d Treats data source as a tape device None
l Loads data into database Additional Information: This is the default flag, as opposed to u, which unloads data from the database.
n Specifies that onpladm does not need to perform data conversion

Restrictions: The target table for the load must have the same schema as the table from which the data is extracted.

Additional Information: If onpladm generated the input data file as an Informix format data file, you do not need to perform data conversion when you reload data.

N Allows deluxe mode load without replication Restrictions: This flag works only if the job argument, which specifies a session table job to run, is left blank.
p Treats data source as a program to execute and reads interface to the program by way of a pipe (on UNIX only) None
u Unloads data from database Additional Information: If this flag is not set, onpladm loads data into the database.

The following diagram illustrates the syntax to set the format type with the -z option.

Read syntax diagramSkip visual syntax diagramSetting the Format:
 
|-- -z--+----+--------------------------------------------------|
        +-D--+
        +-FI-+
        +-FA-+
        +-FB-+
        +-C--+
        '-CB-'
 

Element Purpose Key Considerations
D Sets the format to delimited Additional Information: This is the default value. See Delimited Records.
FI Sets the format to fixed internal Additional Information: See Fixed-Length Records.
FA Sets the format to fixed ASCII Additional Information: See Fixed-Length Records.
FB Sets the format to fixed binar. Additional Information: See Fixed-Length Records.
C Sets the format to COBOL Additional Information: See COBOL Records.
CB Sets the format to COBOL (byte) Additional Information: See COBOL Records.
Creating Conversion Jobs Using Detailed Specification Files

You can also specify job details in specification files that you reference from the command line.

When you create a job by using a specification file, you must create all associated HPL objects; the onpladm utility does not create these objects for you.

Creating a Conversion-Load Job

Use the syntax shown in Specification-File Conventions to create a conversion-load job from a specification file.

Use the following syntax to create a specification file for a conversion-load job:

BEGIN OBJECT LOADJOB jobname 
# Compulsory Attributes 
PROJECT projectname 
DEVICE device_array_name 
MAP mapname 

FILTER filtername 
SERVER targetservername 
DATABASE targetdatabasename 
FLTFILE filtered_records_filename 
REJECTFILE rejected_records_filename 
LOGFILE job_progress_logfilename 
RUNMODE runmode_type 
GENERATEVIORECS violation_records_option 
TAPES sourcetape_num 
NUMRECORDS records_num 
STARTRECORD start_record 
MAXERRORS max_error_num 

END OBJECT  

The following table lists the attributes and their attribute values.

Attribute Attribute Value
device_array_name Device-array name

You must create the device array; onpladm does not create it for you.

filtername Filter name
jobname Job name
job_progress_logfilename Path to the job-progress log file
mapname Map name

You must create the map before you use this option; onpladm does not create the map for you.

max_error_num Maximum number of errors;
if exceeded, load ends
projectname Name of an existing project
records_num Number of records to be processed in the data file
rejected_records_filename Rejected-records filename (rejected by database server)
filtered_records_filename Filtered-records filename (rejected by filter)
runmode_type Type of run mode:
E = Express mode
D = Deluxe mode without replication
DR = Deluxe mode with replication
sourcetape_num Number of tapes that contain source data
start_record Number of the first record to begin a load
targetdatabasename Name of the database that the records will be loaded or unloaded to; if set, this value overrides the database value in the load or unload map
targetservername Name of the target database server
violation_records_option Specify:
Y
to generate violations records
N not to generate violations records
Creating a Conversion Unload Job

Use the syntax shown in Specification-File Conventions to create a conversion unload job from a specification file.

Use the following syntax to create a conversion unload job:

BEGIN OBJECT UNLOADJOB jobname 
# Compulsory Attributes 
PROJECT projectname 
DEVICE device_array_name 
MAP mapname 

FILTER filtername 
SERVER targetservername 
DATABASE targetdatabasename 
REJECTFILE rejected_records_filename 
LOGFILE job_progress_logfilename 
ISOLATIONLEVEL isolation_level 
MAXERRORS max_error_num 

END OBJECT  

The following table lists the arguments and their attribute values.

Attribute Attribute Value
device_array_name Device-array name
You must create the device array; onpladm does not create it for you.
filtername Filter name
isolation_level Unload isolation level:
DR = Dirty Read
CR = Committed Read
CS = Cursor Stability
RR = Repeatable Read
jobname Job name
job_progress_logfilename Path to the job-progress log file
mapname Map name
You must create the map before you use this option; onpladm does not create the map for you.
max_error_num Maximum number of errors; if exceeded, unload ends
projectname Name of an existing project
rejected_records_filename Rejected-records filename (rejected by database server)
targetdatabasename Name of the database that the records will be loaded or unloaded to;
if set, this value overrides the database value in the load or unload map
targetservername Name of the target database server

Creating No-Conversion Jobs

A no-conversion job is faster than a conversion job because onpload uses the internal format of the target database and does not create new maps or formats. No-conversion jobs are always run in express mode.

Creating No-Conversion Jobs Using a Quick Command

When you create a job using a quick command, the onpladm utility creates all HPL objects associated with that job.

The following diagram illustrates the syntax to create a no-conversion job.

Read syntax diagramSkip visual syntax diagramCreating a No-Conversion Job
 
>>-onpladm create job--job--+--------------+-- -n--------------->
                            '- -p--project-'
 
>-- -d--device-- -D--database-- -t--table----------------------->
 
   .-----------------------------------------------------------------------------.
   V                                                                             |
>----+-------------------------------------------------------------------------+-+-><
     '-+-------------+--+-------------+--| Setting the 

Run Mode |-' '- -S--server-' '- -T--target-'

Element Purpose Key Considerations
-d device Sets the name of device, such as a file, device array, tape, or pipe Additional Information: No default value.
-D database Name of the target database that contains the information to be loaded or unloaded Additional Information: No default value.
job Names a load or unload job from the onpload database None
-n Sets no-conversion express job None
-p project Identifies the project where the format and map are stored Additional Information: The default is the project created when the onpload database is built.
-S server Sets the onpload database server Additional Information: The default is the value of the INFORMIXSERVER environment variable.
-t table Name of the table to be loaded or unloaded None
-T target Name of the target server to which the data will download Additional Information: The default is the value of the INFORMIXSERVER environment variable.

The following diagram illustrates the syntax to set the run mode with the -f option.

Read syntax diagramSkip visual syntax diagramSetting the Run Mode:
 
               .-l-.
|-- -f--+---+--+---+--------------------------------------------|
        +-d-+  '-u-'
        +-p-+
        '-a-'
 

Element Purpose Key Considerations
a Treats data source as a device-array Additional Information: The definition of the device array is extracted from the onpload database.
d Treats data source as a tape device None
l Loads data into database Additional Information: This is the default flag, as opposed to u, which unloads data from the database.
p Treats data source as a program to execute and reads interface to the program by way of a pipe (UNIX only) None
u Unloads data from database Additional Information: If this flag is not set, onpladm loads data into the database.
Creating No-Conversion Jobs Using Detailed Specification Files

You can also specify job details in specification files that you reference from the command line.

When you create a job by using a specification file, you must create all associated HPL objects; the onpladm utility does not create these objects for you.

Creating a No-Conversion Load Job

Use the syntax shown in Specification-File Conventions to create a no-conversion load job with specification files.

Use the following syntax to create a specification file for a no-conversion load job:

BEGIN OBJECT FASTLOADJOB jobname 
# Compulsory Attributes 
PROJECT projectname 
DEVICE device_array_name 
DATABASE targetdatabasename 
TABLE tablename 

SERVER targetservername 

END OBJECT  

The following table lists the attributes and their values.

Attribute Attribute Value
device_array_name Device-array name

You must create the device array; onpladm does not create it for you.

jobname Job name
projectname Name of an existing project
tablename Table name
targetdatabasename Name of the database that the records will be loaded or unloaded to; if set, this value overrides the database value in the load map
targetservername Name of the target database server
Creating a No-Conversion Unload Job

Use the syntax shown in Specification-File Conventions to create a no-conversion unload job with specification files.

Use the following syntax to create a specification file for a no-conversion unload job:

BEGIN OBJECT FASTUNLOADJOB jobname 
# Compulsory Attributes 
PROJECT projectname 
DEVICE device_array_name 
DATABASE targetdatabasename 
QUERY queryname 

SERVER targetservername 

END OBJECT  

The following table lists the attributes and their values.

Attribute Attribute Value
device_array_name Device-array name

You must create the device array;
onpladm does not create it for you.

jobname Job name
projectname Name of an existing project
queryname The SQL SELECT statement, in quotation marks, that contains unload criteria
targetdatabasename Name of the database that the records will be loaded or unloaded to; if set, this value overrides the database value in the load map
targetservername Name of the target database server
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]