Sample JCL - Batch Data Mapping

You can use the AVZMFPAR member to extract batch maps for COBOL, PLI, Natural, Sequential Files, DBD, PSBs, ADABAS, CICS, and VSAM data sources, as well as for MFS maps and stored procedures.

You must use a compiled listing to perform the extract.
Note: You must perform a mapping refresh before it shows in the display map command.
Tip: Use the sample batch job in member AVZMFPAR located in your hlq.SAVZCNTL data set for extracting these maps in batch.

Table 1 through Table 14 describe the parameters that can be used in the AVZMFPAR member.

Table 1. To Fingerprint a File
Required? Parameter Description
Required SSID = AVZS The target subsystem to use this map.
Required FUNCTION = FRPT The function to be performed by the DMF parser.

Fingerprint (FRPT). When a file is fingerprinted, the file is scanned to attempt to determine the language type, such as COBOL.

Optional SOURCE = The name of the data set that contains the source to parse.
Note: It is recommend that, instead of using this parameter, you use the //SOURCE DD statement, which overrides this parameter.
Table 2. Source to DMF
Required? Parameter Description
Required SSID = AVZS The target IBM Data Virtualization Manager for z/OS subsystem to use this map.
Required FUNCTION = STOD The function to be performed by the DMF parser.
Optional SOURCE = HLQ.SOURCE.FILE The name of the data set that contains the source to parse.
Note: It is recommended that, instead of using this parameter, you use the //SOURCE DD statement, which overrides this parameter.
Required START FIELD = The name of the first field to map.
Optional END FIELD = The name of the last field to map.
Optional OFFSET ZERO = Y/N Specifies whether to set the Start Search Field offset to zero, even if it is not a group level or the first definition in a group. Defaults to YES.
Optional SAVE OPTION = Specifies The DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Table 3. DBD and PSB Batch Extraction
Required? Parameter Description
Required SSID = AVZS The target IBM Data Virtualization Manager for z/OS subsystem to use this map.
Required FUNCTION = STOD The function to be performed by the DMF parser.
Optional SOURCE = HLQ.SOURCE.FILE The name of the data set that contains the source to parse.
Note: It is recommended that, instead of using this parameter, you use the //SOURCE DD statement, which overrides this parameter.
Optional END FIELD = The name of the last field to map.
Optional OFFSET ZERO = Y/N Specifies whether to set the Start Search Field offset to zero, even if it is not a group level or the first definition in a group. Defaults to YES.
Optional V2T Converts VAR fields to TRUE VAR fields if this option is set. The TRUE VAR fields have a 2 byte length of data field preceding the data.
Optional FLATTEN Setting this option to YES will flatten the arrays at run time. Setting this option to NO will instantiate the arrays as separate tables at run time.
Optional MAP DATASET The dataset name where the map will be stored.
Optional MAP NAME The structure name. The maximum length of the map name is 30 bytes.
Optional SAVE OPTION = Specifies the DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Table 4. Source to DMF - Sequential
Required? Parameter Description
Required SEQ FILE = Specifies the data set to associate with the map (implies a sequential map for use by the sequential interface).
Optional SEQ DSN COLUMN NAME = The sequential request data set column name, if data set name (for PDS(E) data sets), that can be viewed by the client.
Optional SEQ MEMBER COLUMN NAME = The sequential request member column name, if member name (for PDS(E) data sets) that can be viewed by the client.
Optional SEQ COLUMN NAME SEARCHABLE = The sequential request DSN and member column names that can be used on the WHERE clause of a SQL statement.
Table 5. Source to DMF - To merge Map B into Map A
Required? Parameter Description
Required SSID = AVZS The server subsystem that uses this map.
Required FUNCTION = MMER The function to be performed by the DMF parser.
Required MERGE A = The map that contains the merged information (Map A of a merge function).
Required MERGE B = The name of the map that is merged into Map A.
Optional NEW MAP NAME = The name of the new map (structure name). The maximum length is 30 bytes. This field is ignored for maps that require specific names such as the DBD and PSB maps. Defaults to the start field structure name.
Optional SAVE OPTION = Specifies The DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Table 6. Source to DMF - To merge a map into a DBD segment
Required? Parameter Description
Required SSID = AVZS The target server subsystem to use this map.
Required FUNCTION = MDBD The function to be performed by the DMF parser.
Required DBDNAME = The name of the DBD to link to or unlink from.
Required SEGMENT = The name of the segment in the DBDNAME to link to or unlink from.
Required LINK MAP = The name of the map to link to the segment.
Optional SAVE OPTION = Specifies The DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Optional DISABLE DUP = Y/N Indicates whether to disable duplicates in the DBD.
Optional DISABLE FILLER = Y/N Indicates whether to disable filler fields in the DBD.
Table 7. Source to DMF - To remove a map from a DBD segment
Required? Parameter Description
Required SSID = AVZS The target server subsystem to use this map.
Required FUNCTION = MDBD The function to be performed by the DMF parser.
Required DBDNAME = The name of the DBD to link to or unlink from.
Required SEGMENT = The name of the segment in the DBDNAME to link to or unlink from.
Optional SAVE OPTION = Specifies the DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Table 8. Source to DMF - To convert a map to a sequential map
Required? Parameter Description
Required SSID = AVZS The target subsystem to use this map.
Required FUNCTION = MTOS The function that the parser performs.
Required INPUT MAP NAME = The name of this map (structure name). Maximum length is 30 bytes. This field is ignored for maps that require specific names such as the DBD and PSB maps. Defaults to the start field structure name.
Required SEQ FILE = The data set associated with the map (implies a sequential map for use by the sequential interface).
Optional SEQ DSN COLUMN NAME = The sequential request data set column name, if data set name (for PDS(E) data sets), that can be viewed by the client.
Optional SEQ MEMBER COLUMN NAME = The sequential request member column name, if member name (for PDS(E) data sets) that can be viewed by the client.
Optional SEQ COLUMN NAME SEARCHABLE = The sequential request DSN and member column names that can be used on the WHERE clause of a SQL statement.
Optional NEW MAP NAME = The name of this map (structure name). Maximum length is 30bytes. This field is ignored for maps that require specific names such as the DBD and PSB maps. Defaults to the start field structure name.
Optional SAVE OPTION = Specifies the DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Table 9. VSAM from Source
Required? Parameter Description
Required VSAM FILE = HLQ.VSAM.FILE The VSAM file to be associated with this map (implies a VSAM map for use by the VSAM or CICS VSAM interface).
Optional ALT INDEX = Y/N Indicates that you want to use alternate indexes to access this VSAM map. Default is NO.
Optional NEW MAP NAME = The name of this map, which is known as the structure name. Maximum length is 30 bytes. This field is ignored for maps that require specific names such as the DBD and PSB maps. Defaults to the start field structure name.
Table 10. To Convert a Map to a VSAM Map
Required? Parameter Description
Required SSID = AVZS The target server subsystem to use this map.
Required FUNCTION = MTOV The function to be performed by the DMF parser.
Required INPUT MAP NAME = The name of this map (structure name). Maximum length is 30 bytes. This field is ignored for maps that require specific names such as the DBD and PSB maps. Defaults to the start field structure name.
Required VSAM FILE = HLQ.VSAM.FILE The VSAM file to be associated with this map (implies a VSAM map for use by the VSAM or CICS VSAM interface).
Optional ALT INDEX = Y/N Indicates whether to use alternate indexes to access this VSAM map. Default is NO.
Optional NEW MAP NAME = The name of this map (structure name). Maximum length is 30 bytes. This field is ignored for maps that require specific names such as the DBD and PSB maps. Defaults to the start field structure name.
Table 11. CICS
Required? Parameter Description
Required CICS CONN = The name of the CICS connection to use for this map, if this map is to be used by the CICS VSAM interface.
Required CICS TRAN = The name of the CICS transaction to use for this map, if this map is to be used by the CICS VSAM interface.
Required CICS FCT = or CICS FCT ENTRY = The name of the CICS FCT entry to use for this map, if this map is to be used by the CICS VSAM interface.
Optional AIXn FCT = where n is numeric for 1-8. The name of the CICS FCT entry to use for each IX path found, if this name is to be used by the CICS VSAM interface.
Optional SAVE OPTION = Specifies the DMF import save option. Valid values are:
  • NOSAVE
  • SAVE (default)
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH (default)
  • REFRESH
