Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 3 Tools : $SETP#POS

$SETP#POS
Defines the position and content of page number lines. (C)
Invocation
CALL $SETP#POS(line_number, left_string, center_string, ­right_string)
 
An integer specifying the line on which to place the page number string. Its syntax is B (binary) with length 2.
The character string to be printed flush left. Its syntax can be C (fixed-length character string), V (variable-length character string), or W (double-byte character).
Prerequisites
Usage notes
$SETP#POS(0,'','','Page %')
Use of line _number
line _number can take on values greater than or equal to 0 and less than or equal to length - 1 (where length is the value specified in $SETPRINT or $RESETPRINT).
If line _number is 0 and no other argument has a percent sign (%), the page number line is not printed.
line _number is relative to the top of the page if it is 0 or positive; it is relative to the bottom of the page if it is negative.
If line _number is 0, the page number line does not interfere with title line; the page number line is printed on the first physical line and the title line is printed on the second physical line. If line _number is a value other than 0, the page number line takes precedence over conflicting title lines and the page number line is printed while the title line is not.
The page number line cannot be directly reset to anything other than 0. To reset the page number line to a value other than 0, first reset it to 0, and then reset it to the desired value.

Exceptions
 
This exception is raised if $SETP#POS is not preceded by a call to $SETPRINT or $RESETPRINT, or if the absolute value of line_number is greater than or equal to length - 1 (where length is the page length set by $SETPRINT or $RESETPRINT) or 29, whichever is less.
The combined length of character strings exceeds width (where width is the page width set by $SETPRINT or $RESETPRINT) or 132, whichever is less.
Example
The following rule:
1.
2.
3.
4.

 
SETP#POS_1;
_
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ CALL $SETPRINT(10, 70, 1, 'SCR', 'N'); | 1
_ CALL $PRINTLINE('THIS PAGE HAS THE DEFAULT PAGE NUMBERS'); | 2
_ CALL $SETP#POS(0, 'LEFT TITLE', '- % -', 'RIGHT TITLE'); | 3
_ CALL $NEWPAGE; | 4
_ CALL $PRINTLINE('THIS PAGE HAS THE NEW PAGE NUMBERS'); | 5
_ ------------------------------------------------------------------------

 
Resulting Output
Pressing PF2 after executing this rule displays the following screen:

 
----------------------- INFORMATIONAL MESSAGE LOG ---------------------
COMMAND ===> SCROLL ===> P
------------------------------ NEW PAGE ------------------------------
Page 1
THIS PAGE HAS THE DEFAULT PAGE NUMBERS
------------------------------ NEW PAGE ------------------------------
LEFT TITLE - 2 - RIGHT TITLE
THIS PAGE HAS THE NEW PAGE NUMBERS

 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved