Add Report to OnDemand (ADDRPTOND)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Add Report to OnDemand (ADDRPTOND) command allows you to load reports in OnDemand. During this process the report is broken into segments, indexed, compressed, and stored on disk for retrieval and later migration to optical or tape media if desired.

Top

Parameters

Keyword Description Choices Notes
APPGRP Application group Character value Required, Positional 1
APP Application Character value Optional
INPUT Input *SPLF, *FILE, *STMF Optional
FILE File Qualified object name Optional
Qualifier 1: File Name
Qualifier 2: Library Name, *LIBL, *CURLIB
MBR Member Name, *FIRST, *LAST Optional
STMF Stream file Path name Optional
SPLF Spooled file Name Optional
JOB Job name Single values: *
Other values: Qualified job name
Optional
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
SPLNBR Spooled file number 1-999999, *ONLY, *LAST, *ANY Optional
JOBSYSNAME Job system name Name, *ONLY, *CURRENT, *ANY Optional
CRTDATE Spool file created Single values: *ONLY, *LAST
Other values: Element list
Optional
Element 1: Creation date Date
Element 2: Creation time Time, *ONLY, *LAST
INSTANCE Instance Character value, QUSROND Optional
DLTINPUT Delete input *NO, *YES Optional
IDXONLY Run indexing only *NO, *YES Optional
SBMJOB Submit to batch *YES, *NO Optional
JOBD Job description Qualified object name Optional
Qualifier 1: Job description Name, QOND400
Qualifier 2: Library Name, QRDARS, *LIBL, *CURLIB
ERROPT Error option *RMVRPT, *NORMVRPT Optional
Top

Application group (APPGRP)

Specifies the name of the application group to be used in the load process.

This is a required parameter.

Note: If you press the F4 key for this parameter while prompting the command, a list of the valid entries is presented to you. The entries listed may not be valid if the parameter INSTANCE is not QUSROND.

name
Specify the application group name. If the value to be entered contains lower case letters, blanks, or special characters, it must be enclosed in apostrophes.
*JOBNAME
Use the job name as the source for the application group name.

The following special values are only valid when the parameter INPUT is *SPLF.

*SPLFNAME
Use the spooled file name as the source for the application group name.
*FORMTYPE
Use the form type as the source for the application group name.
*USERDATA
Use the user data as the source for the application group name.
*USRDFNOPT1
Use the user-defined option 1 as the source for the application group name.
*USRDFNOPT2
Use the user-defined option 2 as the source for the application group name.
*USRDFNOPT3
Use the user-defined option 3 as the source for the application group name.
*USRDFNOPT4
Use the user-defined option 4 as the source for the application group name.
*USRDFNDTA
Use the user-defined data as the source for the application group name.
Top

Application (APP)

Specifies the name of the application to be used in the load process.

Note: If you press the F4 key for this parameter while prompting the command, a list of the valid entries is presented to you. The entries listed may not be valid if the parameter INSTANCE is not QUSROND.

*APPGRP
Use the application group name as the source for the application name. This value will also work if the application group only contains one application regardless of the name of the application.
*JOBNAME
Use the job name as the source for the application name.
name
Specify the application name. If the value to be entered contains lower case letters, blanks, or special characters, it must enclosed in apostrophes.

The following special values are only valid when the parameter INPUT is *SPLF.

*SPLFNAME
Use the spooled file name as the source for the application name.
*FORMTYPE
Use the form type as the source for the application name.
*USERDATA
Use the user data as the source for the application name.
*USRDFNOPT1
Use the user-defined option 1 as the source for the application name.
*USRDFNOPT2
Use the user-defined option 2 as the source for the application name.
*USRDFNOPT3
Use the user-defined option 3 as the source for the application name.
*USRDFNOPT4
Use the user-defined option 4 as the source for the application name.
*USRDFNDTA
Use the user-defined data as the source for the application name.
Top

Input (INPUT)

Specifies where to find the data to load.

*SPLF
The input data is read from the spooled file specified by the SPLF, JOB, and SPLNBR parameters.
*FILE
The input data is read from the database file specified by the FILE and MBR parameters.
*STMF
The input data is read from the stream file specified by the STMF parameter.
Top

File (FILE)

Specifies database file that contains data to load.

Qualifier 1: File

name
Specify the name of the database file that contains the report data to store. The first character in each line of this data must contain a valid forms control character.

Qualifier 2: Library

*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is where the file is located. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the database file is located.
Top

Member (MBR)

Specifies the name of the database member which contains the data to load.

*FIRST
The first member in the database file contains the report data to load.
*LAST
The last member in the database file contains the report data to load.
member-name
Specify the name of the database member that contains the data to load.
Top

Stream file (STMF)

Specifies the path to the stream file that contains the data to load.

Top

Spooled file (SPLF)

Specifies the name of the spooled file to use as input to the load process. This is the file name that was specified by the user program when the file was created, or the name of the device file used to create this file.

Top

Job name (JOB)

Specifies the name of the job which produced the spooled file.

*
Use the job from which this command is entered.
job-name
Specify the name of the job to use. If no job qualifier is given, all of the jobs currently in the system are searched for the simple job name. If duplicates of the specified name are found, a list of messages containing the qualified job names of all duplicates is displayed.
user-name
Specify the name that identifies the user profile under which the job is run.
number
Specify the job number assigned by the system.
Top

Spooled file number (SPLNBR)

Specifies, by number, which of the job's spooled files to load.

