DPAR

Create a Declaratives Section paragraph or section--not declarative statements.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.

See also DECL and USE BEFORE REPORTING for creating Declarative Section statements, paragraphs, and sections.

Targets:

  • DLG programs
  • CICS batch programs and reports
  • IMS DC batch programs and reports

Syntax:

 DPAR   sectionname SECTION
        USE declarativesentence
[DPAR   paragraphname
            paragraphstatements ]

Parameters:

sectionname Specify Section paragraph.
USE declarative sentence AMB supports the USE clause with the exception of USE AFTER DEBUGGING, which is not supported.

Comments:

  • Micro Focus recommends that you code declaratives at the end of your program, because AMB generates the END DECLARATIVES statement when either:
    • It encounters another keyword in the KYWD column.
    • The Declaratives Section is at the end of the program.
  • Do not code the DECLARATIVE SECTION header and the END DECLARATIVES statements. AMB generates these for you.

Examples:

Program Painter code

 DPAR    DUMMY-FOOTER SECTION
         USE BEFORE REPORTING FOOTER-DUMMY
 DPAR    DUMMY-FOOTER-PARA
         MOVE TOTAL-DIFF TO TIME-TOTAL
         SUPPRESS PRINTING
 DPAR    TOTAL-FOOT-SECTION SECTION
         USE BEFORE REPORTING TOTAL-FOOT
         TOTAL-FOOT-PARA
         TIME-AVERAGE = TIME-TOTAL / AVERAGE-CNT
         CALL-PERCENTAGE = (HALF-HOUR-CALLS / AVERAGE-CNT)
         ... * 100
         MOVE HALF-HOUR-CALLS TO HOLD-CALLS
         ADD HOLD-CALLS TO HALF-HOUR-CNT
         MOVE ZERO TO HALF-HOUR-CALLS
 DPAR    CONTROL-FOOTING-FINAL SECTION
         USE BEFORE REPORTING CNTL-FT-GP
 DPAR    CONTROL-FOOTING-FINAL-PARA
         IF SYSIN-TRACKER NOT = 'CTSALL'
             SUPPRESS PRINTING
         ELSE
             FINAL-PERCENTAGE = (HALF-HOUR-CNT / FINAL-PROB-
CNT * 100)

Generated code

 DECLARATIVES.
 DUMMY-FOOTER SECTION.
     USE BEFORE REPORTING FOOTER-DUMMY
 DUMMY-FOOTER-PARA.
     MOVE TOTAL-DIFF TO TIME-TOTAL
     SUPPRESS PRINTING
 TOTAL-FOOT-SECTION SECTION.
     USE BEFORE REPORTING TOTAL-FOOT
     $TOTAL-FOOT-PARA
     TIME-AVERAGE = TIME-TOTAL / AVERAGE-CNT
     CALL-PERCENTAGE = (HALF-HOUR-CALLS / AVERAGE-CNT)
     ... * 100
     MOVE HALF-HOUR-CALLS TO HOLD-CALLS
     ADD HOLD-CALLS TO HALF-HOUR-CNT
     MOVE ZERO TO HALF-HOUR-CALLS
 CONTROL-FOOTING-FINAL SECTION.
     USE BEFORE REPORTING CNTL-FT-GP
CONTROL-FOOTING-FINAL-PARA.
     IF SYSIN-TRACKER NOT = 'CTSALL'
         SUPPRESS PRINTING
     ELSE
         FINAL-PERCENTAGE = (HALF-HOUR-CNT / FINAL-PROB-CNT * 100)
 END DECLARATIVES.