The following commands are available during the automated mapping process: MAP, SAVE, PREVIEW, SUSPEND, RESUME, SHOW, and CHANGE.
When you have completed field editing, you are ready to map
the data set. You do this by specifying
MAP
on the
command line. The mapping information is generated in the
CICS®
VT
system tables, and you are put into an ISPF edit of the generated
DDL. You can manually update the DDL if required, you should
not
change
the table name or column names, as this will cause the batch driver
generation process to fail.
After you exit the ISPF edit session, a batch job is generated using the job card specified in Figure 1, and automatically submitted for processing.
Before you issue the MAP command, make sure that you have taken appropriate actions for all columns with a status of Redefined field. Otherwise, the DB2 table will include columns for the redefined andthe redefining fields.
Use the SAVE command when you have completed editing the fields. Like the MAP command, the SAVE command generates the mapping information in the CICS VT system tables, but the batch JCL to complete the mapping process is not submitted automatically. Instead the batch JCL is written to the data set hlq.VID.dim_name, where hlq is either your TSO prefix or the value you specified in Specifying optional defaults panel 4.
Use the SAVE command when you don't want to process the DDL immediately. For example, you might want to review some of the DDL parameters, or you might lack the necessary authority to create the objects in DB2®. Manually submit the batch job at the appropriate time.
You should also use the SAVE command when you need to override the default DIM name for alternate indexes. See DIM names for alternate indexes.
The PREVIEW command lets you review the DDL that will be generated by the MAP and SAVE commands. Use this command at any time after the input copybook has been processed. For example if you delete redefined fields, use PREVIEW to see the DDL that will be generated.
The PREVIEW command can be abbreviated to PV.
The SUSPEND command saves all changes you have made for the current DIM, and ends the automated mapping process. All updates to the mapping are captured and stored in an ISPF table. Use SUSPEND in conjunction with the RESUME command described next.
SUSPEND is designed to support the mapping of one file at a time. It will not help you map multiple data sets in parallel. You can suspend mapping at any time by specifying SUSPEND on the command line.
The RESUME command restores the mapping information captured by the SUSPEND command using the ISPF table member VIDMCSUS. This allows you to continue mapping without losing updates. When you use the RESUME command, CICS VT does not check that the information captured by the SUSPEND command is for the data set that you are currently mapping. For example, if you map a data set called MYDIM and use the SUSPEND command to preserve your changes, then start mapping another data set called YOURDIM and use the SUSPEND command again, the changes you made to the mapping of MYDIM are lost.
The RESUME command is designed to support the mapping of one file at a time. It does not help you map multiple files in parallel.
Use the SHOW command to control the fields that are displayed in the Edit columns screen. To limit the display to those columns that have a message in the status area, specify either SHOW ONLY or SHOW MESSAGES. To redisplay all fields, use either SHOW, SHOW ALL, or RESET.
The purpose of the CHANGE command is to perform a mass change of the generated column names. A REXX command shell is invoked and you provide one or more REXX statements to effect the desired change.
For example, assume that every copybook field name has a prefix of FITEM-. You want to strip the prefix from the generated column names. When you invoke the CHANGE command, the following screen is displayed:
---------------- CICS VT: Auto mapping mass change for VIDKSDS2 ----------------
Command ===> Scroll ===> CSR
Expression ===>
DB2 column ===> FITEM_FSHIP_DD +
Copybook field ===> FITEM_FSHIP-DD +
--------1--------2--------3
New DB2 column ===> FITEM_FSHIP_DD +
Write an expression using REXX which sets CNAME. CICS VT provides variables:
CNAME DB2 column name CNAMEL length of DB2 column name
FNAME copybook field name FNAMEL length of copybook field name
CICS VT will automatically translate "-" to "_" in your copybook field names.
For example, to remove a 6-byte common prefix: CNAME = SUBSTR(FNAME,7)
to add a prefix of "VT_" CNAME = 'VT_' || CNAME
Press: Enter to preview your edit or PF3 to process your edit
CANCEL will cancel the edit, leaving the field names unchanged
In the Expression area, the following REXX command strips the FITEM_ prefix from all of the generated column names:
CNAME = SUBSTR(FNAME,7)
Type CANCEL to undo the changes and return to the Edit columns screen.
You can write a short REXX program for more complex changes. For example, the following program removes the string XXXX- from anywhere within the field name:
S = 'XXXX-'; L = LENGTH(S); CNAME = FNAME; X = POS(S,CNAME);
DO WHILE X > 0;
IF X = 1 THEN CNAME = SUBSTR(CNAME,L+1);
ELSE CNAME = LEFT(CNAME,X-1) || SUBSTR(CNAME,X+L);
X = POS(S,CNAME); END;
You can specify a maximum of 383 characters of REXX.
Note the following factors when you are using the CHANGE command:
For very complex transformations, you can write your own logic in a REXX library, and call it from the CHANGE command. Here is an example of how to call the REXX function MYREXX:
CNAME = MYREXX(FNAME,'string')