*ONLY
Only one spooled file in the job has the specified file name; therefore, the number of the spooled file is not necessary.
*LAST
The spooled file with the highest number and the specified file name is used.
*ANY
The spooled file number is not used to determine which spooled file is used. Use this value when the job system name parameter or the spooled file create date and time parameter is to take precedence over the spooled file number when selecting a spooled file.
spooled-file-number
Specify the number of the spooled file having the specified file name to use.
Top

Job system name (JOBSYSNAME)

Specifies the name of the system where the job that created the spooled file (JOB parameter) ran. This parameter is considered after the job name, user name, job number, spooled file name, and spooled file number parameter requirements have been met.

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and spooled file create date and time.
*CURRENT
The spooled file created on the current system with the specified job name, user name, job number, spooled file name, spooled file number, and create date and time is used.
*ANY
The job system name is not used to determine which spooled file is used. Use this value when the spooled file create date and time parameter is to take precedence over the job system name when selecting a spooled file.
job-system-name
Specify the name of the system where the job that created the spooled file ran.
Top

Spool file created (CRTDATE)

Specifies the date and time the spooled file was created. This parameter is considered after the job name, user name, job number, spooled file name, spooled file number, and job system name parameter requirements have been met.

The possible single values are:

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, and job system name.
*LAST
The spooled file with the latest create date and time of the specified job name, user name, job number, spooled file name, spooled file number, and job system name is used.

The possible create date value is:

spooled-file-create-date
Specify the date the spooled file was created.

The possible create time values are:

*ONLY
There is one spooled file with the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date.
*LAST
The spooled file with the latest create time of the specified job name, user name, job number, spooled file name, spooled file number, job system name, and spooled file create date is used.
spooled-file-create-time
Specify the time the spooled file was created.
Top

Instance (INSTANCE)

Specifies the name of the instance to use.

QUSROND
The default OnDemand instance is used.
instance-name
Specify the name of the instance that is to be used. By definition, the instance must be on the system that the command is run.
library-server-name
Specify the TCP/IP host name of the library server. The name can also be specified as a TCP/IP dotted decimal address in the form of nnn.nnn.nnn.nnn.

When a server name or TCP/IP address is entered, OnDemand uses the instance on that server that is using the default port. In most cases, this will also use the default instance.

Top

Delete input (DLTINPUT)

Specifies whether the input data is deleted after the data is successfully loaded by OnDemand. An unsuccessful ADDRPTOND does NOT delete the input.

*NO
The input data is kept.
*YES
The input data is deleted.
Top

Run indexing only (IDXONLY)

Specifies whether to run only the indexing part of the load.

*NO
Run the complete load process.
*YES
Run only the indexing process.
Top

Submit to batch (SBMJOB)

Specify if you want to store the specified report interactively or in a batch job.

*YES
This command should be submitted to run in a different job.
*NO
This command should be run within the current job. If you are entering this command from a terminal, this will prevent you from doing any other work from this terminal session until this command completes.
Top

Job description (JOBD)

Specifies the name of the job description used for the submitted job.

Qualifier 1: Job description

QOND400
The QOND400 job description is used as the job description for the submitted job.
name
Specify the name (name/name) of the job description used for the job.

Qualifier 2: Library

QRDARS
Library QRDARS is used as the job description's library.
*LIBL
All libraries in the job's library list are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the job description name. If no library is specified as the current library for the job, QGPL is used.
name
Specify the name of the library where the job description name is located.
Top

Error option (ERROPT)

Specifies what to do if the load process is not successful.

*RMVRPT
Remove all data loaded up to the point of the failure.
*NORMVRPT
No data is removed. See the system log to determine what was added.
Top

Examples

Example 1: Simple Example

ADDRPTOND APPGRP(CHECKSTMTS) SPLF(CKSTMTPRTF)

This command submits a job to batch that will archive a spooled file named CKSTMTPRTF from the current job into an OnDemand Common Server application/application group called CHECKSTMTS. All other command parameter defaults are used, including the default instance name of QUSROND.

Example 2: More Complex Example

ADDRPTOND APPGRP(CHECKSTMTS) APP('Corporate Account Statements')
           SPLF(CKSTMTPRTF) JOB(123456/OPERATOR/NIGHTBATCH)
           SPLNBR(*LAST) INSTANCE(ACCTING)

This command submits a job to batch that will archive a spooled file named CKSTMTPRTF from a nightly batch job called NIGHTBATCH into an OnDemand Common Server application called Corporate Account Statements within an application group called CHECKSTMTS. The data will be archived into an instance named ACCTING.

Example 3: More Complex Example

ADDRPTOND APPGRP(INVOICES) INPUT(*STMF)
            STMF('/PDFFiles/Inv0214.pdf')

This command submits a job to batch that will archive a stream file named Inv0214.pdf located in directory /PDFFiles into an OnDemand Common Server application called INVOICES within an application group called INVOICES. The data will be archived into the default instance named QUSROND.

Example 4: More Complex Example

ADDRPTOND APPGRP(INVOICES) INPUT(*STMF)
            STMF('/PDFFiles/Inv0214.pdf')

This command submits a job to batch that will archive a stream file named Inv0214.pdf located in directory /PDFFiles into an OnDemand Common Server application called INVOICES within an application group called INVOICES. The data will be archived into the default instance, QUSROND.

Top

Error messages

*ESCAPE Messages

CPF1338
Errors occurred on SBMJOB command.
CPF3342
Job &5/&4/&3 not found.
CPF3343
Duplicate job names found.
CPF3344
File &1 number &8 no longer in the system.
CPF3492
Not authorized to spooled file.
CPF3C40
Spooled file &4 not found.
OND0211
ADDRPTOND command ended in error.
Top