Command reference / ifs
CRTTBL
Create Table
The Create Table (CRTTBL) command creates a named table. The table can be used for the translation of data that is moved between the system and a device. The table can also be used to specify an alternate collating sequence or to specify field translation functions. You can create a table by prompting for the source information, or by specifying a source member. To create a table using prompting support, specify *PROMPT on the SRCFILE parameter. A display is shown allowing you to view and change the table values and a new table is created based on the values chosen on the display. To create a *CVT table using a source member, you must specify a source member that contains 8 records. Each record in this member must contain 64 hexadecimal characters (characters after position 64 are not used). This input (512 hexadecimal characters) is converted and stored internally as 256 bytes by the CRTTBL command. The value you specify for a position within the source member is the same value that is returned by QDCXLATE (or other system program) whenever that position is encountered. For example, if you specify "C0C1C2C3C4C5C6...'' as the first part of record 1 in the source, then a hexadecimal "C0" is returned when given a hexadecimal "00", a hexadecimal "C1" is returned when given a hexadecimal "01" and so on. To create a *UCSSRTSEQ table using a source member, you must specify a source member that contains the following layout of information. column 1-4 = Hex code point to be sorted column 6-10 = Weight of this code point as a decimal number column 11-80 = not used, can contain such things as comments.
Allowed environments: *ALL.
Positional parameters: 3.
Parameters
TBL
Table
Specifies the library name and table name of the table being created. This is a required parameter. The possible library values are: The possible values are:
*CURLIB- The library for the job is used to locate the table. If no library is specified as the library for the job, QGPL is used.
name- Specify the name of the library to be searched.
table-name- Specify the name of the table being created.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Table
Table
Library
Library
Suggested / special values:
*LIBL, *CURLIB
SRCFILE
Source file
Specifies the qualified name of the source file containing the description of the table being created or that prompting support is to be used. The possible values are: The possible library values are:
Suggested / special values:
*PROMPT
*PROMPT- Allows the user to access and use source information.
QTBLSRC- The system source file named QTBLSRC contains the source records that are used with this command to create the table.
source-file-name- Specify the name (library-name/source-file-name) of the source file that contains the source records that are used with this command to create the table.
*LIBL- All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB- The current library for the job is used to locate the source file. If no current library is specified as the current library for the job, QGPL is used.
name- Specify the name of the library to be searched.
Qualified parts (object, then library; write LIBRARY/OBJECT)
Source file
Source file
Library
Library
Suggested / special values:
*LIBL, *CURLIB
SRCMBR
Source member
Specifies the name of the source file member containing the description of the table being created. The possible values are:
Suggested / special values:
*TBL
*TBL- The source file member name is the same as the name of the table.
source-file-member-name- Specify the name of the member in the source file specified on the Source file prompt (SRCFILE parameter) to create the table. generic*-table-name Specify the generic name of the table. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If a generic name is specified, then all tables with names that begin with the generic name, and for which the user has authority, are shown. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete table name.
TBLTYPE
Table type
Specifies the type of table object to be created. The possible values are:
Allowed values:
*CVT, *SRTSEQ, *UCSSRTSEQ
*CVT- A conversion type table is created.
*SRTSEQ- A sort sequence type table is created.
*UCSSRTSEQ- An IS0-10646 UCS-2 sort sequence type table is created.
TEXT
Text 'description'
Specifies the text that briefly describes the object. The possible values are:
Suggested / special values:
*BLANK
*BLANK- No text is specified.
character-value- Specify no more than 50 characters of text, enclosed in apostrophes.
Examples
CRTTBL TBL(SCRAMTBL) SRCFILE(USERTABLES) SRCMBR(SCRAMBLE) TEXT('Translate table for scrambling text characters')
This command creates a table named SCRAMTBL and (by default) stores it in the current library. The source file named USERTABLES contains the source records used when the table is created; the name of the source file member is SCRAMBLE. The TEXT parameter describes this table as being used as a translate table for scrambling text characters.
Generated from os/cl/catalog/CRTTBL.json and os/cl/help/CRTTBL.json.