  | 
		
HP COBOL Reference Manual
 
 
Technical Notes
 
 
  -  On OpenVMS, the LINAGE clause causes a file to be in print-file
  format. When a WRITE statement positions the file to the top of the
  next logical page, device positioning occurs by line spacing rather
  than by page ejection or form feed.
    
 The default DCL PRINT command causes the insertion of a form-feed
 character when a form nears the end of a page. Therefore, when the
 default PRINT command refers to a LINAGE file, unexpected page spacing
 can result.  The /NOFEED compiler option to the PRINT command
 suppresses the insertion of form-feed characters and prints LINAGE
 files correctly. For example:
 
  
    
       
      
$ PRINT/NOFEED full-file-name
 
 |   
   - The /NOVFC compiler option can be used on OpenVMS Alpha and I64 to
  produce a Stream_LF record-formatted print file. The default (/VFC)
  behavior is to produce a VFC record-formatted file. <>
  
 -  HP COBOL on Tru64 UNIX systems writes LINAGE files with
  blank lines to simulate WRITE ADVANCING behavior. These blank lines
  would not be produced on an OpenVMS Alpha or I64 system. When you input
  a LINAGE file, you must compensate for the difference. For example, use
  an extra initial READ statement (on Tru64 UNIX systems) to skip over
  the leading blank line in the LINAGE file. <>
  
Additional References
 
 
Example
 
 
The following example specifies a logical page whose size is 26 lines:
 
 
  
    
       
      
FD  PRINT-FILE
    VALUE OF ID IS "REPORT1.LIS"
    LINAGE IS 16 LINES WITH FOOTING AT 13
      LINES AT TOP 4 LINES AT BOTTOM 6.
 |   
In this example, the first line to which the page can be positioned is
the fifth line. The end-of-page condition occurs when a WRITE statement
causes the LINAGE-COUNTER value to be in the range 13 to 16. The page
overflow condition occurs when a WRITE statement causes the
LINAGE-COUNTER value to exceed 16.
 
Figure 5-9 shows the logical page areas resulting from the example.
 
Figure 5-9 Logical Page Areas Resulting from a LINAGE
Clause
  
 
5.3.32 LINE NUMBER (Alpha, I64)
Function
 
 
The LINE NUMBER clause specifies vertical positioning information for a
report group, or specifies the vertical screen coordinate for a screen
item.
  
 
line-num
is a nonnegative integer. line-num represents an absolute line
number on a logical page and establishes a print line for a Report
Writer report group.
line-num-plus
is a positive integer. line-num-plus represents a relative
line number on a logical page and establishes a print line for a Report
Writer report group.
identifier-1
is an elementary unsigned numeric integer data item. It cannot be
subscripted.
integer-1
is an unsigned integer value.
 
Syntax Rules (Report Description)
 
 
  - Neither line-num nor line-num-plus can exceed
  three significant digits. 
 The PAGE clause defines the length of a
  logical page and the vertical subdivisions within which each report
  group is presented. Neither line-num nor
  line-num-plus may specify a line outside of the PAGE clause
  limits. See Section 5.3.36 clause for more information.
   - Within a given Report Group Description, an entry containing a LINE
  NUMBER clause must not contain a subordinate entry that also contains a
  LINE NUMBER clause.
  
 - Within a given Report Group Description, all absolute LINE NUMBER
  clauses must precede all relative LINE NUMBER clauses.
  
 - Within a given Report Group Description, successive absolute LINE
  NUMBER clauses must specify integers in ascending order. The integers
  need not be consecutive.
  
 - If a given Report Description (RD) does not contain a PAGE clause,
  the program may specify only relative LINE NUMBER clauses in any Report
  Group Description within that report.
  
 - Within a given Report Group Description, a NEXT PAGE phrase may
  appear only once. If present, it must be the first LINE NUMBER clause
  in that Report Group Description.
  
 - A LINE NUMBER clause with the NEXT PAGE phrase may appear only in
  the description of a CONTROL HEADING, DETAIL, CONTROL FOOTING, or
  REPORT FOOTING report group.
  
 - Every entry defining a printable item must either contain a LINE
  NUMBER clause or be subordinate to an entry that contains a LINE NUMBER
  clause. See the COLUMN NUMBER clause for more information.
  
 - The first LINE NUMBER clause in a PAGE FOOTING report group must
  define an absolute line-num value.
  
 - line-num-plus may be zero. If line-num-plus is
  zero, the line will be printed on the same line as the previous print
  line (overprint); however, line-num-plus cannot be zero for
  the first print line of a report group.
  
