The form descriptor (free frame) is composed of three fixed partition field groups of "header, body, and footer". (The header and the footer can be omitted.) Two or more areas can be defined to output details of frame to the body.
Refer to the PowerFORM help for details of the form descriptor (free frame).
Figure 4.3 Example of defining the form descriptor (free frame)
Figure 4.4 Example of outputting the form descriptor (free frame)
To use the form descriptor (free frame), outputs it by the display file interface.
Refer to "Using Print Files with a FORMAT clause" in the NetCOBOL User's Guide for details of the display file.
Specify the partition field group name when outputting the item defined in "header, footer, and body".
'HEAD' in case of "header"
'FOOT' in case of "footer"
'BODY' in case of "body"
Even if these partitions are output, the partition defined in the frame is not output.
<Example of application program>
* Output of header
MOVE "HEAD" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "P001" TO PRT-CONTROL.
* Output of body
MOVE "BODY" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
* Output of footer
MOVE "FOOT" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
Specify the partition field group name when outputting the frame partition defined in the frame.
<Example of application program>
* Output of Details
~ Setting of record data ("GOLF","Shoes", etc) ~
MOVE "DE" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A000" TO PRT-CONTROL.
WRITE SAMP.
~ Setting of record data ("Bag", etc) ~
MOVE "DE" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
(Omission)
* Output of Control Footer (Setting the monetary amount)
~ Setting of record data ("GOLF","Shoes", etc) ~
MOVE "CF1" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
* Output of Control Footer (Setting the monetary amount)
~ Setting of record data ("GOLF", etc) ~
MOVE "DE1" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A000" TO PRT-CONTROL.
WRITE SAMP.
~ Setting of record data ("FOOTBALL", etc) ~
MOVE "DE1" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
Note
Specifying the partition name, the frame is automatically selected and it is output to the frame position.
Output the frame partition in each frame. Whenever the partition of two or more frames is alternately output, it is output to the head of the frame. After all the processing of one intraframe is completed, it is necessary to process other frames to obtain a correct output result.
There is no problem even if the header, the footer, the body, or the frame partition is output first.
When using the form descriptor (free frame), even if a fixed partition is output in a position above the present printer head, a new page is not generated. A fixed partition is overwritten on a position of the present printer head. If new page is needed, it is necessary to explicit the new page control in the user program.
The MEFP_RC_ENDFRAMELINK(6B) error is displayed when the field group is output exceeding the frame size.
The same floating partition can be output to two or more frames by using the link function of the frame.
Figure 4.5 The form descriptor (free frame): Example of defining link function
Figure 4.6 The form descriptor (free frame): Example of outputting link function
New block is specified for moving to linked frames. If new block is specified when there is no linked frame, new block is defined as a new page.
See "Printer device control" of "Chapter 6" for new block and new page.
<Example of application program>
* Output of Details ("FOOTBALL","Wear", etc.)
MOVE "DE" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
* Output of Details ("Ball", etc.) ~
MOVE "DE" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
* ~ The case to change the frame ~
MOVE "CT" TO PRT-MODE.
MOVE "BLCK" TO PRT-CONTROL.
WRITE SAMP.
* Output of Details ("Shoes", etc.) ~
MOVE "DE" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "A001" TO PRT-CONTROL.
WRITE SAMP.
MOVE "CF1" TO PRT-GROUP.
MOVE "PW" TO PRT-MODE.
MOVE "P001" TO PRT-CONTROL.
WRITE SAMP.
(Omission as follows)
Note
When the field group is output exceeding the frame size, the MEFP_RC_ENDFRAMELINK(6B) error is displayed if there is no following link frame and the MEFP_RC_ENDFRAME(6C) error is displayed if following link frame exists.