Using the WRAP Option

The WRAP option of the PRINT command prints the text of the reminder column. This option wraps text based on a given width, which is 60 characters in the sample program.

The WRAP option works only on the basis of the width that is given in the character grid. It does not depend on the font.

Text that is printed in Times Roman takes about 30 to 50 percent less space than the same text in Courier (the default font, which is a fixed-size font). This means that a column with a nominal width of 44 characters (the width of the reminder column) can actually hold as many as 66 characters when it is printed in the Times Roman font. To be conservative, specify a width of 60.

The other argument of the WRAP option is the maximum number of lines. Because the reminder column in the database is 240 characters wide, at 60 characters per line no more than five lines are needed. Remember, this setting specifies only the maximum number of lines. SQR does not use more lines than necessary.

SQR calculates the maximum number of characters on a line by using the page dimensions in the DECLARE-LAYOUT command (the default is 8 1/2 inches wide). In the sample program, 8 1/2 inches minus the inch that is used in the margins is 7 1/2 inches, or 75 characters at 10 characters per inch. Printing 60 characters starting from position 22 could exceed this maximum and cause an error or undesirable output. To avoid this error, define the page as wider than it actually is. This definition is given by the argument PAPER-SIZE=(10,11) in the DECLARE-LAYOUT command.