Previous Topic: OPTIONSNext Topic: SAVE QFILE


PRINT

PRINT directs a formatted CA OLQ report to a specific CA IDMS/DC printer for a hard copy.

Batch considerations:

PRINT is invalid when running local mode.

Syntax:

►►─── PRInt ──────────────────────────────────────────────────────────────────►

 ►─┬───────────────────────────────────────────────────────────────┬──────────►
   └─ REPort ─┬─────┬─ report-name ─┬────────────────────────────┬─┘
              └─ = ─┘               └─ USEr ─┬─────┬─ user-name ─┘
                                             └─ = ─┘

 ►─┬──────────────────────┬───────────────────────────────────────────────────►
   └─ copy-number COPies ─┘

 ►─┬─────────────────────────────────────────┬────────────────────────────────►
   └─ at ─┬─ DEStination destination-name ─┬─┘
          └─ CLAss class-number ───────────┘

 ►─┬────────────────────────────────┬─────────────────────────────────────────►
   └─ for ─┬─ page-count ─┬─ PAGes ─┘
           └─ ALL ◄ ──────┘

 ►─┬───────────┬──────────────────────────────────────────────────────────────►
   ├─ SUMmary ─┤
   ├─ DETail ──┤
   └─ ENTire ──┘

 ►─┬────────────────────────┬─────────────────────────────────────────────────►
   └─┬─ CURRent ─┬─ report ─┘
     └─ HELp ────┘

 ►─┬─────────┬────────────────────────────────────────────────────────────────►
   ├─ RIGht ─┤
   └─ LEFt ──┘

 ►─┬────────┬─────────────────────────────────────────────────────────────────►
   ├─ PAGe ─┤
   └─ LINe ─┘

 ►─┬───────────────────────────────┬──────────────────────────────────────────►
   ├─ FIRst ───────────────────────┤
   ├─ LASt ────────────────────────┤
   ├─ NEXt ────────────────────────┤
   ├─ PRIor ───────────────────────┤
   ├─ * ◄ ─────────────────────────┤
   ├─ * ─┬─ + ─┬─ page/line-count ─┤
   │     └─ - ─┘                   │
   └─ page/line-count ─────────────┘

 ►─┬────────────────────────┬─────────────────────────────────────────────────►
   └─ SPRead ─┬─ EVEn ────┬─┘
              ├─ MAXimum ─┤
              ├─ LEFt ────┤
              └─ nn ──────┘

 ►─┬─────────────────────────────────────────────────────────┬────────────────►
   └─┬─ COLumns ─┬─┬─────┬─ ( ─┬─ MAXimum ─────────────┬─ ) ─┘
     └─ COLS ────┘ └─ = ─┘     │ ┌───────────────────┐ │
                               └─▼- field-reference ─┴─┘

 ►─┬─────────────────────────────────────────────────────────────────┬────────►◄
   └─ FIXed ─┬─ COLumns ─┬─┬─────┬─ ( ─┬─ NONe ────────────────┬─ ) ─┘
             └─ COLS ────┘ └─ = ─┘     │ ┌───────────────────┐ │
                                       └─▼- field-reference ─┴─┘

Parameters:

REPORT= report-name

Specifies the name of the report to be printed.

USER= user-name

Specifies the user whose report directory contains the named report file.

copy-number

Specifies the number of report copies printed. Copy-number is an integer in the range 1 through 255. The default value is 1.

DESTINATION destination-name

Specifies the printer destination the report is sent to. Destination-name can be any printer destination specified at CA IDMS/DC system generation. Use SHOW DESTINATION for a list of valid destinations.

CLASS class-number

Specifies the printer class the report file is sent to. Class-number-n is an integer in the range 1 through 64.

Note: If the DESTINATION or CLASS options are not used, the report is printed at the default printer defined at CA IDMS/DC system generation for the terminal in use.

page-count

Specifies the number of report pages printed. Page-count is an integer.

ALL

Specifies that all the report pages are printed.

SUMMARY

Specifies the printing of summary report lines only.

DETAIL

Specifies the printing of detail report lines only. If summary lines are present in the report file, they are not output.

ENTIRE

Specifies the printing of both detail and summary report lines.

CURRENT REPORT

Requests output of the last report displayed; a help report or a data report.

HELP REPORT

Requests output of the help report file built by the last HELP command.

Note: For more information, see HELP, earlier in this chapter.

RIGHT/LEFT

Specifies horizontal movement within the report file.

PAGE/LINE

Requests the data in the report file be output relative to a designated line or page of the report file:

FIRST

Outputs a page of report file data, beginning at page 1, line 1.

LAST

Outputs the last page of report file data.

NEXT

Outputs a page of report file data, beginning at the page or line number immediately following the current page or line number.

PRIOR

Outputs a page of report file data, beginning at the page or line number immediately preceding the current page or line number.

*

Asterisk (*)—outputs the current page of report file data, beginning at the first line of that page.

* + -

Outputs a page of report file data beginning n pages or lines:

page/line-count

