After you enter the data set information in the screen shown in Figure 2 the following screen is displayed:
------------------- CICS VT: Data set mapping for VIDKSDS -------- Row 1 of 1 Command ===> _______________________________________________ Scroll ===> CSR_ Commands: I - Insert Actions: U - Update F - Show field information D - Delete Act File type Status --- --------- --------------------------------------------- ------------------- _ KSDS Bytes: 00080 Creator: VID + Table name: VID_ITEM + --- --------- --------------------------------------------- ------------------- ******************************* Bottom of data ********************************
Specify one of the following actions:
Option U is typically used to specify the read-only DDM module name. Expect to use option D very infrequently. Option F, which you will routinely use, allows you to specify field information and this is the next step in the manual mapping process. Option F displays the following panel:
--------------------- CICS VT: List of fields for VIDKSDS --------------------- Command ===> ________________________________________________ Scroll ===> CSR_ VSAM file type : KSDS Creator : VID + Data set length: 00080 Table name: VID_ITEM + Actions: S Display, U Update, I Insert, D Delete A Field Bytes Start Type DB2 column name Exit Pic Par - -------- ----- ----- ---- ------------------------------ -------- --- --- ******************************* Bottom of data ********************************
Initially, there are no fields defined for a new file. To insert field information, specify option I on the command line. Insert field mapping information using the following screen:
----------------------------- CICS VT: Insert field ---------------------------- Command ===> ____________________________________________ Scroll ===> CSR_ DIM name : VIDKSDS Creator : VID + Table : VID_ITEM + Data set length: 00080 Field name . . . ===> VIDM0001 Field length . . ===> 00006 (In bytes) Field type . . . ===> C (C,P,U,F,H,B) Column name . . ===> ITEM_NUMBER..................... + (Look-up available) Starting position ===> 00001 ("1" = Beginning of data set) Picture . . . . ===> __________________________ (example HH.XX.SS.NNNNNN) (or MMDDYY) (or EXITx=exit name) Parameters . . . ===> __________________________ Optional user parameters Special function ===> KEY ("KEY", "PTH", "BKY", or blank) Mapped from table ===> P ("P"=primary, "X"=not mapped) Build order . . ===> 00001 ("1"=first, "2"=second and so on) Press: Enter=Insert PF3=Exit PF1=Help
The field values are as follows:
Field | Description | |
---|---|---|
Field name | A generated 8-byte value that is unique for the data set. You will normally have one CICS VT field per copybook field. | |
Field length | The length of the field. Assuming that you are mapping one copybook field to one DB2® column, this is the length of the copybook field. | |
Field type | The options are as follows: | |
C | Character or zoned decimal | |
P | Signed packed decimal | |
![]() ![]() |
Unsigned packed decimal | |
F | Fullword (4 bytes binary) | |
H | Halfword (2 bytes binary) | |
B | Two fullwords (8 bytes binary) | |
Column name | The name of the DB2 column that the field maps to. If wildcard character % is used, CICS VT builds a selectable list of all matching columns in the table from the DB2 catalog. This field is scrollable, although the maximum DB2 column name is 30 characters. | |
Starting position | The start position of this field within the VSAM record. CICS VT calculates this based on the position and length of the preceding field. | |
Picture | The layout of date or time fields, or the name of the FBE. See Specifying a picture string. | |
Parameters | Optional user parameters. See See Specifying optional parameters. | |
Special function | Special function applies to fields in your VSAM file that are either part of the file key or an alternate index key. A value of KEY is automatically generated for the first inserted field, as shown in Figure 3. The values PTH and BKY only apply to alternate index mapping, which is covered in Mapping the alternate index paths. Leave the field blank in all other cases. | |
Mapped from table | Always specify P unless you are mapping a multiple field key, in which case specify X. This is explained in Multiple field key. | |
Build order | A sequence number generated by CICS VT. |
These cases are discussed in greater detail in the CICS VT Data Reengineering and Customization Guide. Leave the Picture field value blank if neither case applies.
You can use nullable DB2 columns but only for columns that do not map to either the base cluster or alternate index fields. Using the optional Parameters field, you can specify up to three different single-byte values. If each byte in a VSAM field matches one of the specified values, CICS VT sets the column value to NULL.
NULL[[=input1[input2][input3]],[output],[nullif]
When multiple input values and an output value are specified, the order of the input values is not significant. When multiple input values are specified without an output value, the output value defaults to the first input value.
Any displayable character is valid for the nullif parameter. The value you specify must never be the value of the first byte in a valid field that is mapped to a nullable column.
NULL
In example 1, an input field of low-values becomes a null value in DB2. The value returned from DB2 is low-values, and the nullif character in the DB2 load file is "?".
NULL=S
An input field of spaces becomes a null value in DB2. The value returned from DB2 is spaces, and the nullif character in the DB2 load file is "?".
NULL=LHS,S,£
An input field of low-values, high-values or spaces becomes a null value in DB2. The value returned from DB2 is spaces, and the nullif character in the DB2 load file is "£".
NULL=,,@
An input field of low-values becomes a null value in DB2. The value returned from DB2 is low-values, and the nullif character in the DB2 load file is "@".
NULL=,S
An input field of low-values becomes a null value in DB2. The value returned from DB2 is spaces, and the nullif character in the DB2 load file is "?".
Be aware of the following before choosing to use nullable columns and the NULLS parameters:
When you use the NULLS facility, it is recommended that you also use the DB2 sample REXX DRAW to generate the LOAD utility control cards, instead of the DB2 sample unload program DSNTIAUL.