Autogen Action Option

The following information describes how a software developer can automatically generate elements that use a component that is the target of an Add, Update, or Generate action. This feature uses the Autogen action option.
cedraft
How to Automatically Generate Using Elements with Autogen
The following information describes how a software developer can automatically generate elements that use a component that is the target of an Add, Update, or Generate action. This feature uses the Autogen action option.
As a software developer, you can automatically generate elements that use a component. Such elements are known as 
using
 elements. For example, if you have a component element copybook COPYA, then the programs that use that copybook are using elements. To automatically generate using elements, you specify the Autogen action option on the Add, Update, or Generate action that acts on the component element. This option is available in batch only and cannot be used in packages.
The following graphic shows how to automatically generate using elements:
How to Generate Using Elements
How to Generate Using Elements
  1. Submit your batch request.
     Although the Autogen action option can only be used in batch, component elements can be generated in foreground or batch as follows:
    • A Generate action generates the target of the action.
    • When you add, update, transfer, or restore an element, it is automatically generated. However, the element is not generated if you set the Generate Elements option to N in foreground or specified Bypass Generate Processor in batch. These options tell
      CA Endevor
      not to execute the generate processor after adding, updating, transferring or restoring the element.
Review Prerequisites
Before using the Autogen action option, complete the following prerequisites:
  • Verify that the 
    CA Endevor® SCM
     Automated Configuration option has been purchased and enabled for your site. You can use the Display Site panel to determine if this option is activated (ACM=Y) at your site.
  • Verify the AUTOGEN_SOURCE setting in the Optional Features table. When AUTOGEN_SOURCE is not turned on, Generate actions for using elements are built with the NoSource option. This is the default.
     An administrator can change the behavior of the Autogen feature, by activating AUTOGEN_SOURCE in the Optional Features Table (ENCOPTBL). When this option is activated, the Generate actions for the using Elements are built with the Copyback, instead of the NoSource, option.
  • This scenario assumes you have the following knowledge:
    • How to perform batch tasks in foreground or using the ISPF panels. 
    • How to code SCL statements. For more information, see 
      SCL Reference
      .
  • Make sure that you understand how Autogen works. Autogen generates only those using elements that are in the same logical map as the target component. Certain Autogen Span options also generate using elements that are found in different Systems and Subsystems within the Environment and Stage of the logical map. The following topics explain the different Autogen options and how they affect processing:
Autogen Action Option
When specified on an Add, Update, or Generate action for a component element, the 
Autogen action option
 automatically generates using elements. A 
using
 element is an element that uses a component element. For example, if Autogen is specified for copybook COPYA, then the programs that use that copybook are known as using elements. Specifying Autogen for an element of Type Macro automatically generates the source elements that use the macro, which then generates the appropriate LNK elements.
Autogen is available in batch only for the Add, Update, and Generate actions and cannot be used in packages. CCIDs and comments from the original generated element are used. Autogen generates 
only
 those using elements that are found at the same inventory location as the target component or are found higher up the logical map. To generate using elements that are located across Systems or Subsystems, you can use the Autogen Span options. For more information about the Span options, see Autogen Spans Across Systems and Subsystems.
If you specify the Autogen option on any one of a group of statements, then all of those statements are resolved based on the current inventory contents before any statement is executed. Statements such as GENERATE ELEMENT * create actions based on the location and options of the Generate action. During processing, duplicate Generate actions are eliminated, and the NoSource option is enabled for all the Generate actions that are built by Autogen.
 An administrator can change the behavior of the Autogen feature, by activating AUTOGEN_SOURCE in the Optional Features Table (ENCOPTBL). When this option is activated, the Generate actions for the using Elements are built with the Copyback, instead of the NoSource, option.
Autogen improves processing by eliminating duplicate processing of components and reduces the work that is required of users, who no longer must use the Automated Configuration Manager Query facility (ACMQ) to create additional Generate actions for element components and then run another batch job to process them.
You can run Autogen in simulation mode, to preview the effects of an Autogen request.
The following restrictions apply to Autogen:
  • Autogen depends on Type Sequencing processing so that the elements that use a component are generated after all of the components have been processed (for example, macros before source, source before load modules).
  • Autogen only acts on components whose Types are listed in the Type Sequencing table. If the component's Type is not listed in the Type Sequencing table, the Autogen request is ignored.
  • Your site must have purchased and activated the option 
    CA Endevor® SCM
     Automated Configuration. You can use the Display Site panel to determine if this option is activated (ASCM=Y) at your site.
  • Autogen cannot be specified on actions that are included in a package, because approvers must see the SCL statements that they are approving.
  • Autogen and the bypass generate element (GENERATE ELEMENT=N) options are mutually exclusive.
  • Autogen is a batch option. It cannot be specified on foreground requests.
