Add Report to OnDemand (ADDRPTOND)

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.

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, *DFT Optional
STRSVR Start instance server *NO, *YES Optional
DLTINPUT Delete input *NO, *YES Optional
IDXONLY Run indexing only *NO, *YES Optional
STASHFILE Password stash file Path name, *NONE 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

Application group (APPGRP)

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

This is a required parameter.

Note: Position the cursor in the application group parameter entry and use the prompt (F4) key to view the list of application group values that are available for the default (*DFT) instance.

The default instance is specified in the QDFTINST data area. The QDFTINST data area can exist in multiple libraries. A search for the QDFTINST data area is performed using the library list. The first data area found will be used. If the QDFTINST data area is not found using the library list, the QUSRRDARS library will be searched for the data area. If the data area exists in the QUSRRDARS library it will be used. If the QDFTINST data area is not found, instance QUSROND is used.

application-group-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.

Application (APP)

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

Note: Position the cursor in the application parameter entry and use the prompt (F4) key to view the list of application values that are available for the default (*DFT) instance.

The default instance is specified in the QDFTINST data area. The QDFTINST data area can exist in multiple libraries. A search for the QDFTINST data area is performed using the library list. The first data area found will be used. If the QDFTINST data area is not found using the library list, the QUSRRDARS library will be searched for the data area. If the data area exists in the QUSRRDARS library it will be used. If the QDFTINST data area is not found, instance QUSROND is used.

*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.
application-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.

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.

File (FILE)

Specifies database file that contains data to load.

Qualifier 1: File

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.
library-name
Specify the name of the library where the database file is located.

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.

Stream file (STMF)

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

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.

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.

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.

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.

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.

Single values

*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.

Element 1: Creation date

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

Element 2: Creation time

*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.

Instance (INSTANCE)

Specifies the name of the OnDemand instance to use.

*DFT
The default OnDemand instance is used. The default instance is specified in the QDFTINST data area. The QDFTINST data area can exist in multiple libraries. A search for the QDFTINST data area is performed using the library list. The first data area found will be used. If the QDFTINST data area is not found using the library list, the QUSRRDARS library will be searched for the data area. If the data area exists in the QUSRRDARS library it will be used. If the QDFTINST data area is not found, instance QUSROND is used.
instance-name
Specify the name of the instance that is to be used. By definition, the instance must be on the system where the command is run.

Start instance server (STRSVR)

Specify to start the instance server if it is not currently active.

*NO
The instance server for this instance will not be started.
*YES
The instance server for this instance will be started.

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.

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.

Password stash file (STASHFILE)

Specifies the path and file name of the stream file that contains the stashed user profile and password to run the command.

*NONE
A stash file will not be used to run the command, the current user profile will be used.
path-name
Specifies the path and file name of the stream file that contains the stashed user profile and password.

Note: Use the ARSSTASH API to store the user profile and password in the stash file.

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.

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.
jobd-name
Specify the 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.
library-name
Specify the name of the library where the job description name is located.

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.

Examples

Example 1: Archive Spool File (Default Instance)

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: Archive Spool File

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: Archive Stream File (Default Instance)

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: Archive Stream File

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

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 instance, ACCTING.

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.