PURPOSE: The TAB statement moves the position of the print head on the current line of the report to the position specified.
TAB [ON n] /TO/ ae [HUSH] [IF; UNLESS clause] [iterate clause]
n |
is a number or declared field that gives the number of the report to which the statement applies. |
ae |
is an arithmetic expression resulting in an integer between 1 and 500. It specifies the desired new position of the print head. |
This example prints the word PAGE and the page number, beginning at print position 62.
TAB 62 PRINT "PAGE ",@PAGE
(or)
PRINT TAB 62, "PAGE ", @PAGE
NOTES: If the specified tab position is less than the current position of the print head, the print head moves to the left by producing ASCII backspaces. It overprints characters to the right of the new print position. This feature can be used on some terminals for underscoring, but does not work on line printers.
It is also possible to underscore by using a character picture format to specify a carriage return without a line feed. The form is:
@CHR13
The following statements produce the same header. The picture format of @ ’x’ cause only the carriage return to be print since @CR contains both a carriage return and a line feed.
PRINT 5B,"HEADING",TAB 6,7"_" PRINT 5B,"HEADING",@CHR13,5B,7"_"
HEADING
It is possible to include a TAB statement, without options, in a PRINT statement of a reporting PM.