SQR Samples Library

SQR Samples is a library of SQR programs that you can use to adapt and experiment with programs. These programs are stored in the <PS_HOME>\bin\sqr\<database_platform>\SAMPLE (SAMPLEW for Microsoft Windows) directory. You can modify these programs to create configured SQRs.

Each program comprises a report specification and a sample of the output. This table describes all of the sample SQR programs:

Name

Description

_______.DAT

Data files that are used by the loadall.sqr programs.

_______.MEM

SQR startup files for running small, medium, and large SQR programs.

APPEND.SQR

Demonstrates the APPEND and FIXED-NOLF (no line feed) commands.

APTDIARY.SQR

Demonstrates columns and text wrapping.

AREA100.SQR

Demonstrates a 100 percent area chart.

BAR100.SQR

Demonstrates a 100 percent bar chart.

BARCODE.SQR

Demonstrates printing a bar code.

CALENDAR.SQR

Demonstrates nondatabase formatting.

COMP_FOR.SQR

Prints a graph of the forecasted and actual sales for a given employee.

COMP_F_G.SQR

Prints a graph of the forecasted and actual sales for a month or quarter.

COMP_PLN.SQR

Prints a graph of the planned and actual sales for a given employee.

COMP_P_G.SQR

Prints a graph of the planned and actual sales for month or quarter.

COVLET02.SQR

Uses SQR to input data from a user, enter the data in the database, and write a form letter by using a DOCUMENT paragraph.

CUST.SQR

Prints a list of all of the customers, bursted by page.

CUSTLBLS.SQR

Demonstrates printing mailing labels within columns.

CUSTOMER.SQR

Demonstrates multiple detail lines and the NEXT-LISTING command.

CUSTOMR2.SQR

Demonstrates the use of the ON-BREAK argument to the PRINT command.

CUSTOMR3.SQR

Demonstrates the use of the INPUT command to change the report output.

CUSTOMR4.SQR

Demonstrates the use of arrays.

CUSTOMR5.SQR

Demonstrates dynamic queries to enable the user to qualify a report as it runs.

CUST_SUM.SQR

Prints a group of information about each customer in the customer table.

CUSTTAPE.SQR

Demonstrates the flat file output for magnetic tape or other postprocessing.

DATAA.DAT

Needed for append.sqr.

DATAB.DAT

Needed for append.sqr.

DROPALL.SQR

Drops all of the SQR sample tables that are created by the LOADALL program.

DYNAMCOL.SQR

Demonstrates the use of dynamic columns, dynamic tables, and variables that are passed to the ON-ERROR procedure.

EMP.SQR

Prints a list of all of the employees, bursted by page.

EMP_COMM.SQR

Calculates each employee's commission, based on sales.

EMP_M_Q.SQR

Lists all employee quotas for a given month or quarter.

ENVELOPE.SQR

Demonstrates the use of printing envelope with proper bar codes.

EXPORT.SQR

Creates two SQR reports: one to export a database table and one to import that table. Data from the table is stored in an external operating system file in compressed format, with trailing blanks removed.

FLATFILE.SQR

Creates an SQR report to extract a database table and place it in a flat file.

FLOATBAR.SQR

Demonstrates a floating bar chart.

FOR_CUST.SQR

Creates a sales forecast for a given customer, grouped by month or quarter.

FOR_EMP.SQR

Creates a sales forecast for a given employee, grouped by month or quarter.

FOR_PROD.SQR

Creates a sales forecast for a given product, grouped by month or quarter.

FOR_REG.SQR

Creates a sales forecast for a given region, grouped by month or quarter.

FOR_SUM.SQR

Creates a table of projected product sales with links to more information.

FORMLETR.SQR

Demonstrates form letters by using a document paragraph.

HILO.SQR

Demonstrates a high-low-close chart.

HISTGRAM.SQR

Demonstrates a histogram chart.

INQUIRY.SQR

Creates an SQR program to display rows at your terminal that are selected from a database table that you specify. The resulting SQR program prompts you to qualify the rows to be selected, display those rows, then repeat.

INVOICE.SQR

Demonstrates creating multiple reports, printing invoices, and printing envelopes.

LOADALL.SQR

Creates and loads the sample tables that are used in the preceding SQR programs.

MAKEDATA.SQR

Creates a data file with a fixed length and NOLF attributes.

MAKEREPT.SQR

Helps you create SQR reports more quickly.

MULTIPLE.SQR

Demonstrates creating multiple reports.

NESTREPT.SQR

Demonstrates nesting procedures.

ORDERS.SQR

Lists all of the orders and the order lines that are associated with them.

ORD_MONG.SQR

Lists all orders for a given month and groups them by employee number.

ORD_M_Q.SQR

Lists all orders for a given month or quarter.

ORD_PROD.SQR

Lists all orders for a given product.

ORD_REGG.SQR

Creates a report of all orders from a given region, grouped by month or quarter.

ORD_SUM.SQR

Displays an summary of orders, grouped by month.

ORD_S_Q.SQR

Prints a graph of the percent of orders for each region (in a year) and four graphs of the percent of orders for each region (one for each quarter of that year).

OVERBAR.SQR

Demonstrates an overlapped bar chart.

PHONELST.SQR

Demonstrates printing within columns, page headings, and page footings.

PLN_EMP.SQR

Creates a sales plan for a given employee, grouped by month or quarter.

PLN_GEN.SQR

Creates a sales plan, grouped by month or quarter.

PLN_REG.SQR

Creates a sales plan for given region, grouped by month or quarter.

PRODUCT.SQR

Lists products and their prices and graphs orders of products.

SALELEAD.SQR

Demonstrates DOCUMENT paragraphs.

SALES.SQR

Demonstrates charting from stored data and printing several charts on one page.

SCATTER.SQR

Demonstrates a scatter chart.

STCKAREA.SQR

Demonstrates a stacked area chart.

SQR3DBAR.SQR

Demonstrates a three-dimensional bar chart.

SQRLASER.SQR

Demonstrates graphic and file input/output commands.

SQRLINE.SQR

Demonstrates a line chart.

SQRLOGO.SQR

Demonstrates printing images.

SQRPIE.SQR

Demonstrates a pie chart.

TABREP.SQR

Creates a tabular SQR report for a table that you select.

UPDATE.SQR

Generates an SQR program that enables you to query and update database tables. The created program uses the SHOW command to simulate a menu interface.