Sequence Template Option
You can create a sequence by using an existing sequence as a template. This process is known as templating a sequence.
You can create a sequence by using an existing sequence as a template. This process is known as
Follow these steps:
- Perform the following actions on the CA RC/Update Main Menu:
The Sequence Template panel appears.
- TypeTin the Option field of the main header.
- TypeSQin the Object field of the main header.
- Type a name in the Item Name field to specify the sequence you want to template. If you do not specify a name, a selection panel appears when you press Enter.
- (Optional) Type values for one or more of the remaining header fields. For more information on the fields, press F1 (Help).
- Complete header fields on the Sequence Template panel as follows and press Enter:
- SequenceSpecifies a name for your sequence.
- Schema (first occurrence)Specifies the name of a sequence creator.
- Schema (second occurrence)Specifies the high-level qualifier of the data type for the sequence. The value in this field, along with the value in the AS Type field, specifies the data type to be used for the sequence. When the value for AS Type is ambiguous or invalid, the value for this Schema field is also used as part of the criteria by which the column type selection list is built. This field is scrollable and expandable.
- AS TypeSpecifies the sequence's data type, which can be any exact numeric data type (SMALLINT, BIGINT, INTEGER, or DECIMAL) or a user-defined distinct type for which the source type is an exact numeric data type with a scale of 0. This field is scrollable and expandable. Selection criteria are also accepted.
- CommentSpecifies whether comments are defined for the sequence. You can also enter comments.
- NIndicates that no comments exist for the sequence. This is the default. If Y is displayed in this field, and you type over the Y with N, the existing comment is deleted.
- YIndicates that a comment is defined for the sequence.
- UIndicates that you want to view, update, or delete the sequence's comment.
- PrecisionSpecifies the precision for the sequence. Precision depends on the data type of the sequence. You can enter a specific value for Precision only if the specified data type is one of the following:
- A user-defined type (from which a defined precision can be picked up)When the sequence's data type is SMALLINT, INTEGER, or a distinct type that is sourced on SMALLINT, BIGINT, INTEGER or DECIMAL, you cannot edit the Precision field. Instead, the field displays a precision that is inherent to (or defined for) the specified type.
If the data type is not user-defined or DECIMAL, Precision is set to 10 (for an INTEGER type) or 5 (for a SMALLINT type).
The values are applied as your templated sequence's attributes.
- Specify any changes to information for the Sequence Dynamics, and then press the END key.The RC/Update Creation Confirmation panel appears for confirming that you want to execute DDL to create your sequence.
- Performoneof the following actions:
Depending on the CA RC/Update Profile settings for your user ID, you might also have the option of rebuilding the DDL with RC/Alter so you can specify utilities and extended DDL generation and analysis options.Your session continues, depending on your choice.
- Press Enter to execute the DDL online through the Batch Processor.
- EnterEin the command line to edit the generated DDL.
- Press the END key to return to the Sequence Template panel.