Retrieve Table Source (RTVTBLSRC)

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

The Retrieve Table Source (RTVTBLSRC) command is used to retrieve the source for a *CVT or *SRTSEQ table. These source statements are placed into a source file member, which can be used as input when creating a table with the CRTTBL command. Additional, this command will convert the source of a *SRTSEQ table to the format used to create a *UCSSRTSEQ table.

Top

Parameters

Keyword Description Choices Notes
TBL Table Qualified object name Required, Positional 1
Qualifier 1: Table Name
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCFILE Source file Qualified object name Required, Positional 2
Qualifier 1: Source file Name
Qualifier 2: Library Name, *LIBL, *CURLIB
SRCMBR Source member Name, *TBL Optional, Positional 3
CVTTOUCS Convert to UCS-2 *YES, *NO Optional
TEXT Text 'description' Character value, *BLANK Optional
Top

Table (TBL)

Specifies the qualified name of the table whose source is being retrieved.

Top

Source file (SRCFILE)

Specifies the qualified name of the previously created database source file into which the table source is being written.

The name of the source file can be qualified by one of the following library values:

*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 searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name
Specify the name of the library to be searched.
Top

Source member (SRCMBR)

Specifies the name of the database source file member into which the table source is being written. If not specified, the table name is assumed. If the member existed before running the command, it is cleared before any source statements are written into it. If the member did not exist, it is created.

The possible values are:

*TBL
The name of the table is used as the member name.
source-member-name
Specify the name of the source file member to contain the retrieved table source.
Top

Convert to UCS-2 (CVTTOUCS)

Specifies whether the source of a *SRTSEQ table should be converted when placed in the file from the format of a *SRTSEQ table to that of a *UCSSRTSEQ. You would want to do this if you want to create a *UCSSRTSEQ but want to base it on an existing *SRTSEQ table.

The possible values are:

*NO
The information is not converted when placed in the file.
*YES
The information is converted when placed in the file.
Top

Text 'description' (TEXT)

Specifies the text that briefly describes the object.

*BLANK
No text is specified.
'description'
Specify no more than 50 characters of text, enclosed in apostrophes.
Top

Examples

RTVTBLSRC   TBL(QSYS/TABLE1)  SRCFILE(TBLSRC)  SRCMBR(TABLEOUT)
            CVTTOUCS(*NO)

This command retrieves the source statements from the table named TABLE1 in library QSYS. The retrieved source is placed into the file named TBLSRC and is named as member TABLEOUT and not converted to a *UCSSRTSEQ format.

Top

Error messages

Unknown
Top