How the Autogen Action Option Affects Processing
Autogen is available in batch only for the Add, Update, and Generate actions and cannot be used in packages. When an element is generated, either by the Generate statement or through an Add or Update request, and the Autogen option is specified, 
CA Endevor
 processes the request as follows:
  1. An ACMQ search is performed for all elements that use the component element being generated.
  2. For each using element, a Generate action is created and added to the list of actions to be performed. However, duplicate Generate actions are eliminated, so that each using element will only be generated once, even if multiple components are being generated that are used by use the same element.
    The Generate action created for each using element will perform as follows:
    • Generate the using element in the same inventory location as the component.
    • Use the same CCID and COMMENT specified in the original statement.
    • Override signout, if specified in the original statement.
    • Use the NoSource option.
       An administrator can change the behavior of the Autogen feature, by activating AUTOGEN_SOURCE in the Optional Features Table (ENCOPTBL). When this option is activated, the Generate actions for the using Elements are built with the Copyback, instead of the NoSource, option.
    Accordingly, the using elements are generated as if the following Generate statement had been specified:
    GENERATE ELEMENT name FROM <
    inventory location in the original command
    > TYPE
    type
    OPTION CCID <
    same ccid
    > COMMENT <
    same comment
    > <
    override signout, if specified on original command
    > NOSOURCE.
    If the Copyback option is specified on the original action, then the Copyback only applies to the component element that is specified on the original request. The NoSource option is always used on all the Generate statements built for the using elements, unless the administrator has activated the AUTOGEN_SOURCE option in ENCOPTBL.
  3. Autogen only acts on components whose Types are listed in the Global Type Sequencing table. If the component's Type is not listed in the Global Type Sequencing table, the Autogen request is ignored.
  4. Global type sequencing is used to determine the order in which the elements are generated. However, with the Autogen option, SCL requests are fully resolved based on current inventory contents prior to any action being processed. When multiple actions are specified and the Autogen option is specified on at least one of the actions, all the actions are expanded before any of the actions are processed. All name masking is resolved and individual actions are built and then the expanded actions are executed according to the Global type sequence order.
    Consequently, if the Generate Autogen option is specified and several Move actions are included in the same request, the Move actions do not include any of the additional elements that are copied back as a result of the Generate action.
 
Example: Autogen Processing when Move actions are included on the same request
 
In this example, Macro MD1 exists at the DEV stage 1 location. This macro is used in program PD1 located at the DEV stage 1 location and in programs PQ2 and PQ3 located at the QA stage 2 location. The following two actions are included in the same batch job:
SET FROM ENV DEV SYS SYS1 SUBS SUB1 STAGE NUM 1. GENERATE ELE MD1 OPTION AUTOGEN. MOVE ELE *.
The Generate action results in elements MD1, PD1, PQ2, and PQ3 being generated at the DEV stage 1 location. However, the Move action results in only the MD1 and PD1 elements being moved to the next location in the logical map. This is because PQ2 and PQ3 were originally not at the STG1 location, so they remain at the DEV stage 1 environment.
How Autogen Span Options Work
Autogen generates 
only
 those using elements that are in the same logical map as the target component. Autogen Span options 
also
 generates using elements that are found in different Systems and Subsystems within the Environment and Stage of the logical map. Using elements are generated at the target Environment and Stage specified in the Autogen request, but in the System and Subsystem of the using element. The Span enhancement makes it easy to locate and generate using elements across Systems or Subsystems.
For all Autogen and Autogen Span results, any generated elements that are not currently at the target location are brought back as sourceless elements. However, an administrator can change the behavior of the Autogen feature, by activating AUTOGEN_SOURCE in the Optional Features Table (ENCOPTBL). When this option is activated, the Generate actions for the using elements are built with the Copyback, instead of the NoSource, option.
Also for all Autogen and Autogen Span results, using elements are not generated if they are located in unmapped Environments or they are located lower in the map than the target location of the component.
You can run any of the Autogen Span options in simulation mode, to preview the effects of an Autogen request.
The following values are valid for the Autogen option:
  • Autogen or Autogen Span None: Generates only those using elements that are in the same logical map of the component specified. Whether you specify "Autogen" or "Autogen Span None", the SCL is written as "Autogen Span None".
  • Autogen Span All: Generates using elements from all Systems and Subsystems.
  • Autogen Span Systems: Generates using elements from all Systems with the same-named Subsystem of the component specified.
  • Autogen Span Subsystems: Generates using elements from all Subsystems with the same-named System of the component specified.
