Sei sulla pagina 1di 24

1. What is the Difference between Let and Move?

A. Let allows you to do manipulation, Filtering on the Field data.


Move, simply moves the data to other field.
2. What is the Sqc for Current date?
A. CurDtTim.sqc Get current system date and time, Returns the current
"native/report" format date-time in $_SysDateTime and &_SysDateTime.
3. What is the Sqc for Date and time formatting?
A. Datetime.sqc this file contains generalized routines to format dates and times. The
types of legal output formats are derived from the date and time formats present in MSC
Windows. MSC Window datetime formats can be set in the Windows Control Panel and
are stored in win.ini. The different date formats are mdy, dmy, ymd and hhmiss. Date
and time delimiter along with printing leading zeroes are parameters specified by the
user. To set these parameters for SQR, edit the environment file, setenv.sqc. Datetime
symbols in setenv.sqc are grouped together under a database environment.
4. What is the Sqc for Date formatting? And how it writes?
A. Datetime.sqc, It writes the Date format of the server or setenv.sqc.
5. What is the sqc for translation?
A. SQRTrans.sqc This SQC file contains the procedures that will allow SQR reports
to be generated for different languages. Of the procedures that are defined here, only
the following be called outside of this SQC: Init_Report_Translation,
Get_Field_Information, Append_Report_Translation, Add_Report_Translation
6. What is the sqc for doing date-math?
A. DATEMATH.SQC SQR date arithmetic procedures. These were written to support
PeopleSoft SQRs that require date functionality that is compatible across platforms.
Date formats, used in this routine is YYYY-MM-DD. In the procedure dtu-format-date,
the sqc has hard coded '-' as the delimiter for the dates. This is incorrect. In the HRMS
4.0 release, all sqrs that use this procedure has extra code to work around this problem.
In future release, the procedure will be corrected and all the sqrs using the procedure
will be revised to remove the extra code. Please note that if you use this procedure and
you add code to workaround the problem, when the sqc is fixed, you will also need to
revise all your code.
7. What is the sqc for formatting numbers?
A. Number.sqc this file contains generalized routines to format numbers. The types
of legal output formats are derived from the number formats present in MSC Windows.
MSC Window number formats can be set in the Windows Control Panel and are stored
in win.ini. To set these parameters for SQR, edit the environment file, setenv.sqc.
Number symbols in setenv.sqc are grouped together under a database environment.
8. What is the sqc for validating the Native date?
A. VALIDDT.SQC Validation Logic for User Entered Dates. Function, which accepts a
date in native format and validates it. The $ValidFlag is returned to the calling program
as 'Y' or 'N'. 'N' indicates the date entered is not valid.

9. What is the sqc for resetting the printer procedure?


A. RESET.SQC Reset printer, print 'End of Report'.
Note: Uncomment ENCODE statement to force a printer reset at end of report.
10. What is the sqc for updating process request API?
A. PrcsAPI.sqc Procedure to update the Process Scheduler request record and get
the run control parameters.
11. What is the sqc for updating process request variable declare?
A. PrcsDef.sqc Procedure to define the Process Scheduler variables.
12. stdapi.sqc
A. (Queue, processing, initiated, Completed).
PROJAPI.SQC - Project Definition API
13. How do you start an Sqr? Can you write an sqr without a Begin-report and beginprogram? And what is the difference between them?
A. After processing the commands in the SETUP section, SQR starts program execution
at the BEGIN-REPORT section. The PROGRAM section typically contains a list of DO
commands, though you can also use other commands. This is the only required section
in an SQR program.
BEGIN- Report
{commands}...
END- Report
Note. Begin-Report command may be discontinued in a future release. PeopleSoft
recommends that you no longer use this command. To use the newer SQR functionality,
use BEGIN-PROGRAM.
BEGIN-PROGRAM
{commands}...
END-PROGRAM
PeopleSoft recommends that you avoid incorporating these commands in your SQR
code. Even though these commands are technically supported in this release, they do
not interact well with the current SQR lexicon. Incorporating these commands into your
SQR code can cause unpredictable results. PeopleSoft recommends that you phase
these commands out of your code as soon as it is feasible to do so. SQR may not
support these commands in future releases. If you still have older SQR commands in
your program code, replace them with their updated alternatives.
Old Commands

Use Instead

BEGIN-REPORT (END-REPORT)

BEGIN-PROGRAM (END-PROGRAM)

DATE-TIME

Datenow function

DECLARE PRINTER

DECLARE-PRINTER

DECLARE PROCEDURE

DECLARE-PROCEDURE

DOLLAR-SYMBOL

ALTER-LOCALE

GRAPHIC FONT

ALTER-PRINTER

MONEY-SYMBOL

ALTER-LOCALE

NO-FORMFEED

DECLARE-LAYOUT

PAGE-SIZE

DECLARE-LAYOUT

PRINTER-DEINIT

DECLARE-PRINTER

PRINTER-INIT

DECLARE-PRINTER

PRINT...CODE

PRINT...CODE-PRINTER

Note: Two older commands, DECLARE PRINTER and DECLARE PROCEDURE, do not
contain hyphens. The new commands, DECLARE-PRINTER and DECLAREPROCEDURE, contain hyphens.
14. How do you execute a procedure?
A. By using "DO" command
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. PeopleSoft recommends that you break your program logic into procedures
and keep the PROGRAM section small. It should normally consist of a few DO
commands for the main components of your report.
Specifies an SQR procedure to execute for each row selected in the query. Processing
continues until all rows have been retrieved. You can specify arguments to be passed to
the procedure. Arguments can be any variable, column, or literal.
15. How do you print a message in the SQR?
A. Using DISPLAY 'Hello World'
Syntax: DISPLAY {any_lit|_var|_col} [[:$]edit_mask|NUMBER|MONEY|DATE][NOLINE]
Displays the specified column, variable, or literal.
The DISPLAY command can display data to a terminal. The data is displayed to the
current location on the screen. If you want to display more than one field on the same
line, use NOLINE on each display except the last.
The SHOW, command for information about screen control.
The LET, command for information about copying, editing or converting fields.
The EDIT parameter of the PRINT command for a description of the edit masks.
The ALTER-LOCALE command for a description of the arguments NUMBER-EDITMASK, MONEY-EDIT-MASK, and DATE-EDIT-MASK.
Example
! Display a date column using the locale default date edit mask
begin-select
dcol
from tables
end-select
alter-locale date-edit-mask = 'DD-Mon-YYYY'

display &dcol date


