CRTTBL (Create Table)

CRTTBL Command syntax diagram

 

Purpose

The Create Table (CRTTBL) command creates a named table. The table can be used for the translation of data being moved between the system and a device (a display, for example). The table can also be used to specify an alternative 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, 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, specify a source member that contains the following layout of information.

  1. column 1-4 = Hex code point to be sorted
  2. column 6-10 = Weight of this code point as a decimal number
  3. column 11-80 = not used, can contain such things as comments.

 

Required Parameters

TBL
Specifies the qualified name of the table being created.

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

*CURLIB: The table is created in the current library for the job. 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 where the table is created.

table-name: Specify the name of the table being created.

 

Optional Parameters

SRCFILE
Specifies the qualified name of the source file that contains the description of the table being created or that prompting support is to be used.

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.

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 of the source file that contains the source records that are used with this command to create the table.

Other Single Value

*PROMPT: Allows the user to access and use source information.

SRCMBR
Specifies the name of the source file member that contains the description of the table being created.

*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 SRCFILE parameter that is used to create the table.

TBLTYPE
Specifies the type of table object to be created.

*CVT: A conversion type table is created.

*SRTSEQ: A sort sequence type table is created.

*UCSSRTSEQ: An ISO-10646 UCS-2 sort sequence type table is created.

BASETBL
Specifies the base table to be used for prompting support when creating a conversion table.

*HEX: A one to one mapping table is used.

The name of the table 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.

table-name: Specify a table object to be used as a base.

BASESRTSEQ
Specifies the base table to be used for prompting support when creating a sort sequence table.

*JOB: The sort sequence must be resolved when the object is created.

*LANGIDSHR: A shared weight sort table is used.

*LANGIDUNQ: A unique weight sort table is used.

*HEX: A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence. The CCSID for hexadecimal data is 65535.

The name of the table 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.

table-name: Specify the name of a table object to be used as a base.

BASELANGID
Specifies the base language used for prompting support when creating a sort sequence table.

*JOB: The sort sequence must be resolved when the object is created.

language-ID: Specify a valid language ID to be used for the sort sequence table being created.

CCSID
Specifies the coded character set ID (CCSID) in which to store the sort sequence table information.

*JOB: The sort sequence must be resolved when the object is created.

coded-character-set-ID: Specify the CCSID to be used for the sort sequence table information.

AUT
Specifies the authority given to users who do not have specific authority to the table, who are not on an authorization list, and whose user group has no specific authority to the table. More information on this parameter is in Commonly used parameters.

*LIBCRTAUT: The public authority for the table is taken from the value on the CRTAUT parameter of the target library (the library that is to contain the table). The public authority is determined when the table is created. If the CRTAUT value for the library changes after the table is created, the new value does not affect any existing objects.

*CHANGE: The user can perform all operations on the object except those limited to the owner or controlled by object existence authority and object management authority. The user can change and perform basic functions on the object. Change authority provides object operational authority and all data authority.

*ALL: The user can perform all operations except those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the table.

*USE: The user can perform basic operations on the table, such as running a program or reading a file. The user cannot change the table. *USE authority provides object operational authority, read authority, and execute authority.

*EXCLUDE: The user cannot access the table.

authorization-list-name: Specify the name of the authorization list used.

TEXT
Specifies the text that briefly describes the table. More information on this parameter is in Commonly used parameters.

*BLANK: Text is not specified.

'description': Specify no more than 50 characters of text, enclosed in apostrophes.

Example for CRTTBL

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.

Error messages for CRTTBL

*ESCAPE Messages

CPF2614
Table &1 in &2 already exists.
CPF2623
Library &1 not found.
CPF2678
Data in source file &1 in &2 not valid.
CPF3BF7
Data in source file at line &1 is not correct
CPF3FC9
Value &1 for CCSID not valid.