COBOL code enhancements from version 9.6.1
This page gathers the enhancements of the Rational® Programming Patterns generation from version 9.6.1. It is aimed at developers who are accustomed to managing code that was generated with versions from 9.1.2 to 9.6. If it is not your case, this page is not useful to you because all the enhancements are documented in this appropriate help pages.
When you open or regenerate a code that was generated with versions from 9.1.2 to 9.6, you must choose whether you want to benefit from the enhancements of the new version of the generation. For more information, see Generation upgrade.
A video is available on YouTube: Upgraded generation in Rational Programming Patterns 9.6.1.
Enhanced insertion of relative subfunctions in Screens and Business Components
In versions from 9.1.2 to 9.6, relative subfunctions had to be inserted in the high-priority Macro that was associated with the Screen or Business Component. This Macro was identified by the instance name, followed by SP. Then, in the COBOL code of the Screen or Business Component, the subfunction tags were displayed as Macro lines. In the Generated Structure Code view, they were displayed as Macro nodes. This display was not consistent with the fact that the subfunctions actually constituted specific code. Now, the SP Macro is no longer used and the relative subfunctions are displayed as specific code.
- As the SP Macro is no longer used, it is removed from the -CP Lines of Screens and Business Components and from the Design Explorer view.
- All the relative subfunctions can now be inserted with the wizard directly from the PDP COBOL editor or the Generated Structure Code view of a Screen or Business Component. Right-click and select . After a relative insertion, a new generation starts automatically.
- The tags of the relative subfunctions are displayed as specific code in the PDP COBOL editor and the Generated Structure Code view.
- In the PDP COBOL editor, the tags of the relative subfunctions are preceded by annotations that clarify their position relatively to the specified element (Data Element or Segment). In Screens and Business Components, the annotations are *@BEFORE, *@AFTER, or *@REPLACE depending on the action type that was selected in the function and subfunction creation wizard.
- In Business Components only, the *@ATTACH annotation is displayed at the beginning of the PROCEDURE DIVISION when a function is attached to a Logical View block or to the SQL cursors declaration block. All the subfunctions of this function will then automatically be attached to the selected Logical View or to the FSQL block. The indicated function does not generate any code in the COBOL code.
Enhanced management of the -900 lines
The -900 lines are used in subfunctions whose execution condition is not BL (BLOCK). It can be IT (IF THEN) or DW (DO WHILE) for example.
These -900 lines are now automatically managed. They are added, deleted, or moved to obtain a correct COBOL code.
For example, if the execution condition or the level of a subfunction is modified and if this modification entails the move of the -900 line, this move is now automatic. If an EL (ELSE) execution condition is added after an existing IT (IF THEN) condition, the -900 line is automatically generated.
Enhanced subfunction deletion
- The dependent subfunctions of a specific subfunction can be deleted, even if these dependent subfunctions include generated subfunctions. The choice is now available in this case in the contextual menu.
- If you delete a relative subfunction or if you check the Delete also its dependents box, a new generation automatically starts.
Enhanced management of Macros with detail lines only
Some Macros contain detail lines only. However, when the calling instance (Program or Screen for example) is generated, a start line and an end line must surround each subfunction that comes from the Macro detail lines.
Before the 9.6.1 generation, these lines were always automatically added to the COBOL code. They were displayed in the Generated Structure Code view as ArtificialCreate. In the PDP COBOL editor, they were always displayed as Macro lines, even if they had been specified with specific code.
With the 9.6.1 generation, if the start and end lines are specified with specific code, they are displayed as such in the COBOL code. They are displayed as Macro lines only if they are not specified with specific code and if, therefore, they have been artificially created by an internal process. In this case, the ArtificialCreate tag in the Generated Structure Code is kept because it is meaningful.