G – Generate
This section provides information about Generate.
G – Definition
The G (Generate) command is used to submit a compile or generate. The module must be checked out (using the C operation), but does not need to be edited for generate to be valid. The example shown in the following figure is for program TSUBR20.
Using the G Command
COMMAND ===>
Type ==> COB Name(s) for Generated Type(s):
Name ==> TSUBR20 Src1 ==> TSUBR20 Src2 ==> Src3 ==> TSUBR20
Load ==> TSUBR20 Lod1 ==> TSUBR20 Lod2 ==> Lod3 ==>
Program (Y/N) ==> N SQL used? ==> N Package used? ==> N
Do Binds? ==> N (Y/N/B) Bind Plans? ==> N Prod DB2 Subsytem ==>
Add'l Gen. Opts ==>
Add'l Link Opts ==>
Compiler ==> CM (CM C2 OS)
SAVE changes to above Options? ==> Y (Y/N) Edit JCL? ==> N
Include TEST: Copylib? ==> Y Linklib? ==> Y (Y/N) Panel Lock? ==> N
DISPLAY/CHANGE DB2 Package Bind Parameters? ==> N (Y/N)
JOBCARD Information:
==> //USER003G JOB (),'GENERATE',CLASS=A,MSGCLASS=R,
==> // REGION=0M,MSGLEVEL=(1,1),NOTIFY=&SYSUID
==> //*
==> //*
----|----1----|----2----|----3----|----4----|----5----|----6----|----7--
Press ENTER to Submit Generate or END to terminate
Site-definable Generate Options Screen
The preceding figure (Using the G Command) shows the Generate Options input screen on the Code Pipeline Demo/Training system. Each Code Pipeline customer site will have its own version of this screen depending on its own compile, link, and bind parameters.
Sample Generate Parameters
Some sample Generate Parameters with their valid values are:
Value | Description |
|---|---|
Program | Y = Executable module N = Subroutine/non-executable module |
SQL used? | Y = Contains SQL N = No SQL |
Package used? | Y = Db2 Package for DBRM N = No Package used |
Do Binds? | Y = Compile/Link/Bind N = Compile/Link only B = Bind only |
Generate Outputs
The G (Generate) operation may create executable code. On the z/OS environment, these may be standard load modules or may be executables, such as MarkIV file definitions.
Generate Submits a Batch Job
The G operation typically submits a batch job, which may do a program compile/linkedit/bind, for example.
The G operation can, in fact, be very broadly defined to perform a “generate” process on any “generatable” type of component, as defined in Code Pipeline’s repository.
Generate Concatenation
Libraries are concatenated for the compiles and links. In the Code Pipeline Demo System, for example, Code Pipeline concatenates DEV1 before STG1, then QA, then PRD. Concatenation is automatic, so Code Pipeline users don’t need to know what libraries to include or which compile/link parameters to use.
Application Compile Defaults
Typically, an Application has a default profile for its compiles and links—such as COBOL for MVS—with certain compile/link parameters. Within Code Pipeline, Applications are normally set up to use the default, except for the exception cases which are input to Code Pipeline the first time a module is compiled and retained by Code Pipeline thereafter.
Compile/Link Data is Persistent
From the first compile forward, the compile/linkedit/bind information is saved in Code Pipeline’s repository so it does not need to be input again.
Generate Required at Least Once
Typically, executables are generated in the update environment and at least once more depending on the change cycle structure. Generates may be forced where intersecting change cycle paths come together, for instance, and may also happen automatically as part of the Promote process.
Status is IP (In Process)
The following figure shows the Task List as it appears when Code Pipeline submits the compile. The Status column shows the Generate is In Process (IP) by USER003.
Status is IP
Command ===> Scroll ===> CSR
More -->
+-----------------------------------------------------------------------------+
| Select(/) Add Approve Close Join Reset Show/Hide Work ++/-- |
+-----------------------------------------------------------------------------+
Type Name Lev Op A User Date MM DD Time Status
________ ________ ____ __ _ ________ __________ _____ ____________________
__ COB TPROG01 DEV1
__ COB TPROG02 DEV1 G USER001 2022-05-16 10:11
__ COB TSUBR01 DEV1
__ COB TSUBR02 DEV1 S USER003 2022-05-16 10:19
__ COB TSUBR07 DEV1 C USER003 2022-05-16 11:59 IP: G (A) USER003
__ COPY TCPYA01 DEV1
__ COPY TCPYA02 DEV1 S USER002 2022-05-16 10:14
__ COPY TCPYB01 DEV1
__ COPY TCPYB02 DEV1
__ JOB TJOB01 DEV1
------------------------------- Bottom of List -------------------------------
Status is Gen Failed (Gen Failed <CV>)
The Status is Gen Failed <CV> screen displays the Task List in Code Pipeline when the generate task fails. In the Status column, it is displayed as:
The user is required to investigate the cause of the failure and resolve the problem.
The <CV> in the Status column refers to Check Version message, which indicates conflicting versions in the Change Cycle. For more information on managing the Task List, see V-Version-List.
Status is Gen Failed <CV>
Command ===> Scroll ===> CSR
More -->
+-----------------------------------------------------------------------------+
| Select(/) Add Approve Close Join Reset Show/Hide Work ++/-- |
+-----------------------------------------------------------------------------+
Type Name Lev Op A User Date MM DD Time Status
________ ________ ____ __ _ ________ __________ _____ ____________________
__ COB TPROG01 DEV1
__ COB TPROG02 DEV1 G USER001 2022-05-16 10:11
__ COB TSUBR01 DEV1
__ COB TSUBR02 DEV1 S USER003 2022-05-16 10:19 => Gen Failed
__ COB TSUBR07 DEV1 C USER003 2022-05-16 11:59 => Gen Failed <CV>
__ COPY TCPYA01 DEV1
__ COPY TCPYA02 DEV1 S USER002 2022-05-16 10:14
__ COPY TCPYB01 DEV1
__ COPY TCPYB02 DEV1
__ JOB TJOB01 DEV1
------------------------------- Bottom of List -------------------------------
Op, User, and Date/Time are Updated
The last step of the Generate process updates the module’s statistics and clears the Status In Process flag. Users can instantly see if the Generate worked successfully.
The Status field displays any Generate errors. Use the J (Job Output) command to view the batch job results.