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.
BB N TITRE 10BL
BB 002 * COMMENTAIRE 1 99IT TOP = '1'
BB 005 * COMMENTAIRE 2 99IT TOP = '2'
F02BB
000 *N TITRE
*LV=10
002 IF TOP = '1'
002002* COMMENTAIRE 1
005 IF TOP = '2'
005005* COMMENTAIRE 3
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'
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.
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.
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.