Produces the following output:
01-Jan-1999
!
! Display two values on the same line
!
display 'Hello' noline
display ' World'
Produces the following output:
Hello World
16. How will you select the Effective date of the Current Row in the SQR?
A. By using the Date comparison functions prepare an expression and compare the
both.
17. What you do if process scheduler is down?
A. When multiple PeopleSoft Process Scheduler servers are brought up for the same
database, each server is responsible for creating its own workload by querying the
Process Request table. The servers attempt to schedule requests that are specified to
run either on that specific server or on any server. If a request is set to run on any server,
it's possible for more than one server to attempt to schedule the same request. To work
around this, specify a specific server through the Process Request page. However, this
becomes disadvantageous if the specified server goes down. This request remains
queued until the PeopleSoft Process Scheduler Server is brought up again.
The Master Scheduler resolves this by becoming the central point for querying the
Process Request table. When a Master Scheduler is available, all active PeopleSoft
Process Scheduler Servers switch into a remote server mode. Master Scheduler
registers and monitors any active remote servers. As it finds new queued requests, it
evaluates where a request will be processed based on:
o The maximum concurrent tasks allowed on a server, as specified for Max API Aware
in the server definition.
o The list of, process types specified in the server definition.
o The Max Concurrent value specified for each process type in the server definition.
o The server status
o It does not schedule a request if the server is either suspended or down.
The Server Load Balancing, Option setting. If it is set to Use for Load Balancing,
process requests assigned to this server can be rerouted to another server when the
server is shut down or offline. However, if the parameter is set to Do Not Use for Load
Balancing, requests with the server ID of this server (that is, PSNT) are not routed to
another server. These requests remain queued until the server is brought up or back
online, based on the operation times set in the server definition.
Each Process Scheduler can be set up to have a Master Scheduler started. However,
only one Master Scheduler is active to control the workload at any time. The other
Master Scheduler servers remain in idled state. If the active Master Scheduler goes
down, then one of the idled Master Scheduler takes control. If no Master Scheduler is
available, then the PSPRCSRV servers currently in remove server mode switch back to
stand-alone mode and query the Process Request table to find work.

Update Server Status: Select to allow a user to suspend, restart, or shut down a server if
needed through the Process Monitor. This also allows a user to refresh the Process
Monitor - Server List page with the Refresh button.
Specify the maximum number of attempts that the PeopleSoft Process Scheduler Server
Agent will try reconnecting to the database when the connection is lost. When the
maximum number of attempts is reached and the agent hasn't successfully connected to
the database, the agent shuts down.
18. What is the difference between Show and Display?
A. Displays one or more variables or literals on the screen. In addition, cursor control is
supported for ANSI terminals. Any number of variables and screen positions can be used
in a single command. Each one is processed in sequence. Fixed or relative cursor
positioning can be used only within the boundaries of the terminal screen. Scrolling off
the screen using relative positioning, for example (+1,1), is not supported. Instead, use a
SHOW command without any cursor position when you want to scroll. Also, you cannot
mix SHOW and DISPLAY commands while referencing relative cursor positions.
The SHOW command does not advance to the next line if a cursor location (...), CLEARSCREEN, CLEAR-LINE, or BEEP is used. (A SHOW command without any of these
arguments automatically advances the line.) To add a line advance, add (+1,1) to the
end of the line or use an extra empty SHOW command.
Only ANSI terminals are supported for cursor control, screen blanking, line blanking, and
display characteristics.
The following program segments illustrate the various features of the SHOW command:
!
! Show a string using an edit mask
!
let $ssn = '123456789'
show $ssn edit xxx-xx-xxxx
Produces the following output:
123-45-6789
! Show two values on the same line with editing of the values
!
let #taxes = 123456.78
show 'You owe ' #taxes money ' in back taxes.'
Produces the following output:
You owe $123,456.78 in back taxes.
19. What are the SQC used in the SQR?
A. SQC: You need to include this in the SQR file, which you write at the end of the file.
This sqc will contain the procedure for the Current Date. So that you can, call the
procedure within this sqc in your Sqr program. You can get this SQC in the SQR
directory available in PS Root directory or search for the same in PS directory.
20. What are the minimum things, required in the SQR? Which is the section compulsory
in the SQR?

A. PROGRAM section is the minimum section required and it must be present in the
program, and you may have only one. It is typically placed at or near the top of the
program.
21. Load look up in sqr, where did you use? What is difference between load-lookup and
Array?
A. Loads an internal table with columns from the database. Enables a quick search
using the LOOKUP command. Use the LOAD-LOOKUP command in conjunction with
one or more LOOKUP commands.
LOAD-LOOKUP retrieves two columns from the database, the KEY field and the
RETURN_VALUE field. Rows are ordered by KEY and stored in an array.
LOAD-LOOKUP commands specified in the SETUP section are always loaded and
cannot reference variables for the ROWS, EXTENT, and WHERE arguments.
When you use the LOOKUP command SQR searches the array (with a "binary" search)
to find the RETURN_VALUE corresponding to the KEY referenced in the lookup.
Usually this type of lookup can be done with a database join, but joins take substantially
longer. However, if your report is small and the number of rows to be joined is small, a
lookup table cannot be warranted, and in fact can be slower, because the entire table
has to be loaded and sorted for each report run.
By default, SQR lets the database sort the data. This works fine if the database and
SQR both use the same character set and collating sequence. The SORT argument
enables you to specify the sorting method if this is not true. Additionally, if the machine
that SQR is running on is faster than the machine the database is running on, letting
SQR perform the sort could decrease the execution time of the report.
The only limit to the size of a lookup table is the amount of memory your computer has
available. You could conceivably load an array with many thousands of rows. The binary
search is performed quickly regardless of how many rows are loaded.
Except for the amount of available memory, there is no limit to the number of lookup
tables that can be defined.
An array is a collection of data storage locations, each of which holds the same type of
data. Each storage location is called an element of the array. When you create an array,
you don't have to declare the size of the array at declaration time. Arrays grow and
shrink dynamically as you add (or remove) data. The size of an array is limited by the
available memory. You can't access past the end of an array, but you can assign outside
the existing boundaries, thereby growing the array.
An array object can only be instantiated from PeopleCode. This object can be used
anywhere you have PeopleCode, that is, in message subscription PeopleCode,
Component Interface PeopleCode, record field PeopleCode, and so on.
22. What are important and compulsory SQC's (setenv.sqc)
A. It includes the RDBMS, Operating System; File prefix/suffix DEFINES files and
initializations values to setting the environments like Process Scheduler, Global
Delimiter, Printer and Language. Setenv.sqc for setting environment
23. What is the extension of list file in sqr?
A. SQR programs list file usually have a file extension of lis
24. What is the extension of sqr?
A. SQR programs usually have a file extension of .sqr.

25. Is it possible to write a SQR without any SQC? Yes


26. What are the different methods to run the sqr?
A. SQR workbench, Process Scheduler.
27. What are the different levels in the sqr? And what for they used?
A. ON-Break Level=1, level=2, level=3
28. How do you trap database level error in the sqr?
A. On-error
29. How do you view the SQR?
A: You can run the Developer's Guide programs on any hardware platform, but you may
find it somewhat easier to review SQR program results from the Windows platform, and
using the SQR Viewer or web browser to check results.
30. What are the advantages of SQR?
A. Create a variety of reports, such as tabular, cross-tabular and master/detail reports.
Produce mailing labels, form letters, and envelopes.
Enhance your reports with typeset-quality fonts and graphics.
Produce graphs and charts that help you present data and trends in visual terms.
The next two parts of the Developer's Guide describe the advanced features and
uses of SQR. You learn how to:
Create HTML output and publish your reports on the Internet or an intranet or
extranet.
Create reports that can be easily ported between different systems and databases
and that support different printer and display types.
Create reports that format dates, numbers, and money according to local
preferences.
Integrate SQR with other software packages, such as front-end user interface tools
and spreadsheets.
Extend SQR with procedures and functions written in C.
Test and debug your programs.
Tune your programs for optimum performance.
31. What are the Outputs of SQR?
A. SQR normally places the SQR program output files in the directory from which you
run the program. The output file has the same file name as the SQR file that created it,
but the file extension is different.
The output files should appear as soon as your program has finished running. If you
specified the -KEEP argument, one output file is in SQR Portable Format (recognizable
by its .SPF extension). You can easily view the sample program's .SPF file output,
ex1a.spf, on Windows platforms with the SQR Viewer GUI (sometimes referred to as an
"SPF viewer"). The SQR Viewer is invoked from the command line with "sqrwv".
On Windows and UNIX systems, the program also produces an output file with a .LIS
extension. You can view this output file type from the command line with such
commands as TYPE on Windows systems or CAT, MORE, and VI on UNIX systems.
Use the command appropriate to your system to view or print the .LIS file. No matter
what platform you are using, the output looks like this:

Output for Program ex1a.sqr An SQR Program.


You may also see a character such as ^L, or <FF> at the end of this output file. It is the
form feed character that ejects the last page.
32. How many SQR reports you have written? 3.
33. How do you delete a file using sqr? What is rename does?
A. The following table lists file-related functions. These functions return zero (0) if
successful; otherwise, they return the system error code.
Deletes Delete the file filename. The function returns either a zero (0) to indicate
success or the value returned from the operating system to indicate an error.
Syntax: stat_var = delete(filename)
filename = text literal, column, variable, or expression.
stat_var = decimal, float, or integer variable.
Example: let #fstatus = delete($filename)
Exists Determines if the file, filename, exists. The function returns either a zero (0) to
indicate success or the value returned from the operating system to indicate an error.
Syntax: stat_var = exists(filename)
filename = text literal, column, variable, or expression.
stat_var = decimal, float, or integer variable.
Example: let #fstatus = exists($filename)
Rename Renames old_filename to new_filename. The function returns either a zero
(0) to indicate success or the value returned from the operating system to indicate an
error.
Syntax: stat_var = rename(old_filename, new_filename)
old_filename = text literal, column, variable, or expression.
new_filename = text literal, column, variable, or expression.
stat_var = decimal, float, or integer variable.
Example: let #fstatus = rename($old_filename, $new_filename)
35. How do you stop sqr, while running using a command in sqr (stop)?
A. The STOP command halts SQR and executes a ROLLBACK command (not in
SYBASE, Microsoft SQL Server, or Informix). All report page buffers are flushed, if they
contain data; however, no headers or footers are printed and the AFTER-PAGE and
AFTER-REPORT procedures are not executed.
STOP is useful in testing.
Syntax STOP [QUIET]
QUIET Causes the report to complete with the "SQR: End Of Run" message, instead
of ending with an error message.
36. Have you ever used Xlat values in the SQR? And how it will be used.
A. There is no possibility in SQR to use the Xlat values.
37. What are layouts commands, and break point etc in sqr?
A. A Break is a change in the value of a column or variable. Records with the same
valuefor example, records with the same value for statelogically belong to a group.
When a break occurs, a new group begins.

There are a number of reasons to use break logic in a report. It enables you to:
Add white space to your reports.
Avoid printing redundant data.
Perform conditional processing on variables that change.
Print subtotals.
In the following program, the ON-BREAK option of the PRINT command accomplishes
two related tasksit starts a new group each time the value of state changes, and prints
state only when its value changes. Note that ON-BREAK works as well for implicit as for
explicit PRINT commands, such as in the following example, where state, city, name,
and phone are implicitly printed as part of the SELECT paragraph.
SKIPLINES You can further enhance the visual effect of break processing by inserting
one or more lines between groups. To do so, use the SKIPLINES qualifier with ONBREAK.
DECLARE-LAYOUT Defines the attributes for the layout of an output file.
The DECLARE-LAYOUT command describes the characteristics of a layout to be used
for an output file. A layout can be shared by more than one report. If no DECLARELAYOUT is defined or if a DECLARE-REPORT does not reference a defined layout, a
layout named DEFAULT is created with the default attribute values shown in the
DECLARE-LAYOUT Command Arguments table.
You can define as many layouts as are necessary for the requirements of the
application. You can override the DEFAULT layout attributes by defining a layout called
DEFAULT in your program. Each layout name must be unique.
ON-ERROR Begin-Select declares a procedure to execute if an error occurs due
to incorrect SQL syntax. Error trapping should be used in conjunction with dynamic
query variables. SELECT paragraphs without dynamic variables are checked for errors
before the program is processed and therefore do not require a special error procedure.
You can optionally specify arguments to be passed to the ON-ERROR procedure.
Arguments can be any variable, column, or literal.
Error To reference or declare global variables from a local procedure, add a leading
underscore to the variable name, after the initial $, #, or &. (Example: #_amount)
Note. All the SQR reserved variables, such as #sql-status and $sql-error, are global
variables. Within a local procedure, they must be referenced using the leading
underscore: #_sql-status or $_sql-error.
38. Which is the sqc for date, heading, landscape and portrait?
A. SetLyOut.sqc set the layout for the SQR report.
Overrides the printer defaults for the specified printer type.
Each printer has a set of defaults as listed in the DECLARE-PRINTER Command
Arguments table. The DECLARE-PRINTER command overrides these defaults.
Use the DECLARE-PRINTER command in the SETUP section to define the
characteristics of the printer or printers to be used. If you need to change some of the
arguments depending on the runtime environment, you can use the ALTER-PRINTER
command in any part of the program except the PROGRAM and SETUP sections.
A program can contain no more than one DECLARE-PRINTER command for each
printer type for each report. If you do not provide a printer declaration, the default
specifications are used. The default printer attributes can be overridden by providing a
DECLARE-PRINTER specification for each printer. Their names are: DEFAULT-LP for

line printer, DEFAULT-HP for HP LaserJet, DEFAULT-HT for HTML, and DEFAULT-PS
for PostScript.
39. While writing sqr two tables need to be joined and is it possible to join two tables with
non-key tables columns?
A. There is a possible chances of Join two tables with non-key table columns, the two
tables should have the same column representations and with equalizations values.
A join is created when you select data from more than one database table in the same
SELECT paragraph.
Procedure arguments are treated as local variables. Arguments can be numeric, date, or
text variables or strings. If an argument is preceded with a colon, its value is passed
back to the calling procedure.
In the following example, spell_number takes two arguments. The first argument is the
check amount. This argument is a number, and the program passes it to the procedure.
There is no need for the procedure to pass it back.
The second argument is the result that the procedure passes back to the calling
program. We precede this variable with a colon, which means that the value of this
argument is copied back at the end of the procedure. The colon is only used when the
argument is declared in the BEGIN-PROCEDURE command.
Look at the following code. It is not a complete program, but it is the spell_number
procedure, which is stored in the file spell.inc. The check-printing program includes this
code using an #INCLUDE command.
File spell.inc
begin-procedure spell_number(#num,:$str)
40. Is there any SQR or other program, which lists the number of tables and steps
referenced in a given App. Engine program?
A. This SQL will assist you to give the number of steps involved in the App. Engine:
SELECT A.AE_APPLID, COUNT(*)
FROM PSAESTEPDEFN A
WHERE A.EFFDT =
(SELECT MAX(A_ED.EFFDT) FROM PSAESTEPDEFN A_ED
WHERE A.AE_APPLID = A_ED.AE_APPLID
AND A.AE_SECTION = A_ED.AE_SECTION
AND A.MARKET = A_ED.MARKET
AND A.DBTYPE = A_ED.DBTYPE
AND A_ED.EFFDT <= SYSDATE)
AND A.AE_APPLID =
GROUP BY A.AE_APPLID
PeopleSoft delivers an SQR Report called TBLUSAGE.
In the web-client (Financials 8.4 SP1, PeopleTools 8.43.07) you can access the Run
Control page for this process at Setup Financials/Supply Chain, Utilities, Tables
Accessed and Updated. This process will create a list of tables for an SQR, App. Engine,
COBOL or Query.
Here is a good sample of how to launch an SQR from within PeopleCode. You can use
the peoplecode function called
!---------------------------------------!- BEGIN PEOPLESOFTPROS.NET CODE SAMPLE

!---------------------------------------&&PROCESS_NAME = "SQRNAME";
&&PROCESS_TYPE = "SQR Report";
&&RUN_CNTL_ID = "YOUR_RUN_ID";
&&RUN_CONTROL = ScheduleProcess(&PROCESS_TYPE, &&PROCESS_NAME, "2",
&RUN_CNTL_ID, &PRCS_INST);
If &&RC != 0 /*"1" = client "2" = server */
Winmessage("Error: Error Scheduling SQR Process, RC="/&RUN_CONTROL);
End-If;
1. What is an SQC? OR What are sqc's?
2. What sqc's are used for error processing?

===============================SQR================================
The data source is specified using the DATA-ARRAY option. The named array has a
structure that is specified by the TYPE option. For a stacked-bar chart, the first field
in the array gives the names of the categories for the bars. The rest of the fields are
series of numbers. In this case, each series corresponds to a month.
The subtitle goes under the title and can be used as a second line of the title. A
legend labels the series. The DATA-ARRAY-COLUMN-LABELS argument passes
these labels. The argument DATA-ARRAY-ROW-COUNT is the number of rows
(bars) to chart and DATA-ARRAY-COLUMN-COUNT is the number of fields in the
array that the chart uses. The array has four fieldsthe product (or price category)
field and the series that specifies three months.
To select a font in SQR for PeopleSoft, you use the commands DECLARE-PRINTER
and ALTER-PRINTER. The DECLARE-PRINTER command sets the default font for
the entire report. The ALTER-PRINTER command changes the font anywhere in the
report and the change remains in effect until the next ALTER-PRINTER.
If you want to set a font for the entire report, use ALTER-PRINTER, which is not
printer-specific, at the beginning of the program. If you are writing a printerindependent report, be aware that the attributes you set with DECLARE-PRINTER
take effect only when you print your report with the printer you specify with the TYPE
argument. To specify a printer at print time, use the -PRINTER:xx command-line flag.
When you use a proportionally spaced font, the number of letters that you print may
no longer match the number of character cells that the text actually fills. For example,
in the following sample code, the word "Proportionally" fills only 9 cells, although it
contains 14 letters.
When you print consecutive text strings, the actual position at the end of a string may
differ from the position SQR assumes according to the grid. For this reason, we
advise you to concatenate consecutive pieces of text and print them as one.
The WRAP and CENTER options of the PRINT command also require special
consideration when used with proportional fonts. They both calculate the text length
based on the character count in the grid, which is not the same as its dimensional
width. The use of these options with proportional fonts is explained after the output
example.
The WRAP option of the PRINT command prints the text of the reminder column.
This option wraps text based on a given width, which is 60 characters in the sample
program. The WRAP option works only on the basis of the width given in the
character grid. It does not depend on the font.
DECLARE-PRINTER is printer-specific fonts. ALTER-PRINTER is printer-neutral
fonts.
The BOLD, CENTER, and WRAP options of the PRINT command format text.

The INPUT command prompts the user to enter the printer type. Because the USEPRINTER-TYPE command does not accept a variable as an argument, the
EVALUATE command is used to test for the six possible values and set the printer
type accordingly.
The EVALUATE command is similar to a switch statement in the C language. It
compares a variable to multiple constants and executes the appropriate code
The SQL language supports the use of variables. An SQL statement containing
variables is considered static. When SQR executes this statement several times, it
executes the same statement, even if the values of the variables change. Because
SQL only allows variables in places where literals are allowed (such as in a WHERE
clause or INSERT statement), the database can parse the statement before the
values for the variables are given.
Note the use of the $state variable in the SELECT paragraph. When you use a
variable in a SQL statement in SQR for PeopleSoft, the SQL statement sent to the
database contains that variable. SQR "binds" the variable before the SQL is
executed. In many cases, the database only needs to parse the SQL statement
once. The only item that changes between executions of the SELECT statement is
the value of the variable. This is the most common example of varying a SELECT
statement.
In this program, the INPUT command prompts the user to enter the value of state.
The arguments MAXLEN and TYPE check the input, ensuring that the user enters a
string of no more than two characters. If the entry is incorrect, INPUT re-prompts.
You may find the restriction against using variables where only literals are allowed
somewhat restrictive. In the following example, the ordering of the records, changes
based on the user's selection. The program runs the SELECT twice. The first time,
the first column is called name and the second column is called city, and the program
sorts the records by name with a secondary sort by city. The second time, the first
column is the city and the second is name, and the program sorts by city with a
secondary sort by name. SQR constructs the statement each time before executing
it. This technique is called dynamic SQL
When you use variables in a SQL statement in SQR to replace literals and more, you
make them dynamic variables by enclosing them in square brackets. For example,
when you use the dynamic variable [$my_order] in the ORDER BY clause of the
SELECT statement, SQR places the text from the variable $my_order in that
statement. Each time the statement is executed, if the text changes, a new statement
is compiled and executed.
SQR for PeopleSoft checks and reports database errors for SQL statements. When
an SQR program is compiled, SQR checks the syntax of the SELECT, UPDATE,
INSERT, and DELETE SQL statements in your program. Any SQL syntax error is
detected and reported at compile time, before the execution of the report begins.
When you use dynamic SQL, SQR cannot check the syntax until runtime. In that
case, the content of the dynamic variable is used to construct the SQL statement,
which can allow syntax errors to occur in runtime. Errors could occur if the dynamic
variables selected or used in a WHERE or ORDER BY clause were incorrect.
SQR traps any runtime error, reports the error, and ends the program. If you want to
change this default behavior, use the ON-ERROR option of the BEGIN-SELECT or
BEGIN-SQL paragraphs.
This procedure displays the error message but does not end the execution of the
program. Instead, execution continues at the statement immediately following the
SQL or SELECT paragraph. Note the use of the variable $sql-error, which is a

special SQR reserved variable. It contains the error message text from the database
and is automatically set by SQR after a database error occurs.
SQR has a number of reserved, or predefined, variables. For example, the variable
$sqr-program has the name of the program that is running. The variable $username
has the user name that was used to log on to the database. The variable #pagecount has the page number for the current page.
In the following program, the ASK command in the SETUP section prompts the user
at compile time. The value that the user enters is placed in a special kind of variable
called a substitution variable. This variable can be used to substitute any command,
argument, or part of a SQL statement at compile time. You can use substitution
variables entered by the ASK command in place of any command, argument, or SQL
statement at compile time. Enclosed these in curly braces.
You can use the ASK command only in the SETUP section. SQR executes ASK
commands at compile time before program execution begins. Therefore, all ASK
commands are executed before any INPUT command.
Input is more flexible than ASK. You can use INPUT inside loops. You can validate
the length and type of data input and re-prompt if it is not valid. There is an example
of re-prompting in "Using Variables in SQL".
ASK can be more powerful. Substitution variables set in an ASK command let you
modify commands that are normally quite restrictive.
SQR procedures that contain variables that are visible throughout the program are
called global procedures. These procedures can also directly reference any program
variable.
When you create library procedures that can be used in many programs, make them
local. Then, if a program has a variable with the same name as a variable used in the
procedure, there will not be a collision. SQR treats the two variables as separate.
PeopleSoft recommends that you declare a procedure as local even if it does not
take any arguments. To do this, place the keyword LOCAL after the procedure name
in the BEGIN-PROCEDURE command.
To reference a global variable from a local procedure, insert an underscore between
the prefix character (#, $, or &) and the variable name. Use the same technique to
reference reserved variables such as #current-line. These variables are always
global, that you can reference from a local procedure.
SQR supports recursive procedure calls, but it maintains only one copy of a local
variable. A procedure does not allocate new instances of the local variables on a
stack, as C or Pascal would.
Procedure arguments are treated as local variables. Arguments can be either
numeric, date, or text variables or strings. If an argument is preceded with a colon, its
value is passed back to the calling procedure.
Variables in global procedures are visible throughout the program.
Variables in local procedures are visible only within the procedure.
To reference a global variable from a local procedure, place an underscore between
the prefix character #, $, or & and the variable name.
To pass an argument back to its calling procedure, preface it with a colon.
This feature can save a significant amount of processing time. You can create
multiple reports based on common data, selecting the database records only once
and creating different reports simultaneously.
The alternativewriting separate programs for the different reportswould require
you to perform a separate database query for each report. Repeated queries are

costly because database operations are often the most resource-consuming or timeconsuming part of creating a report.
The FOR-REPORTS option of the BEGIN-HEADING and BEGIN-FOOTING
commands specifies the report name. The parentheses are required. Note that the
USE-REPORT command is not needed in the heading or the footing. The report is
implied by the FOR-REPORTS option
When you run ex18a.sqr, you get three output files that match the output files for
ex9a, ex10a, and ex3a, respectively. These output files have the names ex18a.lis
(labels), ex18a.l01 (form letter), and ex18a.l02 (customer listing). If you specify
-KEEP, the output files are named ex18a.spf, ex18a.s01, and ex18a.s02,
respectively.
USE-REPORT sets the printing context for each report.
Although SELECT may be the most common SQL statement, you can also perform
other SQL commands in SQR. Here are a few examples:
o If the program prints important documents such as checks, tickets, or invoices,
you may need to update the database to indicate that the document was printed.
You can do this in SQR with a SQL UPDATE statement.
o You can use SQR to load data into the database. SQR can read and write
external files and construct records. SQR can also insert these records into the
database using a SQL INSERT statement.
o If you need to hold intermediate results in a temporary database table, you can
create two SQL paragraphs in your SQR program (CREATE TABLE and DROP
TABLE) to create this table at the beginning of the program and drop the table at
the end.
The program reads the records from the file and inserts each record into the
database by using an insert statement inside a BEGIN-SQL paragraph. The input file
format is one record per line, with each field separated by the separator character.
When the end of the file is encountered (if #end-file), the program branches out of
the loop. Note that #end-file is an SQR reserved variable.
The final step is to commit the changes to the database and close the file. You do
this with a SQL COMMIT statement inside a BEGIN-SQL paragraph. Alternatively,
you can use the SQR COMMIT command. For Oracle databases, we recommend
you use the SQR COMMIT.
To begin accessing the data from the CSV Data Source, Declare-Connection must
be established to a registered data source. See DDO Registry Properties.
o Enter Declare-Connection followed by a connection_name_literal CSV.
o Enter DSN, this is the logical data source name as recorded in the DDO Registry.
When creating queries, it is often helpful to view the structure of the CSV file that you
are querying. You can browse a CSV file's metadata, that is, information about the
file's structure, by running the DDO Query Editor and selecting a schema in the
Schema View drop-down list box and viewing its selectable column list.
You construct queries in the same manner you access relational databases. You can
choose a sample script from the Samples directory and run or modify it, or construct
your own. The scripts in the sample directory are included when the SQR-DDO port
is installed. You can edit this file with a text editor or create files of your own. To
properly access a CSV data source, a Data Object must be defined. The data object
is declared after the Begin-Execute command and prior to the Begin-Select
command. For CSV queries, the DDO GetData paradigm is used for data access.
Date values can be obtained in one of five ways:

o By selecting a date column from the database.


o By using INPUT to get a date from the user.
o By referencing or printing the reserved variable $current-date.
o As a result of an SQR date function: dateadd, datediff, datenow, or strdodate.
o By declaring a date variable using the DECLARE-VARIABLE command.
Many applications require date calculations. You may need to add or subtract a
number of days from a given date, subtract one date from another to find a time
difference, or compare dates to find if one date is later, earlier, or the same as
another date. SQR enables you to perform these calculations in your program.
Many databases enable you to perform date calculations in SQL, but that can be
difficult if you are trying to write portable code, because the syntax varies between
databases. Instead, perform those calculations in SQRyour programs will be
portable, because they won't rely on a particular SQL syntax.
The dateadd function adds or subtracts a number of specified time units from a given
date. The datediff function returns the difference between two specified dates in the
time units you specifyyears, quarters, months, weeks, days, hours, minutes, or
seconds. Fractions are allowedyou can add 2.5 days to a given date. Conversion
between time units is also allowedyou can add, subtract, or compare dates using
days and state the difference using weeks.
The datenow function returns the current local date and time. In addition, SQR
provides a reserved date variable, $current-date, which is automatically initialized
with the local date and time at the beginning of the program.
You can compare dates by using the usual operators (<, =, or >) in an expression.
The datetostr function converts a date to a string. The strtodate function converts a
string to a date.
SQR enables you to specify date constants and date values in a special format that
is recognized without the use of an edit mask. This is called the literal date format.
For example, you can use a value in this format in the strtodate function without the
use of an edit mask. This format has the advantage of being independent of any
specific database or language preference. The literal date format is
SYYYYMMDD[HH24[MI[SS[NNNNNN]]]]. The first S in this format represents an
optional minus sign. If preceded with a minus sign, the string represents a date B.C.
The digits that follow represent year, month, day, hours, minutes, seconds, and
microseconds. You can also specify a date format with the environment variable
SQR_DB_DATE_FORMAT. You can specify this as an environment variable or in the
PSSQR.INI file
String to Date Conversions If you convert a string variable or constant to a date
variable without specifying an edit mask that identifies the format of the string, SQR
applies a date format. This implicit conversion takes place with the following
commands:
o MOVE.
o The strtodate function.
o The commands DISPLAY, PRINT, or SHOW, when used to output a string
variable as a date.
SQR attempts to apply date formats in the following order:
The format specified in SQR_DB_DATE_FORMAT.
The database-dependent format.
The literal date format SYYYYMMDD[HH24[MI[SS[NNNNNN]]]].

Date to String Conversions If you convert a date variable to a string without


specifying an edit mask, SQR applies a date format. The conversion takes place with
these commands:
MOVE.
The datetostr function.
The commands DISPLAY, PRINT, or SHOW, when used to output a date variable.
SQR attempts to apply date formats in the following order:
The format specified in SQR_DB_DATE_FORMAT.
The database-dependent format.
To hold date values in your program, use date variables. Like string variables, date
variables are prefixed with a dollar sign ($). You must explicitly declare date variables
using the DECLARE-VARIABLE command.
Date variables are useful for holding results of date calculations
Obtain date values by selecting a date column from the database, printing or
referencing the reserved variable $current-date, or using an SQR date function such
as dateadd, datediff, datenow, or strtodate.
Perform date arithmetic and date comparison by using the date functions.
The SQR literal date format is SYYYYMMDD[HH24[MI[SS[NNNNNN]]]]. For this
format, a 24-hour clock is assumed.
You can also specify a date format with the environment variable
SQR_DB_DATE_FORMAT. This format can be specified as an environment variable
or specified in the PSSQR.INI file.
Declare date variables with the DECLARE-VARIABLE command.
A locale is a set of local preferences for language, currency, and the presentation of
dates and numbers. For example, one locale may use English, dollar currency, dates
in "dd/mm/yy" format, and numbers with commas separating the thousands, and a
period for the decimal place.
A locale contains default edit masks for number, money, and date. Use these edit
masks to specify the keywords NUMBER, MONEY, and DATE, respectively. You can
specify these keywords in the INPUT, MOVE, DISPLAY, SHOW, and PRINT
commands. See SQR for PeopleSoft Language Reference, "PSSQR.INI."
A locale also contains settings for currency symbol, thousands separator, decimal
separator, date separator, and time separator. A locale contains settings for N/A, AM,
PM, BC, and AD in the language of the locale. A locale contains a setting for names
of the days of the week and names of the months in the language of the locale. It
also contains settings for how to process lowercase and uppercase editing of these
names.
You can specify local preferences for language, currency, and the presentation of
dates and numbers in a locale.
You specify predefined locales in the PSSQR.INI file.
You can edit the PSSQR.INI file to alter predefined locales or to create new ones.
You can switch among locales by using the command ALTER-LOCALE. You can also
specify individual preferences for a locale by using ALTER-LOCALE.
You can also specify formats with the keywords NUMBER, MONEY, and DATE.
Applications can run SQR programs using the SQR API (application program
interface).
An SQR program can also call an external application's API.
You can extend SQR with third-party libraries and functions written in standard
languages such as C.

To extend SQR, add functions to the userfuncs global array in the UFUNC.C file.
SQR supports XML.
During the development of an SQR program, you frequently test it by running it and
examining its output. Often, you are interested only in the first few pages of the
report.
To speed up the cycle of running and viewing a few pages, use the -T command-line
flag. The -T flag enables reports to finish more quickly because all BEGIN-SELECT
ORDER BY clauses are ignored. The database does not sort the data and the first
set of records are selected sooner. Enter the desired number of test pages after the
-T flag. For example, -T6 causes the program to stop after six pages of output have
been created.
Note. If your program contains break logic, the breaks can occur in unexpected
locations because the ORDER BY clause is ignored.
When debugging a program it is often useful to:
o Display data or show when a procedure or query executes by using temporary
SHOW or DISPLAY commands in key places in the program.
o Isolate problem areas by temporarily skipping the parts of the program that work
correctly.
o Temporarily cause additional behavior in questionable areas of the program. For
example, display or modify variables that you suspect are causing a problem.
SQR provides the #DEBUG command to help you make temporary changes to your
code. You can use the #DEBUG command to conditionally process portions of your
program.
When the #DEBUG precedes a command, that command is processed only if the
-DEBUG flag is specified on the SQR command line. In this example, the value of $s
is displayed only when you run the program with -DEBUG.
You can obtain multiple debug commands by using up to 10 letters or digits to
differentiate between them. Indicate which command is to be debugged on the
-DEBUG flag,
You can conditionally compile entire sections of your program using the five compiler
directives: #IF, #ELSE, #END-IF or #ENDIF, #IFDEF, #IFNDEF
You can use the value of a substitution variable, declared by a #DEFINE command,
to activate or deactivate a set of statements. By defining DEBUG_SESSION as Y,
the dump_array procedure is included in the program. Later, you can change
DEBUG_SESSION to N and exclude the dump_array procedure from the program.
The #IF command in this example is case-insensitive.
Whenever your programs contain a BEGIN-SELECT, BEGIN-SQL, or EXECUTE
command, it performs an SQL statement. Processing SQL statements typically
consumes significant computing resources. Tuning SQL statements typically yields
higher performance gains than tuning any other part of your program.
With relational database design, information is often "normalized" by storing data
entities in separate tables. To display the normalized information, you must write a
SELECT statement that joins these tables together. With many database systems,
performance suffers when you join more than three or four tables in one SELECT.
With SQR, you can perform multiple SELECT statements and nest them as we
indicated in the "Master/Detail Reports" chapter. In this way, you can break a large
join into several simpler SELECTS. For example, you can break a SELECT
statement that joins orders and products tables into two SELECTS. The first

SELECT retrieves the orders in which we are interested. For each order retrieved, a
second SELECT retrieves the products that were ordered.
With LOAD-LOOKUP, you can reduce the number of tables that are joined in one
SELECT. Use this command in conjunction with one or more LOOKUP commands.
The LOAD-LOOKUP command defines an array containing a set of keys and values
and loads it into memory. The LOOKUP command looks up a key in the array and
returns the associated value. In some programs, this technique performs better than
a conventional table joins. You can use LOAD-LOOKUP in the SETUP section or in a
procedure. If used in the SETUP section, it is processed only once. If used in a
procedure, it is processed each time it is encountered. LOAD-LOOKUP retrieves two
fields from the database, the KEY field and the RETURN_VALUE field. Rows are
ordered by KEY and stored in an array. The KEY field must be unique and contain no
NULL values. When the LOOKUP command is used, the array is searched (using a
"binary" search) to find the RETURN_VALUE field corresponding to the KEY
referenced in the lookup.
Which is faster, a database join or LOAD-LOOKUP? It depends on your program.
LOAD-LOOKUP improves performance in the following situations:
o When it is used with multiple SELECTS.
o When it keeps the number of tables being joined from exceeding three or four.
o When the number of entries in the LOAD-LOOKUP table, is small compared to
the number of rows in the SELECT, and they are used often.
o When most entries in the LOAD-LOOKUP table, are used.
Note. You can concatenate columns if you want RETURN_VALUE to return more
than one column. The concatenation symbol is database-specific.
Programs often use temporary database tables to hold intermediate results.
Creating, updating, and deleting database temporary tables are a very resourceconsuming task, however, and can slow your program's performance. SQR provides
two alternatives to using temporary database tables.
The first alternative is to store intermediate results in an SQR array. The second is to
store intermediate
Compiling your SQR program can improve its performance. The compiled program is
stored in a runtime (.SQT) file. You can then run it with SQR Execute. Your program
runs faster because it skips the compile phase.
When a BEGIN-SELECT command is executed, records are fetched from the
database server. To improve performance, they are fetched in groups rather than one
at a time. The default is groups of 10 records. The records are buffered, and your
program processes these records one at a time. A database fetch operation is
therefore performed after every 10 records, instead of after every single record. This
is a substantial performance gain. If the database server is on another computer,
then network traffic is also significantly reduced.
The number of records to fetch together can be modified using the -B command-line
flag or for an individual BEGIN-SELECT command using its -B option. In both cases,
you specify the number of records to be fetched together. For example -B100
specifies that records be fetched in groups of 100. This means that the number of
database fetch operations is further reduced.
Use dynamic SQL instead of a condition in a SELECT statement
Adjust settings in the [Processing-Limits] section of PSSQR.INI or in a startup file.
Execute programs on the database server machine

SQR enables you to save the compiled version of a program and use it when you
rerun a report. That way, you perform the compile step only once and skip it in
subsequent runs. Note that SQR does not compile the program into machine
language. SQR creates a ready-to-execute version of your program that is already
compiled and validated. This file is portable between different hardware platforms
and between some databases.
Run the SQR executable ("sqr" or "sqrw") with the -RT command-line flag to execute
the .SQT file. Execution is faster because the program is already compiled. Here is
an example: sqrw ex1a.sqt sammy/baker@rome -RT
The SQR product distribution includes SQR Execute (the SQRT program). SQR
Execute can run .sqt files, but does not include the code that compiles an SQR
program. (This program is equivalent to running SQR with -RT.) You can run the .sqt
file by invoking SQR Execute from the command line with "sqrt" (on UNIX systems)
or "sqrwt" (on Windows systems). An example of running SQR Execute from the
command line is as follows: sqrwt ex1a.sqt sammy/baker@rome
Note that after you save the run-time (.sqt) file, SQR no longer performs any
compile-time steps such as executing #IF, #INCLUDE, or ASK commands or
performing the SETUP section. These were already performed at the time that the
program was compiled and the runtime file was saved.
You must make a clear distinction between what is performed at compile time and
what is performed at runtime. Think of compile-time steps as defining what the report
is. Commands such as #IF or ASK enable you to customize your report at compile
time. For runtime customization, you should use commands such as IF and INPUT.
To save a compiled version of an SQR program, use the -RS command-line flag.
To run a precompiled program, use the -RT command-line flag or SQR Execute.
Except on the Microsoft Windows platform, SQR does not actually print the report.
SQR creates an output file that contains the report, but it does not print it directly.
The output file can be a printer-specific file or an SQR portable file (SPF). SQR
portable files have a default extension of .spf or .snn (for multiple reports).
SQR portable file (.spf) is a printer-independent file format that supports all the SQR
graphical features, including fonts, lines, boxes, shaded areas, charts, bar codes,
and images.
This file format is useful for saving the output of a report. SPF files can be distributed
electronically and read with the SQR Viewer. Producing SPF output also enables you
to decide later where to print it. Use SQR Viewer or SQR Print to print an SPF file.
Command-line flags create output files appropriate for different platforms and
printers.
DECLARE-PRINTER specifies printer-specific settings, but it does not itself cause
the report to be prepared for a specific printer.
To prepare a report for a specific printer, use the -PRINTER:xx command-line flag,
the USE-PRINTER-TYPE command, or the DECLARE-REPORT command with the
printer-type option.
The -F command-line flag enables you to name output files (including file
extensions).
The -NOLIS and -KEEP command-line flags create files in SQR portable format with
an .spf extension.
Specify multiple arguments in an argument file referenced on the command line.
Use a question mark on the command line to prompt a user for input.
Use batch mode to run multiple programs.

Use the DECLARE-TOC and TOC-ENTRY commands to create a Table of Contents


for your report.
You can generate multiple Tables of Contents and multiple reports from the same
program. Use the TOC argument of the DECLARE-REPORT command or the FORREPORTS argument of the DECLARE-TOC command to specify which TOC goes
with which report.
You can create headings and footings for specified Tables of Contents using the
FOR-TOCS argument to the BEGIN-HEADING and BEGIN-FOOTING commands.
The output files should appear as soon as your program has finished running. If you
specified the -KEEP argument, one output file is in SQR Portable Format
(recognizable by its .SPF extension).
On Windows and UNIX systems, the program also produces an output file with an
.LIS extension.
BEGIN-PROGRAM and ending with END-PROGRAM. These two commands and
the code between them make up the PROGRAM section, which is used to control
the order of processing. The PROGRAM section is required, and you may have only
one. It is typically placed at or near the top of the program. The PROGRAM section
is where execution of the program begins.
PRINT command gives the position on the output page. An output page can be
thought of as a grid of lines and columns. The "(1,1)" indicates line one, column one,
which is the top left corner of the page. The PRINT command can be used to print a
text string.
Print position can be expressed by a pair of numbers enclosed in
parentheses.
In SQR, you must place each command on a new line. You can indent SQR
commands
Comments The first line in the FOOTING section is a comment. Comments are
preceded by an exclamation mark, and they extend from the exclamation mark to the
end of the line. If you want to print an exclamation mark, you must enter it twice to
tell SQR not to take it as the beginning of a comment.
for example:
print 'An SQR Program!!' (1,1)
Order of Execution -->The PRINT command places text in memory, not on paper.
SQR for PeopleSoft always prepares a page in memory before printing it to paper,
performing the body first, then the HEADING and FOOTING sections. In this case,
"An SQR Program" is executed first, then "Tutorial Report" and "Page 1 of 1."
The CENTER option of the PRINT command centers text on a line
Page Numbering -->The PAGE-NUMBER command prints the text "Page " and the
current page number. The LAST-PAGE command prints the number of the last page,
preceded by the word "of," which is bracketed by spaces. In our example, SQR prints
"Page 1 of 1" because there is only one page.
Print Position --> Note the parentheses in the PRINT, PAGE-NUMBER, and LASTPAGE commands. Numbers in these parentheses give the position for printing. A
position in SQR is expressed as three numbers in parentheses(line, column, width)
where line is the line number, column is the column (character position), and width
is the width of the text.
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.

The BEGIN-SELECT command is the principal method of retrieving data from the
database and printing it in a report. Look again at the list_customers procedure,
which starts with BEGIN-PROCEDURE and ends with END-PROCEDURE. Note the
comment following the END-PROCEDURE command. It indicates that the procedure
is being ended, which is helpful when you have a program with many procedures.
(You can also omit the exclamation point: END-PROCEDURE main.)
The procedure itself contains a select paragraph, which starts with BEGIN-SELECT
and ends with END-SELECT.
In a SELECT statement (repeated here), you see positioning after each column
name. This positioning implies a PRINT command for that column. As before,
omitting the line number in the position causes it to be set by default to the current
line.
The implied PRINT command is a special SQR feature designed to save you coding
time. It works only inside a SELECT paragraph. 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 specifies
one line down from the current line. This command advances the current print
position to the next line. Note. When you indicate print positions using plus or minus
signs, be sure your numbers do not specify a position outside the page boundaries.
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.
SQR Print enables you to create printer-specific reports for any of the file types
supported by SQR. SQR Print converts portable printer-independent files (SPF) into
printer-specific files. SQR and SQRT create SPF files when you use the -KEEP and
-NOLIS command line flags.

Grid Adds a grid that looks and behaves like a spreadsheet that is embedded in a
page. It has column headings and cells and uses push buttons, links, and tabs to
navigate through the data. It is similar to a scroll area on a page. Each row in the grid
corresponds to a set of controls in a scroll occurrence. Navigation links and push buttons
replace the actual visual scroll bar, and add and delete push buttons enable a user to
insert and delete rows. Use instead of a single-level scroll area or scroll bar to manage
multi-row sets of data.
Scroll Area Provides an easy way for you to group or repeat multiple fields of data in a
defined area. Like a grid, users can easily navigate through the rows using links and
buttons in a navigation bar, and they can add or delete rows using push buttons. These
features are automatically placed in the navigation bar. The navigation bar also provides
several other settings, such as a Find feature that enables the user to search all fields
and rows for specific data and a View All option so that the user can see all rows of data
at once.
The fields in the scroll area can be placed randomly, one on top of the other, or side-byside. Unlike a grid, you are not limited to the type of controls that you can place in your
scroll area. You can even place a grid inside a scroll area.
Scroll Bar Like the scroll area, scroll bars also contain push buttons and links for
navigation, but not in the form of navigation bars. Developers must manually position all
navigation items. Like grids and scroll areas, the actual scroll control that you see in

PeopleSoft Application Designer when working with scroll bars in page definitions does
not appear at runtime. Instead, the scroll bar control has scroll action buttons to replace
the visual rendering of the scroll bar as push buttons and links on the web.
Secondary Page Adds an invisible control that associates a secondary page with the
primary page. You then associate the secondary page with a command push button or
link or a pop-up menu. Secondary pages gather or display supplemental information that
is related to the data in a primary page but less frequently referenced or updated.
Secondary pages are displayed using the DoModal PeopleCode function.
HTML Area Adds an area where you can write your own HTML. With other controls,
the PeopleSoft system automatically generates the HTML code. The HTML code is then
inserted into the dynamically generated code at runtime.
Push Button or Link Adds a push button or link that represents an internal or external
link, PeopleCode command, process through PeopleSoft Process Scheduler, prompt
action, scroll action, secondary page, or toolbar action. You can specify whether the
control appears as a traditional push button, or as a link (highlighted, underlined text).
Derived and Work Fields You can use a field definition from a derived or work record to
store a temporary value that PeopleCode uses to determine the values of other field
controls on the page.
For example, for a budgeting transaction in PeopleSoft General Ledger, assume that you
have an annual amount that you must spread to multiple accounting periods. You can
create a page that includes both a field control from a derived record for the annual
amount and an amount control for each accounting period. You then write PeopleCode to
derive the amount per accounting period from the annual amount. When a user enters
the annual amount in the derived field control, PeopleCode calculates the amount per
accounting period and inserts it into each accounting period field control. The annual
amount isn't stored in the database, but the period amounts are.
PeopleSoft applications can run in two different processing modes: interactive and
deferred.
Interactive Mode In interactive mode (formerly called standard), when the user exits a
field that has a field-level event (for example, FieldChange, FieldEdit, RowInsert
PeopleCode, prompt validation, related display, and so on):
A transmission to the application server is performed to run that field-level event.
The page is redisplayed.
Deferred Mode Deferred mode enables you to defer many of the conditions that need
server processing until running them on the application server is required or requested.
For example, when a user exits a field that has a field-level event (like FieldChange or
FieldEdit PeopleCode, prompt validation, related display, and so on) that event is not run
until the next transmission to the application server. When the next transmission to the
server occurs, PeopleTools determines which fields have changed since the last
transmission. Logic on the application server runs the appropriate system edits and
PeopleCode events (in field layout order).
You can select deferred mode processing at the field, page, and component levels. For a
field in the component to run in deferred mode, you must select deferred mode at each
of those levels. Deferred processing is the default mode at the field, page, and
component levels.

About SQC find some info: Home PeopleBooks Library PeopleSoft Process
Scheduler Appendix A: Using Process Request APIs
Home PeopleBooks Library Data Management Understanding Configuration
Manager

Potrebbero piacerti anche