Syntax Rules (Screen Description)
 
 
  - The LINE clause can be specified only in an elementary screen
  description entry.
  
 - identifier-1 cannot be subscripted.
  
General Rules (Report Description)
 
 
  - To establish each print line for a report group, a program must
  specify the LINE NUMBER clause.
  
 - Before presenting the print line, the Report Writer Control System
  (RWCS) causes line positioning as specified by a LINE NUMBER clause.
  
 - The NEXT PAGE phrase defines the line number of a new page on which
  to present the report group.
  
 - For a complete specification on how to determine the first print
  line for a report group, see Appendix D, Report Writer Presentation Rules and Tables. A partial summary of these
  rules follows: 
 If a relative clause is not the first LINE NUMBER
  clause in a report group, then the line number on which its print line
  is presented is determined by the sum of the following:
  
    - The line number from the previous print line of the report group
    
 - line-num-plus of the relative LINE NUMBER clause
  
  
     If the first LINE NUMBER clause in the Report Group Description
    entry is relative and a PAGE clause is specified, the first print line
    for the report group is determined as follows. See the Section 5.3.36
    clause for the definitions of page-size,
    heading-line, first-detail-line,
    last-detail-line, and footing-line.
  
    - REPORT HEADING 
 The RWCS presents this group on a line number
    whose value is the sum of line-num of the first LINE NUMBER
    clause and heading-line minus 1.
     - PAGE HEADING 
 If a REPORT HEADING report group has been
    presented on the page on which this report group is to appear, the RWCS
    presents the PAGE HEADING relative to the final LINE-COUNTER setting of
    the REPORT HEADING.  If no REPORT HEADING has been presented on the
    page, the RWCS presents this report group on the line number whose
    value is the sum of line-num of the first LINE NUMBER clause
    and heading-line minus 1.
     - DETAIL, CONTROL HEADING, or CONTROL FOOTING 
 If the value in
    LINE-COUNTER is less than first-detail-line, the RWCS presents the
    report group on first-detail-line.  If the value in LINE-COUNTER is
    greater than or equal to first-detail-line and if this is the first
    body group to print on the page, the RWCS presents the report group on
    the line corresponding to the value in LINE-COUNTER.  If the value
    in LINE-COUNTER is greater than or equal to first-detail-line and if
    this is not the first body group to print on the page, the RWCS
    presents the report group on the line whose value is the sum of
    LINE-COUNTER and line-num of the first LINE NUMBER clause of
    the current CONTROL HEADING, DETAIL, or CONTROL FOOTING report group.
     - PAGE FOOTING 
 Not applicable. The first LINE NUMBER clause of a
    PAGE FOOTING report group must contain an absolute line number
    reference.
     - REPORT FOOTING 
 If a PAGE FOOTING report group has been
    presented on the current page, the RWCS presents the REPORT FOOTING
    report group on the line whose value is the sum of the current value in
    LINE-COUNTER and line-num of the first LINE NUMBER clause of
    the REPORT FOOTING report group.  If no PAGE FOOTING report group
    has been presented on the current page, the RWCS presents the REPORT
    FOOTING report group on the line whose value is the sum of
    footing-line and line-num of the first LINE NUMBER
    clause of the REPORT FOOTING report group.
    
  
General Rules (Screen Description)
 
 
  - The LINE clause, in conjunction with the COLUMN clause, establishes
  the starting position for a screen item. This position is an offset
  from the starting screen coordinates specified in the ACCEPT or DISPLAY
  statement. The LINE clause specifies the vertical coordinate.
  
 - The LINE clause without the PLUS phrase specifies the absolute line
  number.
  
 - The LINE clause with the PLUS phrase specifies a line number
  relative to that at which the preceding item ends, regardless of
  whether or not the ACCEPT or DISPLAY statement displays the preceding
  item on the screen.
  
 - If the LINE clause is omitted, the following apply:
  
    - If no previous screen item is defined, LINE 1 is assumed.
    
 - If a previous screen item is defined, the ending line of that
    previous item is assumed.
  
  
  
Additional References
 
 
  
  
		 |