Copy Report Definition (CPYDFNRDAR)

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

The Copy Report Definition (CPYDFNRDAR) command performs the copy operation specified by the OPTION parameter: OPTION = *EXPORT copies one or more OnDemand report definition records into a report definition transfer file named in the RPTDFNFILE parameter. This file is then available for transfer or export to another RDARS or OnDemand system. OPTION = *IMPORT copies all of the report definition records from the report definition transfer file (named in the RPTDFNFILE parameter) into the standard OnDemand report definition file. Usually, this report definition transfer file would have been created on another RDARS or OnDemand system. OPTION = *PRINT prints a summary list of the report definition records from the report definition file named in the RPTDFNFILE parameter.

Top

Parameters

Keyword Description Choices Notes
OPTION Option *EXPORT, *IMPORT, *PRINT Required, Positional 1
RPTDFNFILE Report definition file Qualified object name Optional
Qualifier 1: Report definition file Name
Qualifier 2: Library Name, *CURLIB
VIEWFILE Logical view file Name, *NONE Optional
FLRFLDFILE Folder-field file Name, *NONE Optional
REPORT Report name Generic name, name, *ALL Optional
VERSION Version 1-99 Optional
RPTGRP Report group Name, *GRP Optional
Top

Option (OPTION)

Specifies the export, import, or print function to be done.

This is a required parameter.

*EXPORT
Copy report definition records from the OnDemand report definition file QARLRACT into the report definition transfer file named in parameter RPTDFNFILE.
*IMPORT
Copy report definition records from the report definition transfer file specified in the RPTDFNFILE parameter into the OnDemand report definition file QARLRACT.
*PRINT
Print a summary list of the report definition records in the report definition file named in parameter RPTDFNFILE.
Top

Report definition file (RPTDFNFILE)

Specifies the file to which report definition records are copied, if *EXPORT is specified for the Option (OPTION) parameter. If *IMPORT or *PRINT is specified for the Option (OPTION) parameter, the report definition transfer file is the primary input file for that function.

This is a required parameter.

Note: If the specified file does not exist, the export process will create it. If the file already exists, records will be added to the existing file.

Qualifier 1: Report definition file

name
Specify the name of the report definition transfer file.

Qualifier 2: Library

*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 file is located.
Top

Logical view file (VIEWFILE)

Specifies the name of an additional "transfer" file for the logical view records copied from the QARLRAPP file during export, and copied into the QARLRAPP file during import processing. This file name is required if logical view records exist during export. Otherwise, *NONE is permitted during export or import.

The logical view transfer file must be in the library that was specified for the report definition transfer file (parameter RPTDFNFILE).

Note: If the specified file does not exist, the export process will create it. If the file already exists, records will be added to the existing file.

Top

Folder-field file (FLRFLDFILE)

Specifies the name of an additional "transfer" file for the folder-field records copied from the QARLRFFU file during export, and copied into the QARLRFFU file during import processing. This file name is required if folder field records exist during export. Otherwise, *NONE is permitted during export or import.

The folder-field file must be in the same library that was specified for the report definition transfer file (parameter RPTDFNFILE).

Note: If the specified file does not exist, the export process will create it. If the file already exists, records will be added to the existing file.

Top

Report name (REPORT)

Specifies the name of one or more report definition records copied into the report definition transfer file when OPTION = *EXPORT. Generic values may be used, such as "AB*" to copy all of the report definitions named "ABxxx...x". The special value "*ALL" may be used to copy all existing report definitions to the report definition transfer file. This parameter can be left blank if either VERSION or RPTGRP is specified. Also, REPORT, VERSION, and RPTGRP values may be used in combination.

Note: If you press the F4 key for this parameter while prompting the command, a list of all the valid entries is presented to you.

Top

Version (VERSION)

Specifies the version number of the report definition records copied into the report definition transfer file when OPTION = *EXPORT. The possible values are 01-99, or blank. This parameter can be left blank if either the REPORT or RPTGRP parameter is specified. Also, REPORT, VERSION, and RPTGRP values may be used in combinations.

Top

Report group (RPTGRP)

Specifies the value of the report group name to be matched in the report definition records which are copied into the report definition transfer file when OPTION = *EXPORT. For example, entering "ARGROUP" will copy all of the report definition records in group ARGROUP, but not the report group definition named ARGROUP itself. To copy a specific report group definition, enter the report group name as the REPORT value (eg, REPORT = ARGROUP). To copy all report group definitions enter "*GRP" as the RPTGRP value (eg, RPTGRP = *GRP). This parameter may be left blank if either the REPORT or VERSION parameter is specified. Also, REPORT, VERSION, and RPTGRP values may be used in combinations.

Note: If you press the F4 key for this parameter while prompting the command, a list of all the valid entries is presented to you.

Top

Examples

Example 1: Simple Export Example

CPYDFNRDAR OPTION(*EXPORT) RPTDFNFILE(MYLIB/MIGRDEFS)
             REPORT(CHECKSTMTS)

This command will cause all versions of the OnDemand Spool File Archive report definition called CHECKSTMTS to be exported into a report definition transfer file called MIGRDEFS in library MYLIB that will contain the information to be exported.

Example 2: Simple Import Example

CPYDFNRDAR OPTION(*IMPORT) RPTDFNFILE(MYLIB/MIGRDEFS)

This example shows a corresponding import command to import the report definitions that were exported in Example 1. Typically, the report definition transfer file is moved from the source system to the target system, and then the example import command shown above is run on the target system.

Example 3: More Complex Export Example

CPYDFNRDAR OPTION(*EXPORT) RPTDFNFILE(MYLIB/MIGRDEFS)
             VIEWFILE(MIGRLV)FLRFLDFILE(MIGRFF) REPORT(*ALL)
             VERSION(03)

This command will cause Version 03 of all OnDemand Spool File Archive report definitions to be exported into a report definition transfer file called MIGRDEFS in library MYLIB. It will also cause any logical view definition records or folder field definition records to be exported into files called MIGRLV and MIGRFF respectively (also located in MYLIB library).

Example 4: More Complex Import Example

CPYDFNRDAR OPTION(*IMPORT) RPTDFNFILE(MYLIB/MIGRDEFS)
             VIEWFILE(MIGRLV)FLRFLDFILE(MIGRFF)

This example shows a corresponding import command to import the report definitions that were exported in Example 3. Typically, the report definition, logical view definition, and folder field definition transfer files are moved from the source system to the target system, and then the example import command shown above is run on the target system.

Top

Error messages

*ESCAPE Messages

RDR0331
Profile &3 can not be used.
RDR4001
REPORT parameter can only be specified with OPTION(*EXPORT).
RDR4002
VERSION parameter can only be specified with OPTION(*EXPORT).
RDR4003
RPTGRP parameter can only be specified with OPTION(*EXPORT).
RDR4004
Report definition transfer file (RPTDFNFILE) must be specified.
RDR4005
REPORT, VERSION, and RPTGRP cannot all be blank when OPTION = *EXPORT.
RDR4006
If REPORT value is "*ALL", both VERSION and RPTGRP must be blank.
RDR4007
"*ALL" can be specified only for report name parameter.
RDR4008
Name of the report definition transfer file cannot begin with the letter "Q".
RDR4009
A library name for the report definition transfer file must be specified.
RDR4010
Logical view transfer file name must be specified.
RDR4011
Logical view transfer file name cannot begin with "Q".
RDR4012
Group name value cannot include generic character "*".
RDR4013
Report name value must include generic character "*" if group name also specified.
RDR4014
Folder-field transfer file name must be specified.
RDR4015
Folder-field transfer file name cannot begin with "Q".
Top