Previous Topic: PRINTNext Topic: SAVE REPORT


SAVE QFILE

SAVE QFILE stores the retrieval and report formatting commands necessary to recreate the current report. The qfile is saved into the data dictionary.

Batch considerations:

SAVE QFILE is invalid when running local mode.

Syntax:

►►─── SAVe qfile ─┬─────┬─ qfile-name ─┬─────────────┬────────────────────────►
                  └─ = ─┘              └─ (version) ─┘

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

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

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

 ►─┬───────────────────────────────────┬──────────────────────────────────────►
   └─ COMments ─┬─────┬─ comment-text ─┘
                └─ = ─┘

 ►─┬───────────┬──────────────────────────────────────────────────────────────►◄
   └─ REPlace ─┘

Parameters:

qfile-name

The name of the qfile to be stored in the data dictionary.

(version)

The version number of the named qfile enclosed in parentheses. Version defaults to 1.

DICTNAME= dictionary-name

Specifies the dictionary where the named qfile is stored.

DICTNODE= dictionary-node

Specifies the dictionary node that controls the dictionary.

USER= user-name

Specifies the owner of the qfile.

COMMENTS= comments-text

Specifies comments to be included with the qfile.

REPLACE

Indicates the qfile already exists in the data dictionary and is to be replaced with the current path definition.

Example:

Save Qfile

The following qfile retrieves, formats, and then displays data:

options = sparse
select dept-id-0410,emp-id-0415,emp-name-0415,salary-amount-0420 -
 from department, employee, emposition
 where dept-employee and emp-emposition
compute &xq.average salary' = avg(salary-amount-0420) -
 group by dept-id-0410
display

Save Qfile

The SAVE QFILE command is used to save the path listed above as the EMP-SAL qfile:

save qfile emp-sal

109017  THE REQUESTED OPERATION FOR EMP-JOB(1) HAS SUCCESSFULLY COMPLETED

When the EMP-SAL qfile is executed, CA OLQ retrieves the ids, names, and salaries for all company employees.