A file may be program described or externally described; in either case, the program may be performing output operations on the file using O-Specs. These O-specs may be Except type (E) or Cycle type (D, H, T).
As of version 7.0, AVR (and therefore Monarch) support "program described" database files
via the InputHandler
and OutputHandler
keywords of the DclDiskFile. Print and Workstation
files are only supported when they are externally described.
For (externally described) printer files, AVR provides specialized constructs to handle the cycle type output, but there is no support for database cycle driven output.
Design Specification for Cycle Output
-
Add new Commands, similar to those used with printer output, as follows:
-
BegCycleOutPut
(replacesBegPrintAttr
) EndCycleOutput
(replacesEndPrintAttr
)
DetailPrintSpec
HeaderPrintSpec
TotalPrintSpec
DetailPrintSpec
TotalDiskSpec
-
-
BegPrintAttr
,EndPrintAttr
,DetailSpec
,HeadingSpec
andTotalSpec
are all now obsolete. - The keywords for the
XxxPrintSpec
are identical to their correspondingXxxSpec
. -
The keywords for the
XxxDiskSpec
are:- File – The File parameter can be a DiskFile or a Record Format of a DiskFile.
- Cond (
*NONE
, Boolean Expression) Op(*ADD, *DELETE, *UPDATE)
|
Flds(*ALL, {names}+ )
Example
Instead of this:
BEGPRINTATTR headingspec CpyHdr cond(*in1p *or *inOF) headingspec OrdHdr cond(*in77) fetchOverflow(*yes) headingspec DetdHdr cond(*in77) fetchOverflow(*yes) detailspec PDetail cond(*in42) fetchOverflow(*yes) totalspec DetTot cond(*inL1 *and detInd) fetchOverflow(*yes) totalspec BoHdr cond(*inL1 *and detInd *and *in43) fetchOverflow(*yes) detailspec PBo cond(*in43) fetchOverflow(*yes) totalspec BoSubT cond(*inL1 *and boInd) fetchOverflow(*yes) totalspec BoTot cond(*inL2 *and boInd) fetchOverflow(*yes) totalspec OrdTot cond(*inL2) fetchOverflow(*yes) ENDPRINTATTR
This can now be used:
BegCycleOutput HeadingPrintSpec CpyHdr cond(*in1p *or *inOF) HeadingPrintSpec OrdHdr cond(*in77) fetchOverflow(*yes) HeadingPrintSpec DetdHdr cond(*in77) fetchOverflow(*yes) DetailPrintSpec PDetail cond(*in42) fetchOverflow(*yes) TotalPrintSpec DetTot cond(*inL1 *and detInd) fetchOverflow(*yes) TotalPrintSpec BoHdr cond(*inL1 *and detInd *and *in43) fetchOverflow(*yes) DetailPrintSpec PBo cond(*in43) fetchOverflow(*yes) TotalPrintSpec BoSubT cond(*inL1 *and boInd) fetchOverflow(*yes) TotalPrintSpec BoTot cond(*inL2 *and boInd) fetchOverflow(*yes) TotalPrintSpec OrdTot cond(*inL2) fetchOverflow(*yes) EndCycleOutput
Developers can also mix print and database specs:
BegCycleOutput DetailDiskSpec MyDBFile cond(*in02) HeadingPrintSpec CpyHdr cond(*in1p *or *inOF) HeadingPrintSpec OrdHdr cond(*in77) fetchOverflow(*yes) HeadingPrintSpec DetdHdr cond(*in77) fetchOverflow(*yes) DetailPrintSpec PDetail cond(*in42) fetchOverflow(*yes) TotalPrintSpec DetTot cond(*inL1 *and detInd) fetchOverflow(*yes) TotalPrintSpec BoHdr cond(*inL1 *and detInd *and *in43) fetchOverflow(*yes) DetailPrintSpec PBo cond(*in43) fetchOverflow(*yes) TotalPrintSpec BoSubT cond(*inL1 *and boInd) fetchOverflow(*yes) TotalPrintSpec BoTot cond(*inL2 *and boInd) fetchOverflow(*yes) TotalPrintSpec OrdTot cond(*inL2) fetchOverflow(*yes) DetailDiskSpec DBFile2 cond(*in02) Op(*Delete) DetailDiskSpec DBFile3 cond(*in02) Op(*Update) DetailDiskSpec MYFMT Op(*Update) Flds(Fld1, Fld2) TotalDiskSpec MasteF cond(*inL1 *and LastInd) Op(*Add) EndCycleOutput