The following restrictions apply to the SPAN options:
  • Common libraries must be included in the generate processor concatenations of the Systems and Subsystems of the using elements. If the libraries are not included, then the Generate action does include the changes made to the component element when searching across Systems or Subsystems.
  • The same Systems and Subsystems must exist in each Environment and Stage location. For example, if ELEMENTA is a using element in the PROD Environment, system A, then system A must exist in the DEV Environment also.
  • SPAN only includes using elements from Systems or Subsystems located in the target Environment and higher up the map.
  • SPAN does not include using elements from outside the Environment map.
How to Code Autogen
To automatically generate using elements, you can add one of the Autogen action options to an Add, Update, or Generate action in batch. This procedure describes how to perform this task from the foreground batch panels. As an alternative to performing batch tasks in foreground, you can perform batch tasks from the ISPF Menu.
  1. Select option 3, Batch, from the Primary Options Menu.
    The Batch Options Menu opens.
  2. Complete the fields as appropriate for your task. Select option 1, BUILD SCL and press Enter.
    The SCL Generate panel opens. This panel allows you to select the type of action request you want to generate,
  3. Specify the option number that corresponds to the action (Add/Update or Generate) that you want to perform and then press Enter.
    After you press Enter, the action panel opens that corresponds to the action option you selected.
  4. Code the Add, Update, or Generate action to include one of the following Autogen action options and verify that Bypass Generate Processor option is not set.
     
    AUTOGEN
     
    Generates all elements that use the component that is the target of the action. These 
    using
     elements are generated at the target location that is specified in the SCL statement. If they do not exist at the target location, they are brought back to the target location as sourceless or sourced elements, depending on the Optional Features table (ENCOPTBL) setting. To find out how the SOURCE_OPTION parameter is set in ENCOPTBL, contact your 
    CA Endevor
     administrator. If you specify AUTOGEN or AUTOGEN SPAN NONE in 
    CA Endevor® SCM
     Quick Edit or from the Foreground Batch panel, the SCL is written as “AUTOGEN SPAN NONE”.
     
    AUTOGEN SPAN NONE
     
    Generates all elements that use the component being acted upon. This option has the exact same effect as the option "AUTOGEN."
     
    AUTOGEN SPAN ALL
     
    Generates using elements that are found in any System and Subsystem combinations within the Environment and Stage of the component's logical map.
     
    AUTOGEN SPAN SYSTEMS
     
    Generates using elements that are found in any System, provided the element's Subsystem name matches the name of the Subsystem of the target component. Only Systems found within the Environment and Stage of the component's logical map or higher up the map are searched. This option is different from the Autogen option in that it includes additional Systems with the same Subsystem name in the search.
     
    AUTOGEN SPAN SUBSYSTEMS
     
    Generates using elements from all Subsystems with the same-named System of the component specified. Only Subsystem found in the System of the target component within the Environment and Stage of the component's logical map or higher up the map are searched. This option is different from the Autogen option in that it includes additional Subsystems with the same System in the search.
    Your SCL statement for the Add/Update or Generate request include the Autogen option of your choice.
     
    Note:
     Autogen, or any of the Autogen Span action options, can be specified in a Set Options statement. The Set Options statement tells 
    CA Endevor
     to apply one or a series of options to all subsequent actions, until the next Set Options statement or a Clear Options statement is encountered, or processing ends. If you enter an option in the element action statement and have coded that option in the Set Options statement, the entry in the action statement overrides the Set Options selection.
Run Autogen in Simulation Mode for Impact Analysis
You can run the Autogen option in simulation mode to see what the results would be without actually performing actions with Autogen activated. Simulation mode causes the actual execution of all actions in the batch job to be bypassed. No updates are performed. This procedure assumes that you have already coded Autogen on the actions you want to process with Autogen.
 
Follow these steps:
 
  1. Append the EN$AUSIM DD statement to your batch job that includes Autogen options. For Foreground Batch requests (or 
    CA Endevor
     Quick Edit requests) use the Include Additional JCL option to add the DD statement. An example of the DD statement is shown next:
    //EN$AUSIM DD SYSOUT=*
  2. Submit the job for processing.
    The C1MSGS1 and C1MSGS2 reports show the Syntax Request report and Action Summary report as if the actions were executed. There will be a heading line, labeled "*** AUTOGEN SIMULATION ***" to indicate that the job ran in simulation mode.
  3. Review the reports for impact analysis to see what the results would be if the actions were performed.