Attention:
  • A COBOL listing with OPT(FULL) cannot be processed to produce a virtual table. Keywords for this process define the same elements that you would specify on the ISPF panels.

Creating ADABAS virtual table:

When executing the AVZMBTPA utility without specifing a DDM on the SOURCE DD statement, the batch utility performs an Adabas LF command to read the FDT and generates 2 byte column names. It is recommended to supply a DDM view to provide long names, date, timestamp, scale formating.

Note: Some 2 byte column names are reserved for SQL, e.g. (AS, IF, IS, IN, ON, OR, TO, TS)

Example:


//DMFEXTR1  EXEC PGM=IKJEFT01,PARM=(AVZMBTPA O'),REGION=0M         
//STEPLIB   DD DISP=SHR,DSN=your..SAVZLOAD                               
//          DD DISP=SGR,DSN=your.ADABAS.LOAD    <= ADALNKR routine
//SYSEXEC   DD DISP=SHR,DSN=your..SAVZEXEC                               
//SOURCE    DD DISP=SHR,DSN=SOURCE.DATASET.AND.MEMBER  <= DDM LISTING    
//SYSTSPRT  DD SYSOUT=*                                             
//SYSTSIN   DD DUMMY                                                
//SYSIN     DD *                                                    
  SSID      = AVZS                                                  
  FUNCTION  = ADLF                                   
  MAP NAME = ADA100_FILE999_SALES                         
  SAVE OPTION = REPLACE                                 
  REFRESH OPTION = REFRESH                              
  ADABAS DBID = 100                                     
  ADABAS DBNAME = BATCHPARSER                             
  ADABAS FILE NUM = 999                                 
  ADABAS SUBSYS = ADAB                                  
  FLATTEN = YES                                         
  MU COUNT = 3                                          
  PE COUNT = 3                                          
  CREATE COUNT FIELDS = YES                             
  USE DDM = YES                                         
  REDEFINE_BEGIN                                        
