Caché MultiValue Query Language (CMQL) Reference
HEADING clause
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Inserts a heading on each page of displayed output.
Synopsis
HEADING "text['code']"
Description
The HEADING and HEADER keywords are synonyms.
The HEADING clause causes the specified heading to be displayed (or printed) at the top of each page of CMQL output. This heading can consist of any combination of literal text and code characters. Note that heading literal text is in outer quotes and code characters are in nested quotes.
The available outer quotes are "text" or \text\. Inner (nested) quotes must be single quotes. Therefore, to display a text and a page number heading you must specify a heading such as "This is page 'P' of my report" or \This is page 'P' of my report\.
A heading specified in the HEADING clause replaces the default page heading provided with many commands. This default page heading can be suppressed using the (H or (C letter code options or the HDR-SUPP or COL-HDR-SUPP keyword options. These letter code and keyword options do not suppress a page heading specified using the HEADING clause.
The HEADING clause ignores the setting of SP-CONDUCT bit 1024. HEADING always behaves as if bit 1024 is not set.
Heading Code Characters
The following heading code characters can be included in a specified heading:
‘B’ The BREAK-ON field value. Refer to the BREAK-ON clause for details.
‘C’ Center the heading. The default is left justified.
‘D’ Date. Inserts the current system date in DD MMM YYYY format. For example, 25 May 2010.
‘G’ Right justify the following text. The default is left justified.
‘L’ Line break inserted in the heading at this point.
‘N’ No page break prompts. Displays the header at the top of each page, displays all of the pages without waiting for user prompting for the next page.
‘P’ Page numbers incrementing from 1 with leading indent. For example, "This is page'P' of my report".
‘Q’ Treat \, ], and ^ as literals, not code characters for rest of header.
‘S’ Page numbers incrementing from 1 with no indent. For example, "This is page 'S' of my report".
‘T’ Time and date. Inserts the current system timestamp in 12–hour format: hh:mm:ss DD MMM YYYY. For example, 9:35:22am 25 May 2010. Note that the time increments for each page.
^ Page number. Same as ‘P’
\ Time and date. Inserts the current system timestamp in 12–hour format: hh:mm:ss DD MMM YYYY format. For example, "Report printed \ for your review". Same as ‘T’.
] Line break. Same as ‘L’
\“\ A literal double quote character. For example, \Report is "mostly" accurate\
\'‘\ or “’‘” A literal single quote character, specified as two single quote characters. For example, "Don''t review"
You can specify more than one letter code within nested quotes. For example, "Report printed 'CTLC' For your review" displays a two-line heading with both lines centered, and the with first line containing the current system timestamp.
For further details on using heading codes, refer to the MVBasic HEADING command, which uses the same codes.