In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - Suppressing Initial Form Feed

When developing routines which use the HEADING statement and print to the printer, the omnipresent initial form feed can become a nuisance. As Dave Harmacek of Harmacek Database Solutions Inc points out, the verb responsible for RUN recognises and sets command line options. Thus RUN BP MY_PROG (PE) would actually suppress this initial form feed.

There are times when this might not be appropriate (such as in a subroutine that actually does the printing), thus a method to achieve the same functionality without the command line options is presented below. Note that it makes use of V6 - the SET-OPTIONS verb, and that SET- OPTIONS displays an informational message. This is probably not desirable in this case, so the message should be modified to make it an N type message by editing SYS.MESSAGES V6.1 and setting field 1 to N not A.


0001       /*
0002        Author   AMcA
0003        Date     Jan 12th 1992
0004        Purpose  To prevent initial form feed when using heading with printer
0005       */
0006        Printer On
0007        @Sentence = ". (PE"
0008        Call V6
0009  
0010        heading "Hello There"
0011        for t = 1 to 120
0012         print "Watch this"
0013        Next
0014        heading ""
0015        printer off
0016  
0017        * Now reset options to null or normal settings
0018        @Sentence = ". ()"
0019        Call V6

(Volume 3, Issue 8, Page 8)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel