Preface Chapter 1 Chapter 2 Chapter 43
C O N T E N T S
Introduction........................................................................................................... i
SQR Basics........................................................................................................ 1-1
Application Structure Overview........................................................................1-2
SQL in PeopleSoft............................................................................................. 1-3
Running an SQR Program...............................................................................1-11
SQR Output..................................................................................................... 1-16
SQR Program File............................................................................................. 2-1
Rules for Entering Commands...........................................................................2-2
Page as a Grid.................................................................................................... 2-3
Program Structure............................................................................................. 2-4
Procedures......................................................................................................... 2-8
Processing Sequence........................................................................................ 2-13
SQR References.............................................................................................. 2-15
Printing in SQR................................................................................................. 3-1
Printing in SQR................................................................................................. 3-2
Format Options.................................................................................................. 3-4
SQR Variables and Commands..........................................................................4-1
Variables........................................................................................................... 4-2
Declare-Variable Command..............................................................................4-5
Assignment Statements...................................................................................... 4-6
Display and Show commands............................................................................4-7
Control Statements............................................................................................ 4-8
P E O P LE S O F T P R O P R IE T A R Y AND C O N F ID E N T IA L T A B LE OF CONTENTS III
SQR II Chapter 5 Chapter 6 Chapter 7 Chapter 98 J U L Y 2002
Common SQR formatting commands and functions..........................................5-1
String Manipulation and Formatting..................................................................5-2
Date Manipulation and Conversion....................................................................5-7
Numeric Expression, Commands, and Functions...............................................5-9
PeopleSoft SQC Files........................................................................................ 6-1
SQC Files.......................................................................................................... 6-2
SQR Environment SQC..................................................................................... 6-4
Setup SQCs....................................................................................................... 6-5
Heading SQCs................................................................................................... 6-7
Footing SQCs.................................................................................................. 6-10
Formatting and Conversion SQCs...................................................................6-11
Lookup SQCs.................................................................................................. 6-13
Implementing SQCs and Local Procedures........................................................7-1
Implementing SQCs That Contain Procedures...................................................7-2
Local versus Global Procedures......................................................................... 7-5
Arguments......................................................................................................... 7-6
Advanced Printing with SQR............................................................................8-1
Page Commands................................................................................................ 8-2
Column Commands........................................................................................... 8-4
GRAPHIC......................................................................................................... 8-9
Declare-Image................................................................................................. 8-11
Print-Image...................................................................................................... 8-12
On-Break Processing....................................................................................... 8-13
On-Break Syntax............................................................................................. 8-19
Lookup Tables................................................................................................... 9-1
Data Structures.................................................................................................. 9-2
LOAD-LOOKUP.............................................................................................. 9-3
IV TABLE OF CONTENTS P E O P LE S O F T P R O P R IE T A R Y AND C O N F ID E N T IA L
J U LY 2002 Chapter 10 Chapter 11 Chapter 12 Chapter 15
13
14 SQR II
Arrays and Graphics........................................................................................ 10-1
Arrays.............................................................................................................. 10-2
SQR Charts.................................................................................................... 10-11
Declare-Chart................................................................................................ 10-12
Print-Chart..................................................................................................... 10-15
The Process Scheduler..................................................................................... 11-1
Process Types.................................................................................................. 11-2
Adding an SQR Process to the Application......................................................12-1
Ten Steps to Add an SQR Process...................................................................12-2
Run Control Record......................................................................................... 12-3
Run Control Page............................................................................................ 12-4
Adding Run Control Pages to Components......................................................12-6
Registering a Component................................................................................. 12-7
Process Definition......................................................................................... 12-15
User Input and the Process Scheduler..............................................................13-1
Input Command............................................................................................... 13-2
Process Scheduler and User Input....................................................................13-4
Run Control IDs............................................................................................ 13-19
File Manipulation and Referential Integrity.....................................................14-1
File Input and Output....................................................................................... 14-2
Interfacing Data from PeopleSoft....................................................................14-7
Advanced Data Manipulation..........................................................................15-1
SQL Paragraph................................................................................................ 15-2
Commit and Rollback...................................................................................... 15-3
Stored Procedures............................................................................................ 15-4
Error Handling................................................................................................ 15-6
SQL Error Routine.......................................................................................... 15-7
Additional Uses for ON-ERROR...................................................................15-12
P E O P LE S O F T P R O P R IE T A R Y AND C O N F ID E N T IA L T A B LE OF CONTENTS V
SQR II Chapter 16 Chapter 17 Chapter 18 Chapter 19H
Appendix A
B
C
D
E
F
G J U L Y 2002
Reporting Tables and Temporary Tables.........................................................16-1
Reporting Tables............................................................................................. 16-2
Temporary Tables............................................................................................ 16-4
Multiple Report Processing.............................................................................. 17-1
A Basic Illustrative Example...........................................................................17-2
Conceptual Diagram of Multiple Reports........................................................17-3
Declare-Layout................................................................................................ 17-4
Declare-Report................................................................................................ 17-6
For-Reports..................................................................................................... 17-9
Debugging and Tuning.................................................................................... 18-1
Debugging Techniques.................................................................................... 18-2
Additional Compiler Directives.......................................................................18-3
Typical SQR Errors......................................................................................... 18-6
PSSQR.INI...................................................................................................... 18-7
Database Design.............................................................................................. 18-8
Dynamic SQL.................................................................................................. 19-1
Static SQL....................................................................................................... 19-2
Dynamic SQL.................................................................................................. 19-4
Review Questions and Answers........................................................................A-1
Answers to Chapter Activities...........................................................................B-1
PeopleTools 8.4 SQR Services (SQCs).............................................................C-1
HTML and Miscellaneous................................................................................D-1
Alternative Report Formats...............................................................................E-1
PeopleSoft Program Lists.................................................................................. F-1
Structured Query Language..............................................................................G-1
PeopleSoft SQR Style Tips............................................................................... H-1
VI TABLE OF CONTENTS P E O P LE S O F T P R O P R IE T A R Y AND C O N F ID E N T IA L