Copy To PC Document (CPYTOPCD)

The Copy To PC Document (CPYTOPCD) command copies a member from a system database file to a PC document in a folder.

Note: Do not precede an entry with an asterisk unless that entry is a "special value" that is shown (on the display itself or in the help information) with an asterisk.

Error messages for CPYTOPCD

*ESCAPE Messages

IWS1612
Member &1 not copied to PC document.

Parameters

Keyword Description Choices Notes
FROMFILE From file Qualified object name Required, Positional 1
Qualifier 1: From file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TOFLR To folder Character value Required, Positional 2
FROMMBR From member Name, *FIRST Optional, Positional 3
TODOC To document Character value, *FROMMBR Optional, Positional 4
REPLACE Replace document *NO, *YES Optional, Positional 5
TRNTBL Translate table Single values: *DFT, *NONE
Other values: Qualified object name
Optional
Qualifier 1: Translate table Name
Qualifier 2: Library Name, *LIBL, *CURLIB
TRNFMT Format of PC data *TEXT, *NOTEXT Optional
TRNIGC DBCS code page *DFT, *JPN, *CHT, *BG5, *CHS, *KOR, *KSC, *SCGS, *NONE Optional
RCDFMT Record format Name, *ALL Optional

From file (FROMFILE)

Specifies the name and library of the database file you are copying data from. The file can be either a physical file or a logical file.

This is a required parameter.

The possible library values are:

*LIBL
The library list is used to locate the database file.
*CURLIB
The current library for the job is used to locate the database file. If no current library entry exists in the library list, QGPL is used.
library-name
Specify the library where the database file is located.

If this file is a source file and the records are being translated from EBCDIC to ASCII, the line number and date are removed when the records are written in the PC document.

To folder (TOFLR)

Specifies the name of the folder that contains the PC document being copied to.

The name can be a fully qualified path name of the form:

The path name can be up to 63 characters in length. All folders in the path must exist.

This is a required parameter.

From member (FROMMBR)

Specifies the name of the member that is copied.

*FIRST
The first member of the file is copied.
member-name
Specify the name of the member that is copied.

To document (TODOC)

Specifies the name of the PC document in the folder to contain the copied database file member. If the document does not exist, it is created.

*FROMMBR
The name of the PC document is the same as the member name.
document-name
Specify a valid document name which has the form:
  • filename.extension

The filename can be from 1 to 8 characters, and the extension can be from 1 to 3 characters.

Replace document (REPLACE)

Specifies if an existing document is replaced by the copy operation.

*NO
If a document of this name already exists in the folder specified by the To folder prompt (TOFLR parameter), the copy is not performed.
*YES
If a document of this name already exists in the folder specified by the To folder prompt (TOFLR parameter), it is replaced by the database file member that is copied.

Translate table (TRNTBL)

Specifies if translation is performed and, if so, the name of the translation table used to translate the data from EBCDIC to ASCII.

Note: For a user defined double-byte character set, this parameter also specifies if translation is performed and, if so, which translation table is used for single-byte translation.

The format of the records in the PC document is handled by the Format of PC data prompt (TRNFMT parameter),

*DFT
The default translation table is used.
translation-table-name
Specify the name and library of the translation table.

The possible library values are:

*LIBL
The library list is used to locate the table.
*CURLIB
The current library for the job is used to locate the table. If no current library entry exists in the library list, QGPL is used.
library-name
Specify the library where the table is located.
*NONE
No translation from EBCDIC to ASCII is performed. The records are copied to the PC document as fixed-length records. There are no ASCII carriage return, line feed, or end of file characters added to the PC document. The length of these fixed length records is the same as the length of the records in the database file member.

Format of PC data (TRNFMT)

Specifies the format the records in the PC document are to have.

This parameter is not valid if *NONE is specified on the Translate table prompt (TRNTBL parameter).

*TEXT
The records in the PC document will be written in standard DOS ASCII variable length format. The ASCII carriage return and line feed characters are added to the end of each record, and the ASCII end of file character is added to the end of the PC document.
*NOTEXT
The records in the PC document will be fixed length records. The length of the records in the database file is used for the length of the records in the PC document.

DBCS code page (TRNIGC)

Specifies the double-byte character set used for translation. Unless overridden by the Translate table prompt (TRNTBL parameter), this parameter also specifies the single-byte translation table.

*DFT
The default country or region's double-byte character set.
*JPN
IBM Japanese.
*CHT
IBM Traditional Chinese.
*BG5
Taiwan Industry standard (BIG-5).
*CHS
IBM Simplified Chinese.
*KOR
IBM Korean (KS).
*KSC
Korean Industry standard.
*SCGS
The People's Republic of China National standard (GB).
*NONE
No double-byte translation is performed.

Record format (RCDFMT)

Specifies the record format(s) of records to be copied. The possible values are:

*ALL
All records (of all record formats) in the database file are to be copied.
record-format-name
Specify the name of a record format if you want only records with that specific record format to be copied.

Examples

None

Error messages

*ESCAPE Messages

IWS1612
Member &1 not copied to PC document.