Autogen and Autogen Span Processing Examples
The following examples show the effects of the various Autogen action options on the same elements. Each example shows the effects of one of the options on the original state of the inventory.
In all the examples, System SYSTEMC Subsystem SUB1 and SUBC contain elements that are used in compiling programs in the Application systems, SYSTEM1, SYSTEM2, and SYSTEM3. The graphics show the component element COPYC1 highlighted along with the using programs PGMC1 and PGMC2.
DEV maps to QAS, and QAS maps to PRD. The EMER environment maps to PRD. ADMIN is separate, and holds the processors that all of the other environments use.
All examples assume the following criteria:
  • The Common SYSTEMC libraries are concatenated in every Generate processor for every application System in every Environment.
  • Consequently, all changes made in DEV in the common Systems are automatically picked up by the application Systems at every Stage, before a package or promotion to PRD has been performed.
  • For these use cases, COPYC1 is a component of all PGMC, PGMC1, and PGMC2 programs
  • Each use case assumes that the elements and locations are as shown in the original chart. Use cases are not affected by prior use cases.
Before Processing Image for All Examples
 
Before a Generate with Autogen
The following graphic shows the elements in their original state before a Generate with Autogen request is performed.
  image2015-5-6 17:13:16.png  
Example 1 Autogen or Autogen Span None
In this example, a developer changes COPYC1 in DEV Common SYSTEMC, Subsystem SUB1, and then wants to automatically generate all using elements within its same logical map. To do this, the developer performs the following Generate with Autogen or Autogen Span None request:
GENERATE ELEMENT 'COPYC1' FROM ENVIRONMENT 'DEV' SYSTEM 'SYSTEMC' SUBSYSTEM 'SUB1' TYPE COPYBOOK STAGE NUMBER 1 OPTIONS CCID REQ#43023 COMMENT 'EDIT COMMON COPY BOOKS'
COPYBACK
AUTOGEN SPAN NONE.
The effects of this GENERATE request are as follows:
  • Copybook COPYC1 is copied back and generated at DEV/SYSTEMC/SUB1/1.
  • PGMC1 found up the map at PRD/SYSTEMC/SUB1/2 is generated at DEV/SYSTEMC/SUB1/1 as a NOSOURCE element.
  • No other using programs outside the logical map of the component are affected.
Now the developer can complete his testing, and create a package with Move actions that includes all the effected elements.
 
After a Generate with Autogen
 -- The following graphic shows results after a Generate with Autogen or Autogen Span None request is performed on COPYC1 at the target location Environment ‘DEV’, Stage 1, System ‘SYSTEMC’, Subsystem ‘SUB1’.
  image2015-5-6 17:14:52.png  
Example 2 Autogen Span All
In this example, a developer changes COPYC1 in DEV Common SYSTEMC, Subsystem SUB1, and then wants to automatically generate all using elements that use the copybook in all Systems and Subsystems. To do this, the developer performs the following Generate with Autogen Span All request:
GENERATE ELEMENT 'COPYC1' FROM ENVIRONMENT 'DEV' SYSTEM 'SYSTEMC' SUBSYSTEM 'SUB1' TYPE COPYBOOK STAGE NUMBER 1 OPTIONS CCID REQ#43023 COMMENT 'EDIT COMMON COPY BOOKS'
COPYBACK
AUTOGEN SPAN ALL.
The effects of this GENERATE request are as follows:
  • Copybook COPYC1 is copied back and generated at DEV/SYSTEMC/SUB1/1.
  • Element PGMC1, located up the map at PRD/SYSTEMC/SUB1/2 is generated at DEV/SYSTEMC/SUB1/1 as a NOSOURCE element.
  • Element PGMC2, located outside the map at PRD/SYSTEMC/SUBC/2 is generated at DEV/SYSTEMC/SUBC/1 as a NOSOURCE element.
  • Element PGMC1, located outside the map at PRD/SYSTEM1/SUB1/2 is generated at DEV/SYSTEM1/SUB1/1 as a NOSOURCE element.
  • Element PGMC2, located outside the map at PRD/SYSTEM1/SUB2/2 is generated at DEV/SYSTEM1/SUB2/1 as a NOSOURCE element.
  • Element PGMC, located outside the map at DEV/SYSTEM2/SUB1/1 is generated in place.
  • Element PGMC, located outside the map at PRD/SYSTEM2/SUBA/2 is bypassed because Autogen Span attempts to build the generate request with PGMC’s system and subsystem at the target environment, but DEV/SYSTEM2/SUBA/1 does not exist.
  • Element PGMC1, located outside the map at PRD/SYSTEM3/SUB1/2 is generated at DEV/SYSTEM3/SUB1/1 as a NOSOURCE element.
  • Element PGMC2, located outside the map at PRD/SYSTEM3/SUB2/2 is generated at DEV/SYSTEM3/SUB2/1 as a NOSOURCE element.
  • Element PGMC, located outside the map at EMER/SYSTEM2/SUB1/2 is unaffected, since EMER is not in the environment map of component, COPYC1.
