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


Chapter 3 Tools : $PRINTFIELD

$PRINTFIELD
Writes the specified string into the current printline. (C)
Invocation
CALL $PRINTFIELD(string, pos, length, fill, just)
 
The string to be inserted. Its syntax can be C (fixed-length character string), V (variable-length character string), or W (double-byte character).
Usage Notes
Use $PUTLINE to output the printline.

Exceptions
 
The length of text is greater than the print width (where width is the page width set by $RESETPRINT or $SETPRINT).
Example
The following rule prints a string to the message log:

 
PRINTFIELD_1;
_ LOCAL SOURCE_STRING;
     _ ------------------------------------------------------------+-----------
_ ------------------------------------------------------------+-----------
_ CALL $SETPRINT(10, 70, 1, 'SCR', 'N'); | 1
_ SOURCE_STRING = 'THIS IS THE SOURCE STRING'; | 2
_ CALL $PRINTFIELD(SOURCE_STRING, 1, 70, '*', 'L'); | 3
_ CALL $PRINTFIELD('OUTPUT', 13, 6, '', 'C'); | 3
_ CALL $PUTLINE; | 4
_ ------------------------------------------------------------------------

 
Displayed Output for the PRINTFIELD_1 Rule
Using PF2 after executing this rule displays the following screen. The second call to $PRINTFIELD replaced the word SOURCE from SOURCE_STRING with the word OUTPUT.

 
----------------------- INFORMATIONAL MESSAGE LOG --------------------
COMMAND ===> SCROLL ===> P
 
------------------------------ NEW PAGE ------------------------------
 
                                                                     Page 1
THIS IS THE OUTPUT STRING*********************************************

 

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