Configuring the view elements

Assign type attributes to each element to identify what language the element uses and whether a precompiling process is required by the element.

Before you begin

About this task

The parameterized build scripts use type attributes to determine the language and precompiling processes for each element. You define these attributes in an Excel spreadsheet saved in tab-delimited format. The Perl script import_attr.pl and the tab-delimited input file that is read by this script, sampleAttr.txt, assign values to these element type attributes.
The following figure illustrates the process of configuring the view elements.
  1. Create a list of the z/OS® elements that you want to include in parameterized build processes.
  2. Determine the element type (such as COBOL or PL/I) for each element and the build resources that they will need (such as DB2® or CICS®).
  3. Determine which attributes you will need to define for each element.
  4. Create the tab-delimited input file, sampleAttr.txt, in which you assign attribute values to each element.
  5. Execute the script import_attr.pl using sampleAttr.txt as input. This script creates two output batch files: testout1.cmd and testout.cmd. Execute testout1.cmd to define the element attributes.
  6. Execute testout.cmd to assign values to the attributes for each element.
Figure 1: Configuring the view element

Configuring the view element

Procedure

To configure the view elements, do these steps:
  1. Edit the sample Excel spreadsheet file sampleAttr.xls to include all elements and their attribute values.
    The following example shows the entries in the sample spreadsheet:
    PTID PGMNAME LANG COPT DL1 DB2 MQ CICS LOPT LNKDECK
    02 PBTEST COBOL2 SOURCE N N N N N PBMAIN
    02 PBTEST1 COBOL2 N N N N N N N
    02 PBTEST2 COBOL2 SOURCE N N N N N N
    02 PBTEST3 COBOL2 N N N N N N N
    The parameterized build scripts use the following type attributes to determine the language and precompiling processes for each element:
    PTID
    This column is ignored.
    PGMNAME
    The name of the element for which the type attributes are being defined.
    LANG
    The source language of the element, such as COBOL2.
    COPT
    Compiler options for the element. Specify the compiler option in this column.
    DL1
    Whether DLI precompiling is required for the element. Specify Y or N.
    DB2
    Whether DB2 precompiling is required for the element. Specify Y or N.
    MQ
    Whether MQ precompiling is required for the element. Specify Y or N.
    CICS
    Whether CICS precompiling is required for the element. Specify Y or N.
    LOPT
    Whether link edit options are required for the element. Specify Y or N.
    LNKDECK
    Whether the element is to be linked with multiple source modules into one linking load module. Specify Y or N.
  2. To convert sampleAttr.xls file into tab-delimited format, save it as a text file sampleAttr.txt.
    The following example shows sampleAttr.txt as converted into tab-delimited format:
    PTID	→	PGMNAME	→	LANG	→	COPT	→	DL1	→	DB2	→	MQ	→	CICS	→	LOPT	→	LNKDECK
    02	→	PBTEST	→	COBOL2	→	N	→	N	→	N	→	N	→	N	→	N	→	Y	
    02	→	PBTEST1	→	COBOL2	→	N	→	N	→	N	→	N	→	N	→	N	→	N	
    02	→	PBTEST2	→	COBOL2	→	N	→	N	→	N	→	N	→	N	→	N	→	N	
    02	→	PBTEST3	→	COBOL2	→	N	→	N	→	N	→	N	→	N	→	N	→	N	
    
  3. Issue the following command to execute the Perl script import_attr.pl using sampleAttr.txt as input.
    C:\ccstg_d\Triggers>ccperl import_attr.pl -m -i sampleAttr.txt -o testout
    
    In this command, C:\ccstg_d\Triggers is the location of the parameterized build scripts and testout is the name to be used for the two output files the script generates.
    This command starts the import_attr.pl script, which reads the file sampleAttr.txt and generates output files testout1.cmd for creating the type attributes and testout.cmd for adding attribute values to the elements. The following examples show these two output files. The testout1.cmd file contains cleartool commands for creating the type attributes:
    cleartool mkattype -nc -vtype string -def \"N\" LANG  
    cleartool mkattype -nc -vtype string -def \"N\" COPT  
    cleartool mkattype -nc -vtype string -def \"N\" DL1  
    cleartool mkattype -nc -vtype string -def \"N\" DB2  
    cleartool mkattype -nc -vtype string -def \"N\" MQ  
    cleartool mkattype -nc -vtype string -def \"N\" CICS  
    cleartool mkattype -nc -vtype string -def \"N\" LOPT  
    cleartool mkattype -nc -vtype string -def \"N\" LNKDECK  
    # Remember to add description and validate -vtype and -default values
    The output file testout.cmd contains cleartool commands for assigning attribute values to the elements in the build VOB.
    Note: If your VOB or MVFS is case sensitive, change the generated file name to match your actual file name. For example, change PBTEST.CBL to pbtest.cbl if your file name is lower case.
    cleartool mkattr -rep LANG "\"COBOL2\"" PBTEST.CBL@@
    cleartool mkattr -rep COPT "\"N\"" PBTEST.CBL@@
    cleartool mkattr -rep DL1 "\"N\"" PBTEST.CBL@@
    cleartool mkattr -rep DB2 "\"N\"" PBTEST.CBL@@
    cleartool mkattr -rep MQ "\"N\"" PBTEST.CBL@@
    cleartool mkattr -rep CICS "\"N\"" PBTEST.CBL@@
    cleartool mkattr -rep LOPT "\"N\"" PBTEST.CBL@@
    cleartool mkattr -rep LNKDECK "\"Y\"" PBTEST.CBL@@
    cleartool mkattr -rep LANG "\"COBOL2\"" PBTEST1.CBL@@
    cleartool mkattr -rep COPT "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep DL1 "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep DB2 "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep MQ "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep CICS "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep LOPT "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep LNKDECK "\"N\"" PBTEST1.CBL@@
    cleartool mkattr -rep LANG "\"COBOL2\"" PBTEST2.CBL@@
    cleartool mkattr -rep COPT "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep DL1 "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep DB2 "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep MQ "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep CICS "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep LOPT "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep LNKDECK "\"N\"" PBTEST2.CBL@@
    cleartool mkattr -rep LANG "\"COBOL2\"" PBTEST3.CBL@@
    cleartool mkattr -rep COPT "\"N\"" PBTEST3.CBL@@
    cleartool mkattr -rep DL1 "\"N\"" PBTEST3.CBL@@
    cleartool mkattr -rep DB2 "\"N\"" PBTEST3.CBL@@
    cleartool mkattr -rep MQ "\"N\"" PBTEST3.CBL@@
    cleartool mkattr -rep CICS "\"N\"" PBTEST3.CBL@@
    cleartool mkattr -rep LOPT "\"N\"" PBTEST3.CBL@@
    cleartool mkattr -rep LNKDECK "\"N\"" PBTEST3.CBL@@
    
  4. Issue the following command to execute the output command file (testout1.cmd) to create type attributes.
    M:\myhost_parmbld_int\pvob_parmbld\parm_bld>C:\ccstg_d\Triggers\testout1.cmd
    In this command, myhost_parmbld_int\pvob_parmbld\parm_bld is the path of the build project VOB containing the files you want to build, C:\ccstg_d\Triggers is the location of the parameterized build scripts, and testout1.cmd is the name of the command file generated by the import_attr.pl script.
    This command file creates the LANG, COPT, DL1, DB2, MQ, CICS, LOPT, and LNKDECK attributes.
  5. Issue the following command to execute the output batch file (testout.cmd) to assign attribute values to the view elements.
    M:\myhost_parmbld_int\pvob_parmbld\parm_bld>C:\ccstg_d\Triggers\testout.cmd
    In this command, myhost_parmbld_int\pvob_parmbld\parm_bld is the path of the build project VOB containing the files you want to build, C:\ccstg_d\Triggers is the location of the parameterized build scripts, and testout.cmd is the name of the batch file generated by the import_attr.pl script.
    This batch file assigns attribute values to the view elements.

What to do next