How do I create/add the DCLGEN Utility to a model to ONLY generate the DCLGEN in a migration?

Document ID : KB000054817
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

How to create a model ID within the RC/Migrator product that will generate the DCLGEN for the table. When the DCLGEN utility is referenced in a Migration strategy, only the DCLGEN text should be displayed and not the DDL for the migration objects.

Solution:

The DCLGEN utility can be added to an existing model ID. If desired, a new model ID with only the DCLGEN utility can be created.
If changing an existing model, be aware that these changes may impact other users who are using the model. Templating an existing model would be an alternate method. Access to Model Services with the appropriate authority is required to add/change Model Services. Any changes to default models will not be reflected in later releases in the altered models and therefore, customization becomes the users responsibility.

To add the DCLGEN utility to an existing model ID, perform the following steps:

  1. Access the Model Services screen, using the Profile option.

  2. Enter U (update) next to the model ID name you want to change, and press Enter.

  3. Enter I (insert) in the CMD field to insert a blank line.

  4. In the blank line, enter the following:

    • DCLGEN in the Utility field

    • T in the OB (Object) field

    • "Generated Declarations" in the Description field (no quotes)

  5. Press Enter. An ISPF session appears.

  6. Enter the commands for the utility. For example, enter the following:

        #IF(%SQLPOSA)    .CALL DSN PARM(%TOSSID)    .DATA    DCLGEN TABLE(%OBJECT) -    LIBRARY('%DCLLIB')    -    ACTION(ADD)           -    LANGUAGE(COB2)        -    STRUCTURE(%OBJECT)    .ENDDATA   #ENDIF   
  7. When finished, press PF3 to end the edit session.
    The DCLGEN utility now has an I (for Invalid) in the SYM field, to indicate that the utility contains a user-defined symbolic that has no value, in this case %DCLLIB.

  8. Enter S in the CMD field beside the new utility name, and press Enter. The General Model Symbols screen appears, listing the user-defined symbolic %DCLLIB and the utility commands. This screen lets you enter the replacement values.

  9. Enter %USERID..DCLGEN.LIB in the Replacement Value field beside the symbol DCLLIB.

  10. Press PF3 (End) to save the replacement value and return to the General Model Utilities screen. The Last Update field will reflect the last action, which was entering the replacement value for the DCLLIB symbol.

  11. Press PF3 to return to the General Model Services screen. The new utility DCLGEN is saved as a part of the Model ID you updated.

    These steps are outlined in the RC/Migrator manual, Chapter 4, "Adding a DCLGEN Utility".

  12. Create the migration strategy generating the migration at the Table level.

  13. On the strategy Analysis Options screen - set all options to N and use the D (data) Exclusive option. This ensures that ONLY the DCLGEN text will be generated.

  14. Pre-allocate the DCLGEN.LIB as a sequential dataset. This is the dataset defined in Step 9.

  15. Execute the strategy and the DCLGEN is written to the dataset in step 14.