The Print built-in frame method executes the logic of the frame (including any nested Print method invocations), and outputs the frame for printing.
To execute the logic without printing the frame, use the Main method.
In both ROC and non-ROC reports, the value of the Glb.Stn built-in segment attribute is captured upon the first Print method invocation. On subsequent Print method invocations to the same print file, the captured Glb.Stn built-in segment attribute value is compared to the current Glb.Stn built-in segment attribute value. If the values are different, a Release logic statement is executed before performing the requested print. Similar logic applies for the Glb.Device and Glb.PrintHost built-in segment attributes in ROC reports.
Restrictions
The following restrictions apply to use of the Print method:
For applications that use ROC for output to a VD device, multiple blank pages are not printed.
ROC files are created with the usercode of the parent application when the value of the Glb.User built-in segment attribute is spaces.
Segment attributes associated with report or outputstream output should not be used if there is no associated Print method invocation, as COBOL syntax errors would result.
The Glb.Stn, Glb.Device, and Glb.PrintHost built-in segment attribute values are only relevant at the time of the actual printing of the frame. Their values might change any number of times between Print lmethod invocations, without affecting the printing of the report.
In an MCP-based system that does not use ROC, a Frame that contains only logic might print a blank line when accessed by the Print method.
In ROC Reports, a blank line is not printed in this case.
Syntax
<<frame>>::Print( streamName : qualifier = void, start : numericExpression = void) : void
Owner
Any frame.
Parameters
streamName
Indicates to output the frame to an outputstream with a different name from the default outputstream, as specified.
start
Directs printing to start at the specified line (counting from the top of the page). If headings have printed beyond this line, printing commences from the next available line. If the specified line is less than the current line, the frame is printed on the next page. If the specified line specified is greater than the Glb.FormDepth value, the frame is printed on a new page on a line calculated by subtracting the Glb.FormDepth value until a valid value is derived.
For example, if a report requests printing to start at line 53, and it is directed to a VD device (consequently, the Glb.FormDepth value is 48), one page is skipped (48 lines) and output starts at line 5.
BeginPage logic statements are regarded as part of the page heading referred to.
This parameter is ignored in Enterprise Output Manager reports.
Examples
Frame01.Print() Frame02.Print(StreamA) Frame03.Print(30) Frmae04.Print(StreamB, SkipLines)