Monday, July 25, 2011

SQR Concepts Part-1

Structured Query Reporting (SQR) supports all Databases (all SQL Statements - DML, DDL, DCL & TCL) and Operating Systems.
-> Used for Reporting.
-> Used for Background SQL Processing to update Database.
-> Used to migrate data from legacy system to PS system.
-> Used to perform File Integration.
-> Used where programming logic is more.

SQR Commands
1) Section Commands
    a) Begin-Setup
    b) Begin-Heading
    c) Begin-Footing

    d) Begin-Program
    e) Begin-Procedure
2) Paragraph Commands
    a) Begin-Select
    b) Begin-SQL
    c) Begin-Document
3) Other Commands like Print, Show, Let etc.

SQR Execution
2-tier: Run SQRW.exe (-ZIV Command line Flag)   
n-tier: Run using Process Scheduler/Batch Server

SQR File Types
.SQR - Source Code file
.LIS - List file / Output file
.SPF - Portable Format file
.SQC - Function Library file
.INI - Initialisation file (Config file for SQR)
.SQT - Runtime file
.MAX - Maximisation file
.ERR - Error file
.LOG - Log file
.HTML, .PDF & .CSV - Output file types

Variables: Temporary memory location in SQR buffer to store values.
Types of Variables
a) Column variables
b) SQR variables (Text, Numeric & Date Variables)
c) Reserved variables
d) Document markers
e) Substitution variables
Scope Variables
a) Global
b) Local

Types of Reports
a) Tabular report
b) Master Detail report
c) Form report
d) Mailing labels
e) Letters & Documents
f) Cross Tabular report
g) Graphical report