Line numbers in the Pacbase migrated Macros

To migrate Pacbase applications, the line numbers in the PROCEDURE DIVISION of Macros must be strictly managed, mainly because one Pacbase line can correspond to two COBOL lines.

The condition lines are differentiated from the processing lines (in the Pacbase sense) so that the Macro merge can correctly organize the detail lines and the line overrides. The PROCEDURE DIVISION lines that are related to these line numbers are automatically repositioned. In all the migrated Macros, the line numbers of the conditions are on 3 characters, whereas the line numbers of the processing are on 6 characters.

CAUTION:
You are strongly advised against modifying line numbers in the PROCEDURE DIVISION of the migrated Macros to prevent any line move in the instances that call these Macros.
The management of the line numbers in the migrated Macros can be illustrated in the following example with the merge of two Macros that insert lines in function F02.
  • First Macro:
    • In Pacbase, the following lines are declared in F02:
                  BB     N TITRE                10BL 
                  BB 002 * COMMENTAIRE 1        99IT TOP = '1' 
                  BB 005 * COMMENTAIRE 2        99IT TOP = '2' 
    • After the Macro migration, these lines are transformed in this way in Rational® Programming Patterns:
                  F02BB 
                  000   *N TITRE 
                        *LV=10  
                  002        IF TOP = '1' 
                  002002* COMMENTAIRE 1 
                  005        IF TOP = '2' 
                  005005* COMMENTAIRE 3
  • Second Macro:
    • In Pacbase, the following lines are declared in F02:
                  BB 003 M  '0'  W-XX001         AN WW00-XX0001 NOT =  
                  BB 004 P  F99BB                   WW00-XX001A 
                  BB 006 M  '1'  W-XX001         AN WW00-XX0001 = '2' 
                  BB 007 P  F99BB                AN WW00-XX001A = '3' 
    • After the Macro migration, these lines are transformed in this way in Rational Programming Patterns :
                 F02BB 
                 003        AND WW00-XX0001 NOT =  
                 004             WW00-XX001A 
                 006        AND WW00-XX0001 = '2'  
                 007        AND WW00-XX001A = '3'  
                 007003  MOVE '0' TO W-XX001           
                 007004  PERFORM F99BB THRU F99BB-FN. 
                 007006  MOVE '1' TO W-XX001      
                 007007  PERFORM F99BB THRU F99BB-FN. 
The merge of the two Macros results in the following lines before the orphan lines are automatically repositioned:
                002        IF TOP = '1' 
                002002* COMMENTAIRE 1  
                003       AND WW00-XX0001 NOT =  
                004            WW00-XX001A             
                005        IF TOP = '2' 
                005005* COMMENTAIRE 3 
                006        AND WW00-XX0001 = '2'  
                007        AND WW00-XX001A = '3'                 
                007003     MOVE '0' TO W-XX001         
                007004     PERFORM F99BB THRU F99BB-FN. 
                007006     MOVE '1' TO W-XX001   
                007007     PERFORM F99BB THRU F99BB-FN.
After the orphan lines are automatically repositioned, the result is as follows:
                002        IF TOP = '1' 
                003        AND WW00-XX0001 NOT =  
                004            WW00-XX001A 
                004002* COMMENTAIRE 1                       
                004003     MOVE '0' TO W-XX001         
                004004     PERFORM F99BB THRU F99BB-FN. 
                005        IF TOP = '2' 
                006        AND WW00-XX0001 = '2'  
                007        AND WW00-XX001A = '3'  
                007005* COMMENTAIRE 3 
                007006     MOVE '1' TO W-XX001   
                007007     PERFORM F99BB THRU F99BB-FN.  

The Macros that are created directly in Rational Programming Patterns are not submitted to this management. Their line numbers can be entered on 3 characters, independently of their type (condition or processing).

For an easier and optimized use of Rational Programming Patterns, the ideal would be to manage Macros with 3-character identifiers only.


Feedback