Now the developer can complete his testing, and create a package with Move actions that includes all the effected elements.
 
After an Autogen Span All
The following graphic shows results after a Generate with Autogen Span All request is performed on COPYC1 at the target location Environment ‘DEV’, Stage 1, System ‘SYSTEMC’, Subsystem ‘SUB1'.
  image2015-5-6 17:15:50.png  
Example 3 Autogen Span Systems
In this example, a developer changes COPYC1 in DEV Common SYSTEMC, Subsystem SUB1, and then wants to automatically generate all using elements that use the copybook in all Systems, but not Subsystems. To do this, the developer performs the following Generate with Autogen Span Systems request:
GENERATE ELEMENT 'COPYC1' FROM ENVIRONMENT 'DEV' SYSTEM 'SYSTEMC' SUBSYSTEM 'SUB1' TYPE COPYBOOK STAGE NUMBER 1 OPTIONS CCID REQ#43023 COMMENT 'EDIT COMMON COPY BOOKS'
COPYBACK
AUTOGEN SPAN SYSTEMS.
The effects of this GENERATE request are as follows:
  • Copybook COPYC1 is copied back and generated at DEV/SYSTEMC/SUB1/1.
  • Element PGMC1, located up the map at PRD/SYSTEMC/SUB1/2 is generated at DEV/SYSTEMC/SUB1/1 as a NOSOURCE element.
  • Element PGMC1, located outside the map at PRD/SYSTEM1/SUB1/2 is generated at DEV/SYSTEM1/SUB1/1 as a NOSOURCE element.
  • Element PGMC, located outside the map at DEV/SYSTEM2/SUB1/1 is generated in place.
  • Element PGMC1, located outside the map at PRD/SYSTEM3/SUB1/2 is generated at DEV/SYSTEM3/SUB1/1 as a NOSOURCE element.
  • Element PGMC, located outside the map at EMER/SYSTEM2/SUB1/2 is unaffected, since EMER is not in the environment map of component, COPYC1.
  • No other Subsystems except Subsystem SUB1 are affected with an Autogen Span Systems request and thus, using elements in Subsystems SUBA, SUBC, and SUB2 are not generated.
Now the developer can complete his testing, and create a package with Move actions that includes all the effected elements.
 
After an Autogen Span Systems
The following graphic shows results after a Generate with Autogen Span Systems request is performed on COPYC1 at the target location Environment ‘DEV’, Stage 1, System ‘SYSTEMC’, Subsystem ‘SUB1’.
  image2015-5-6 17:28:51.png  
Example 4 Autogen Span Subsystems
In this example, a developer changes COPYC1 in DEV Common SYSTEMC, Subsystem SUB1, and then wants to automatically generate all using elements that use the copybook in all Subsystems in their current System. To do this, the developer performs the following Generate with Autogen Span Subsystems request:
GENERATE ELEMENT 'COPYC1' FROM ENVIRONMENT 'DEV' SYSTEM 'SYSTEMC' SUBSYSTEM 'SUB1' TYPE COPYBOOK STAGE NUMBER 1 OPTIONS CCID REQ#43023 COMMENT 'EDIT COMMON COPY BOOKS'
COPYBACK
AUTOGEN SPAN SUBSYSTEMS.
The effects of this GENERATE request are as follows:
  • Copybook COPYC1 is copied back and generated at DEV/SYSTEMC/SUB1/1.
  • Element PGMC1, located up the map at PRD/SYSTEMC/SUB1/2 is generated at DEV/SYSTEMC/SUB1/1 as a NOSOURCE element.
  • Element PGMC2, located outside the map at PRD/SYSTEMC/SUBC/2 is generated at DEV/SYSTEMC/SUBC/1 as a NOSOURCE element.
  • No other Systems are affected with an Autogen Span Subsystems request and thus, using elements in Systems SYSTEM1, SYSTEM2, and SYSTEM3 are not generated.
Now the developer can complete his testing, and create a package with Move actions that includes all the effected elements.
 
After an Autogen Span Subsystems
The following graphic shows results after a Generate with Autogen Span SubSystems request is performed on COPYC1 at the target location Environment ‘DEV’, Stage 1, System ‘SYSTEMC’, Subsystem ‘SUB1’.
  image2015-5-6 17:17:38.png