Specifies the starting point of the output relative to the current page and line number. Page/line-count outputs a page of report file data, beginning at the specified page or line number.

SPREAD EVEN/MAXIMUM/LEFT nn

Specifies the space between the columns.

COLUMNS

Specifies the columns included in the output and, optionally, the order of appearance and width of those columns. Column specifications remain in effect until altered by a subsequent PRINT command. Column specification is:

FIXED COLUMNS

Specifies the columns, and their order, to remain on the screen when paging left and right. The columns specified with this parameter precede the columns specified in the COLUMNS= parameter. They remain fixed on the left side of the report.

Column specifications remain in effect until altered by a subsequent PRINT command or a FIXED COLUMNS = NONE command.

Considerations:

Report files sometimes contain information that cannot be displayed. CA OLQ indicates data that cannot be displayed, as follows:

Null character considerations

The null character is by default a period (.). You can override this by invoking the SET NULL command.

Note: For more information about the SET command see, SET, later in this chapter.

Data retrieved in SQL tables can contain null values. To display them, CA OLQ pads the entire length of the display field with the null character.

Example:

This example demonstrates the commands necessary to print 2 copies of the employee table:

print dest=la copies=2 columns=maximum

For more information:

Global Syntax

QFILE

QFILE accesses CA OLQ command sequences stored in the data dictionary. When you specify QFILE qfile-name, all CA OLQ commands contained within the named qfile are automatically executed.

Note: For more information about qfiles, see Using qfiles.

Syntax:

►►─┬─────────┬─ qfile-name ─┬─────────────┬───────────────────────────────────►
   └─ QFIle ─┘              └─ (version) ─┘

 ►─┬──────────────────────────────────────┬───────────────────────────────────►
   └─ DICtname ─┬─────┬─ dictionary-name ─┘
                └─ = ─┘

 ►─┬───────────────────────────────────────────┬──────────────────────────────►
   └─ DICTNOde ─┬─────┬─ dictionary-node-name ─┘
                └─ = ─┘

 ►─┬───────────────────────┬──────────────────────────────────────────────────►◄
   │ ┌───────────────────┐ │
   └─▼- parameter-value ─┴─┘

Parameters:

qfile-name

The name of the qfile to be executed. The named qfile must be saved in the data dictionary. CA OLQ interprets any nonreserved first word in a command as a qfile name.

(version)

Identifies the version number of the named qfile. The default is the highest version defined for the named qfile. If used, version must be enclosed in parentheses.

DICTNAME= dictionary-name

Identifies the dictionary where the named qfile is stored.

DICTNODE= dictionary-node- name

Identifies the dictionary node controlling the named dictionary.

parameter-value

Specifies one or more values to be substituted into variable parameters in the qfile at execution time.

Example:

Show Qfile

SHOW QFILE displays the REPORT qfile definition, which was previously saved:

show qfile report REPORT PAGE 1.1 LINE 1 DICTIONARY NAME TSTDICT DICTIONARY NODE *DEFAULT* SET DICTNAME TSTDICT SIGNON SS EMPSS01 SCHEMA EMPSCHM ( 100) OPTIONS ALL HEADER ECHO NOFILLER FULL WHOLE INTERRUPT NOOLQHEADER - NOPATHSTAT NOSTAT COMMENT VERBOSE NODBKEY NOPICTURE NOCODETAB NOSYN SET ACCESS OLQ SELECT EMP-LAST-NAME-0415 DEPT-NAME-0410 SALARY-AMOUNT-0420 - FROM EMPLOYEE, DEPARTMENT, EMPOSITION WHERE DEPT-EMPLOYEE AND - EMP-EMPOSITION PAGE HEADER BLANK LINES AFTER 1 - LINE 1 'DEPARTMENT/EMPLOYEE/EMPOSITION REPORT' CENTER - Line 2 '$DATE' CENTER PAGE FOOTER BLANK LINES BEFORE 1 - LINE 1 '-$PAGE -' CENTER EDIT EMP-LAST-NAME-0415 - ALIGN LEFT - OLQHEADER 'THIS IS NAME HEADER' DISLAY SPREAD EVEN COLUMNS = EMP-LAST-NAME-0415 DEPT-NAME-0410 - SALARY-AMOUNT-0420 END OF REPORT

Qfile Report

The above qfile is invoked by specifying the REPORT qfile name. The QFILE REPORT command builds a list of employee names, their departments and their salaries:

report DEPARTMENT/EMPLOYEE/EMPOSITION REPORT mm/dd/yy DEPT-ID-0410 EMP-LAST-NAME-0415 SALARY-AMOUNT-0420 6666 HENDON 240000.00 6666 PAPAZEUS 100000.00 6666 MUNYOUN 90000.00 6666 RUMPLEST 80000.00 6666 RUPEE 76000.00 6666 WILDER 90000.00 2000 BLOOMER 15000.00 2000 HUTTON 44000.00 2000 JENSON 82000.00 2000 KIMBALL 45000.00 2000 KING 14500.00 2000 NICEMAN 14000.00