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.
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:
- Access the Model Services screen, using the Profile option.
- Enter U (update) next to the model ID name you want to change, and press Enter.
- Enter I (insert) in the CMD field to insert a blank line.
- 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)
- Press Enter. An ISPF session appears.
- 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
- 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.
- 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.
- Enter %USERID..DCLGEN.LIB in the Replacement Value field beside the symbol DCLLIB.
- 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.
- 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".
- Create the migration strategy generating the migration at the Table level.
- 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.
- Pre-allocate the DCLGEN.LIB as a sequential dataset. This is the dataset defined in Step 9.
- Execute the strategy and the DCLGEN is written to the dataset in step 14.