REDEFINE_FILE = 999 REDEFINE_FIELD = AA                   
     (REDEFINE_COLUMN = AA_COLUMN1   REDEFINE_FORMAT = A 
      REDEFINE_LENGTH = 10         REDEFINE_OFFSET = 0)   
     (REDEFINE_COLUMN = AA_COLUMN2  REDEFINE_FORMAT = A 
     REDEFINE_LENGTH = 20         REDEFINE_OFFSET = 10)    
REDEFINE_END 
  BEGIN_OVERRIDES                                  
    FILE = 999, FIELD = P2, FORMAT = P, SCALE = 2  
    FILE = 999, FIELD = P8, FORMAT = P, SCALE = 2  
    FILE = 999, FIELD = F2, FORMAT = A, LENGTH = 6 
    FILE = 999, FIELD = U8, FORMAT = I, LENGTH = 4 
    FILE = 999, FIELD = P4, FORMAT = D
    FILE = 999, FIELD = P7, FORMAT = S
  END_OVERRIDES                                                                                                                                
/*
Table 12. Adabas - Supported Input Parameters for Extracting an Adabas File
Required? Parameter Description
Required SSID = AVZS The Data Virtualization Manager subsystem ID.
Required FUNCTION = ADLF The parser function for Adabas.
Required MAP NAME = The name of this map, which is known as the structure name. The maximum length is 30 bytes.
Required ADABAS DBID = The database ID as shown on the ADAREP.
Optional ADABAS DBNAME = The database name as shown on the ADAREP. This name is used for reporting purposes.
Required ADABAS FILE NUM = The file number of the Adabas file as shown on the ADAREP.
Required ADABAS SUBSYS = The Adabas SVC router name assignment. If not specified, the default is ADAB.
Required MU COUNT = The maximum allowed MU (multiple value field) columns generated. Optional when using FLATTEN = N. If not specified, the default is 0.
Required PE COUNT = The maximum allowed PE (periodic groups) columns generated. Optional when using FLATTEN = N. If not specified, the default is 0.
Optional CREATE COUNT FIELDS = If set, the parser generates a count field for all MU and PE fields. The name that is generated for the field is the PE or MU field name plus the letters "_C" (if using the field name in the DDM) or the PE or MU field name plus the letter "C" (if using the field name from the LF command). For example, if you run AVZMBTPA by using the DDM, and the PE or MU name ACCOUNTS, the generated name for the count field is ACCOUNTS_C. If you run AVZMBTPA by using only the LF command, and the PE or MU name is AA, the generated name for the count field would be AAC.
Values are:
  • Y for Yes
  • N for No
Optional U_2_P = Indicates whether the extract converts all unpacked format fields to the packed format.
Values are:
  • Y for Yes
  • N for No
The default is N.
Note: Use this parameter if you anticipate negative Adabas unpacked decimal numbers; otherwise, an alphanumeric representation is returned. For example, -23 would be returned as 02L. Use of this parameter changes the data type from character to numeric.
Optional B_2_I = Indicates whether the extract converts all 2-byte, 4-byte, and 8-byte binary file fields to short integer, integer, and big integer formats respectively.
Values are:
  • Y for Yes
  • N for No
The default is N.
Optional DE SEARCH ONLY = Generates control definitions that allow the client to use WHERE columns that are Adabas descriptors (such as SUPERDE, SUBDE, and HYPERDE).
Values are:
  • Y for Yes
  • N for No
The default is N.
Optional SEARCH BY PE INDEX = Allows the client to target rows that match a particular occurrence of the PE field when searching rows by using the WHERE clause. If not specified, all rows where any occurrence of that PE field matches the value specified are targeted.
Values are:
  • Y for Yes
  • N for No
The default is N.
Optional USE DDM = Uses the DDM source supplied on the source DD statement to update the Adabas map with long field names and to override the data types as defined in the Adabas FDT. The DDM must be extracted using step DDMEXTR in this JCL.
To generate a DDM member, execute a Natural batch job. For example:

//CMPRINT DD DISP=SHR,DSN=hlq.DDMS(DDMEMBER)
//CMWKF01 DD DUMMY 
//CMSYNIN DD * 
    LOGON LIB 
    LIST VIEW ADABAS-DDM FIN 
Valid values are:
  • Y for Yes
  • N for No
The default is N.
Optional SAVE OPTION = Specifies the DMF import save option. Valid values are:
  • NOSAVE
  • SAVE
  • REPLACE
It is recommended that you use the SAVE value to prevent overwriting another map. The default is SAVE.
Optional REFRESH OPTION = Specifies whether to refresh the map. Valid values are:
  • NOREFRESH
  • REFRESH
The default is NOREFRESH.
Optional SECURITY = Generates security on the “TABLE DEFINITION”.
Values are:
  • Y for Yes
  • N for No
The default is N.
To define a Data Virtualization Manager Resources for Adabas file security, you must edit and submit one of the following sample jobs (depending on your security type) located in the hlq.SAVZCNTL library:
  • AVZRAVDA for RACF security
  • AVZAZVDA for CA ACF2 security
  • AVZTSVDA for CA Top Secret Security
Optional ADASCRPWD = The password that is used to access the specified file number. If the IBM Data Virtualization Manager for z/OS Interface for Adabas accepts the password, it passes it to the Adabas control block ADDS 3 field and generates the ADASCRPWD =password statement.
Optional DBCS = Specifies which Adabas Alpha/Binary to use to store pure DBCS data without SO/SI characters.
Table 13. Adabas - Redefine Parameters
Required? Parameter Description
Optional REDEFINE_FORMAT = x The 1-byte format type to be redefined. The rules for redefining a field format must conform to the rules of data type conversions that Adabas permits; otherwise, an Adabas response code might be generated because of a conversion mismatch.
Optional REDEFINE_PRECISION= nnn The precision override.
Optional REDEFINE_COLUMN = xxxxxxx... The 30-character name for the new redefined field that replaces the elements that comprise the original field. For example, if you are redefining field AA as two new fields or columns, the REDEFINE_COLUMN would indicate the new names for the two new fields: AA_PART_1 and AA_PART_2.
Optional REDEFINE_OFFSET = nnn The offset of the new redefined field, where nnn is the redefined offset to use.
Optional REDEFINE_AS_COUNT This option is used to support the SELECT COUNT(*) statement when there is no unique descriptor (DE, UQ) or fixed-format descriptor (DE, FI).
Optional SET_AS_PRIMARYKEY Allows you to set the field that is used as the primary key when there is no unique descriptor (DE, UQ).
Table 14. Adabas - OVERRIDES Parameters
Required? Parameter Description
Optional FILE Adabas file number.
Optional FIELD Adabas 2 byte field name.
Optional FORMAT Adabas overriding format. The possible conversions are:
  • Unpacked into Packed, Unpacked into Integer, Fixed into Alpha
  • Packed into Date, Packed into S (Timestamp), Binary into Integer, Binary into Alpha
Optional LENGTH Field length in bytes.
Optional SCALE Scale specified for Packed and Unpacked fields.