What's New in SQR Version 3

By Gadi Yedwab, VP of Engineering, MITI
revised June 28, 1994



In 1994, MITI is planning to release a new version of SQR that will add new functionality to the SQR language, address requests from the user community and make improvements to the product on the Microsoft Windows platform.

Based on customer requirements, the new version will provide new graphics capabilities, the Windows product will be improved and more power and flexibility will be added to the language.

Note: The following is a pre-release description of features. The features described below are subject to change or cancellation based on the development progress.

Business Graphics

New charting commands will be added to SQR Version 3. The new commands will allow you to present your data graphically using Pie, Bar and Line graphs. For example:

print-chart demochart ()
	type	= bar    
	3D-effects	= on
	data-array	= sales(quarter,year,amount)
	title	= 'Annual Sales'
	Border	= on
	legend	= on
	x-axis-grid	= off
	y-axis-grid	= on
Please note that the exact syntax of the command and the exact appearance of the chart may change before the release of version 3.

Company Logo

With SQR Version 3, you will be able to include your company logo on the report. You will also be able to include images such as signatures and pictures.

Bar Code

Using the new "print-bar-code" command, Version 3 will allow you to print various kinds of Bar-codes.

Microsoft Windows

In Version 3, you will see several improvements to the look and feel of the SQR Workbench on Windows. The DISPLAY and SHOW commands will write their messages into a special message window providing compatibility with the versions of SQR that run on character based terminals.

Windows Printers

On the Microsoft Windows platform, you will be able to print to any printer that your environment supports (including Cannon, Panasonic and graphic dot-matrix printers). Moreover, if you have a Fax driver installed as a Windows Printer, you will be able to fax your report electronically.

Windows Print Preview

Graphical Print Preview will allow you to view your graphical reports on the screen using the Microsoft Windows Graphic Device Independence architecture.

Windows On-Line Help

Context sensitive, hypertext on-line documentation will be provided. It will allow you to refer to the SQR User's and Reference Guides on-line.

Windows Installation

SQR for Windows will feature a graphical installation program that can make installing SQR on Windows fun as well as easy.

Multiple Reports in an SQR Program

SQR Version 3 introduces the ability to generate multiple reports in one SQR program. This will allow you to create a program that produces two or more reports that are based on common data. For example, assume you are creating two inventory reports; a summary report and the a detailed report. You may now have one SQR program that generates both. The program performs a single pass through the inventory tables, saving substantial processing time. Now there is only one program to maintain. New SQR commands allow you to declare multiple report files and to switch writing between them using the new "use-report" command.

Improved File I/O

External file processing is improved with better support of fixed length record files and blocked fixed length record file. This feature will allow SQR to read directly from tape files that contain fixed length records that do not terminate with a carriage return or a line feed and that may be grouped in multiple records per tape block. In addition, SQR will allow you to open an existing external file for writing at the end (append mode).

Improved SQR Arrays

Arrays may be manipulated directly in the LET command and in expressions in IF and WHILE commands. This is a very convenient way to use this extremely powerful array. You can reference array elements directly in arithmetic and comparisons.

Page n of m

Many reports require you to print "Page n of m" in the header. This is tricky, because the value of "m", the page number of the last page of the report, is not known before the last page is reached. SQR now solves this problem for you. When you use the "last-page" command, SQR prints the value of "m", the page number of the last page.

Dynamic Select

Select statements in the "begin-select" command gain more flexibility with the introduction of dynamic column names. You may now substitute names of columns in the primary select statement in much the same way as you substitute any other part of the select statement.

Improved Lookup Tables

Load-Lookup becomes more flexible in Version 3. You do not need to specify the maximum number of rows in the lookup table. You may create a load-lookup table in the body of the report during the report run. This will allow you to load a lookup table only if it is needed for this particular run of the report.

Improved Print Command

The print command becomes more flexible, allowing multiple attributes such as bold, underline, edit and shade at the same time. The print command will now also handle centering and right justifying of proportionally spaced font text.

Improved Event Processing

Event procedures such as on-error, on-break (before and after) and after-page can now take arguments. You can pass values as arguments to those procedures when you call them, allowing better reuse of your code. For example, one "on-error" procedure can handle different error situations based on the actual arguments.

Portable Run Time (SQT) File

Already, SQR can compile your report program into a Run Time File (.SQT). Using this feature, you have optimized the deployment of your reports. SQR Version 3 makes life even easier. Starting with Version 3, the Run Time File (.SQT) becomes "portable". In most cases, you will be able to upgrade to future releases of SQR (subsequent to Version 3) without the need to recompile your report. Moreover, in Version 3, you can compile a report on one platform and run the resulting .SQT file on another; the Run Time File becomes machine independent (although not RDBMS independent).

Portable Report Output File

At the moment, SQR produces an output file that is printer specific. For example, if you have specified printer type=postscript in your report, the output file will consist of Postscript language instructions and will be suitable for printing on a Postscript printer only.

In the future, we envision SQR as producing a "portable document". Under this vision, the output of SQR, the report, is a device-independent document that may be printed on various printer devices or previewed on the screen. Moreover, you would be able to interact with the document on the display, change some of its attributes, copy portions into the clipboard, embed it in another document, mail it, or send it by fax electronically.

In Version 3, SQR makes the first step in this direction by introducing the "SQR Portable Format" or SPF. When you instruct SQR to produce the output report in SPF format, SQR will create a "portable document" output. This output is printer independent. You will be able to defer the decision of the printer type that you want to use. For example, you could choose a Postscript or HPLaserJet printer after the report is done. Moreover, you could choose a Line Printer output and SQR will strip off the graphics and produce an ASCII file. This file may be suitable for Email.

Print Preview on X Windows

SQR Version 3 will bundle a Postscript viewer for X Windows. Using this viewer, you will be able to view SQR Postscript output before it is printed. This feature could save considerable time and material when developing a new report. You can view results on the screen rather than waiting for a printout.

Specify database on the command line (Sybase)

A new command line option would allow a convenient way to specify a target database. You will be able to specify the database on the command line, at run time, instead of hard-coding the database name in a Sybase "USE" command in your report.

Improved Cursor Support using CT-Lib (Sybase System 10)

SQR Version 3 will use the new Client Library (CT-Lib) to interface to Sybase system 10. This would reduce lock contention and improve the performance of SQR for Sybase.

Conclusion

While SQR Version 3 adds many new features, it preserves all of its important strengths: SQR is an Interpreted Language allowing a quick cycle of development -- test -- development. SQR is Database Independent and Highly Portable. SQR is a simple, yet powerful language that is well integrated with SQL. SQR is highly flexible and does not impose rules on how a report should be structured. SQR is a High Performance tool that can run on both the client and server platforms. SQR is extensible, you can call user written 3GL procedures and functions. Most of all, SQR Version 3 offers full upward compatibility for your existing reports.

Development Timetable

Beta Release of SQR Version 3 is scheduled for October on the ORACLE and Sybase RDBMS on VAX/VMS, Sun, HP, AIX and Windows. General availability is planned for yearend for the beta platforms. More platforms are expected to be supported by Version 3 in 1995.


Volume II Issue 2 Table of Contents


File maintained by Matt Reagan; last modified 5-FEB-1996.