You are on page 1of 40

Hyperion SQR vs.

Focus and WebFocus


Bob Hughes
Information and Computing Services
California State University, East Bay
Hayward, California rhughes@csueastbay.edu

NORCAL IBUG/FUSE
Northern California IBI/Focus
Technology Forum and Users Group
May 2006
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR vs.Focus

Oracle/PeopleSoft has delivered, since


inception large numbers of reports and
processes in an SQR library in addition
to COBOL, PeopleCode, etc..
SQR stands for Structured Query
Report Writer currently owned by
Hyperion Group.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR vs.Focus

SQR takes standard SQL and adds


procedural programming logic.
In general, SQR is not used for ad-hoc
reporting. It provides a 3GL level
formatting capabilities combined using
SQL as a base.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR History

SQ Software created SQR in the mid 1980s.


They had a marketing agreement with D & N
systems (which changed its name to SQL
Solutions, and was later acquired by Sybase).
Sybase purchased SQ Software in the early
1990s. To avoid competing directly with
Oracle, Sybase had a marketing and
development agreement with MITI for the
Oracle versions of the product.
MITI acquired the full rights to SQR in the mid
1990s. MITI later changed its name to
SQRiBE Technologies.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR History

Brio Technologies acquired SQRiBE in


August, 1999. Brio Technologies later
changed its name to Brio Software.
Brio licensed the source code to Peoplesoft
sometime around 2000.
Hyperion Software acquired Brio Software in
October, 2003.
SQR is mainly found in use in
Oracle/PeopleSoft Applications.
l

History Source Ray Ontko


Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR History

Hyperion is reselling Brios products on an


OEM basis until the deal closes on October
16, 2003. The Brio brand is expected to be
dropped immediately after the deal closes,
though the Intelligence product name is likely
to continue. It is not yet clear what the future
of SQR will be OLAP Report March 3,
2004
SQR continues to be used in
Oracle/PeopleSoft Environments
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR To Be Around Longer,,,


Oracle Announcement 4/25/06
Charles Phillips, Oracle President and member of the
Oracle Board of Directors, announced a new program
called Applications Unlimited. Applications
Unlimited now gives Oracle customers using Oracle,
PeopleSoft, Siebel and JD Edwards applications the
option of remaining on these products, with continued
support, development and new releases in perpetuity.
Specifically Phillips focused on 4 major points for
customers:
Releases on current products will continue, even
after Fusion
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR To Be Around Longer


Oracle Announcement 4/25/06

Customer driven Product Roadmaps will be


delivered
Development Teams will be dedicated to
specific product lines
There will be no forced upgrades
l

It had been previously announced that Oracle


PS NVison and use of SQR)now owned by
Hyperion, would fade with move to Oracle
Fusion suite(replacement for PS, etc..
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

Sample Code

SQR Sample Code

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Sample Code

The PROGRAM section consists of a single


DO command, which invokes the procedure
list_customers.
In SQR, a procedure is a group of commands
that are performed one after the other, like a
procedure (or subroutine) in other
programming languages. A DO command
invokes a procedure.
More lines of Code are required in SQR than
Focus, even in simple procedures
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR Sample Code


SQR distinguishes column names from SQR
commands in a SELECT paragraph by their
indentation. Column names must be placed at the
beginning of a line.
SQR commands must be indented at least one
spacein the following example, the POSITION
command is indented to prevent it from being taken
as a column name. The word FROM must be the first
word in a line. The rest of the SQR SELECT
statement is then written freely, after SQL syntax.
The SELECT paragraph is a loop. The SQR
commands, including printing of columns, are
executed in a loop, once for each record that
SELECT returns. The loop ends after the last record
is returned.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR Sample Code

In Focus positional coding(column


specific placement of commands is not
required.
Focus performs formatting after a
complete pass of the database to collect
data which is more efficient the SQR. In
SQR each select statement is
processed as a loop for each record.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR-Sample Code-Results

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

Focus Sample Code

TABLE FILE CUSTOMER


PRINT NAME AS Name
CITY AS City
STATE AS State
PHONE AS Phone
END

SQR Program had 25 lines compared to


Only 6 lines using Focus or WebFocus
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR Code - Variables


But what if you want to use the value of phone for another purpose, for example, in a
condition? The following example shows you how to do this.

The phone column is an SQR column variable. Column variables are preceded with an
ampersand (&). Unlike other program variables, column variables are read-only. You can
use their existing value, but you cannot assign a new value to a column variable.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR Code - Variables


In the sample program, &phone is a column variable that you can use in
SQR commands as if it were a string, date, or numeric variable,
depending on its contents. In the condition, &phone is compared to ,
an empty string. If &phone is an empty string, the program prints No
phone instead. Note that the column variable &phone inherited its
name from the phone column. This is the default, but you can change
it

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

Focus Sample Code


DEFINE FILE CUSTOMER
PHONETXT/A21=IF PHONE EQ THEN No Phone ELSE PHONE ;
END
TABLE FILE CUSTOMER
PRINT NAME AS Name
CITY AS City
STATE AS State
PHONETXT AS Phone

With Focus or Web Focus


Handling of Variables Is
more intuitive with less
coding..

END

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Code Positioning Data


In a SELECT statement (repeated here), positioning occurs after each column
name. This positioning implies a PRINT command for that column. As before,
omitting the line number in the position lets it default to the current line.

After the last column, there is a POSITION command: POSITION(+1).


The plus sign (or minus sign) indicates relative positioning in SQR. A
plus sign moves the print position forward from the current position, and
a minus sign moves it back. The +1 in our program means one line
down from the current line. This command advances the current print
position to the next line.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR Program Coding

In more complex programs, the SQR


coding effort can become much more
intensive than when using a 4GL such as
Focus or WebFocus dramatically
increasing Programming Costs.
The logarithmic increase in costs will be
shown next in the CrossTabs Report
example.

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Code CrossTabs / Array Processing

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Code CrossTabs / Array Processing(contd)

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Code CrossTabs / Array Processing(contd)

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Code CrossTabs / Array Processing(contd)

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

Focus Sample Code


JOIN ORDER_NUM IN ORDERS TO ORDER_NUM INORDLINES AS J1
JOIN PRODUCT_CODE IN ORDERS TO PRODUCT_CODE IN PRODUCTS AS J2
DEFINE FILE ORDERS
ORDER_MONTH/M=ORDER_DATE;
END
TABLE FILE ORDERS
WRITE ORDER_QUANTITY
BY DESCRIPTION
ACROSS ORDER_MONTH

SQR 80 Line Program


Is replaced by 11 Line
Program Using Focus or
WebFocus

ON TABLE ROW-TOTAL COLUMN-TOTAL


END
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

SQR Code Basic Summary


The DO command invokes a procedure.
A procedure begins with BEGIN-PROCEDURE and ends
with END-PROCEDURE.
A SELECT paragraph begins with BEGIN-SELECT and
ends with END-SELECT.
SQR commands in a SELECT paragraph must be indented
at least one space to prevent them from being taken for
column names.
In a SELECT statement, you can print a column by entering
it at the beginning of a line with a position qualifier. This is
called an implied PRINT command.
The POSITION command gives a position.
Bob Hughes, CSUEB, SQR vs. Focus, 5/2006
NCAL IBUG/FUSE

File Description Access

SQR vs. WebFocus File Description Access

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR vs. MS Access File Description Access

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR vs. Focus File Description Access


Oracle/PeopleSoft Tools Query Facility

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR vs. Focus File Description Access


Oracle/PeopleSoft Tools Query Facility

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR and Program Editors

SQR and Programming Editors

Everything used from NotePad to SQR


specific editors such as SQR Express
jEdit (jedit.sourceforge.net has an sqrparser
plugin see
http://home.mchsi.com/~ssatguru/SQR/SqrParser/SqrParser.html

Gold, EditPlus2 and others have language


support files for SQR.

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR 3rd Party Tools

SQR 3rd Party Tools/IDEs


SQR Runner 4 Pro

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR 3rd Party Tools/IDEs


SQR Express

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Documentation
Resources

SQR Documentation

Official Doc is at Hyperion Developer Site


http://dev.hyperion.com/resource_library/technical_documentation/sqr/sqr_8.cfm

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

SQR Resources

http://www.sqr-info.com/
http://www.sqrug.org/sqr-users/
http://www.sqrug.org/ftp/
http://dev.hyperion.com/resource_library/techni
cal_documentation/
http://www.sqrevangelism.com/Book/index.htm

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

Focus and WebFocus Resources

http://www.ibi.com/
http://www.csueastbay.edu/FOCUS
http://www.temple.edu/mis/
http://www.informationbuilders.com/products/focus/uni
x_overview.html
http://forums.informationbuilders.com

http://reporting.uky.edu/ibi_html/

Bob Hughes, CSUEB, SQR vs. Focus, 5/2006


NCAL IBUG/FUSE

You might also like