Vous êtes sur la page 1sur 34

SQR ANSWER BOOK

(Applies to current releases of PeopleTools 6.x, 7.x, 7.5x)

1
Table of Contents
SQR: Structured Query Report Writer..............................................................................................................................................4
Introduction............................................................................................................................................................................................4
Initialization Files for SQR...................................................................................................................................................................4
Setting up Process Scheduler Definitions for SQR............................................................................................................................5
Process Types........................................................................................................................................................................................5
Type Definition.....................................................................................................................................................................................................5
SQR Process Definitions.......................................................................................................................................................................6
Process Definitions................................................................................................................................................................................................6
Process Definition Options....................................................................................................................................................................................7
Job Definitions.......................................................................................................................................................................................8
Job Definition........................................................................................................................................................................................................8
Panel and Process Groups.....................................................................................................................................................................................9
Establishing Process Scheduler Security...........................................................................................................................................10
Creating Process Security Groups.......................................................................................................................................................10
Creating a new Process Security Group..............................................................................................................................................................10
Adding an Existing Process Security Group.......................................................................................................................................................11
Defining Operator Security for Processes.........................................................................................................................................11
Process Defaults for Operators and Operator Classes.........................................................................................................................................12
Submitting Process Requests..............................................................................................................................................................14
Process Monitor .................................................................................................................................................................................15
Process Request Detail - Process Detail.............................................................................................................................................15
Process Request Detail - Request Parameters.....................................................................................................................................16
Server Detail........................................................................................................................................................................................17
Process Scheduler Client Workstation & NT Server Setup............................................................................................................18
Client Workstation & NT Server........................................................................................................................................................19
Unix Server..........................................................................................................................................................................................19
To successfully print SQRs that are submitted to run on a Unix server, you must fill out the Process Request Detail panel to
show the following (for example):......................................................................................................................................................19
Where <printer-name> is the name of the Unix printer you want to use. If you leave the -d flag out, and just type "/tmp/ +P",
the output will go to the default Unix printer. ...................................................................................................................................19
OS/390 Server.....................................................................................................................................................................................................20
VMS Server.........................................................................................................................................................................................20
DEBUGGING TIPS & TECHNIQUES.............................................................................................................................................21
All PLATFORMS................................................................................................................................................................................21
SQR Commands and SQRFLAGS......................................................................................................................................................21
Client Workstation / NT Server..........................................................................................................................................................22
Unix Server..........................................................................................................................................................................................23
OS/390 Server.....................................................................................................................................................................................................23
VMS Server.........................................................................................................................................................................................24
AS/400 Server.....................................................................................................................................................................................................25
Can’t print SQRs on the Unix printer.................................................................................................................................................28
Unknown flag on command line: -d printing SQRs on Unix.............................................................................................................28
E.g.: /tmp/ +P-dprint_queuename.......................................................................................................................................................28
PRCS_SQR[234] : sqr : not found......................................................................................................................................................28
SQR prompts for Oprid and RunCntlid when run through the Process Scheduler............................................................................28
SQRW / Informix - String to Date conversion error..........................................................................................................................28
ScheduleProcess: Attempt to start client process failed. Return Code: 00014..................................................................................29
Common Causes for JCL errors on the mainframe............................................................................................................................29
Frequently Asked Questions...............................................................................................................................................................29
Is it possible to run the SQR on the client in the 3 Tier Mode?.........................................................................................................29
SQR does not understand the concept of Three-Tier Architecture. All it knows is that it requires direct database connectivity in
order to run. So, even though you may be logged on to PeopleSoft in Three-Tier, SQR is really being run in Two-Tier. It does
not run through the Application Server. The Database Drivers (Client Connectivity Program files) must be installed directly on
the Client Workstation or from a File Server.....................................................................................................................................29
Eg: Need SQL*NET on the client if running the SQR against an Oracle Database.........................................................................29
For more information, please refer to the Three-Tier Answer Book on Customer Connection under News and Information ---
Installation Communication................................................................................................................................................................29

2
How are the Process Instance, Operator ID and Run Control ID read by SQRs?.............................................................................30
Process Monitor options are greyed out in Operator Profile..............................................................................................................30
Can you have multiple SQR Search Paths on Unix?..........................................................................................................................30
Why are the RDBMS/OS versions on the SQR Server CDs different than what was ordered?........................................................31
Tips to Printing Graphics.....................................................................................................................................................................31
SQR COMMAND LINE FLAGS.......................................................................................................................................................31

3
SQR: Structured Query Report Writer
Introduction
Structured Query Report Writer, or SQR, is a report generator for SQL based relational databases. SQR assists the user or
programmer in creating simple or complex reports without resorting to a standard 3GL programming language. SQR gives you full
control over the report display. You define the page size, headings, footings and exactly how you want the information to appear.
SQR is capable of handing many different kinds of reports, including tabular (with multiple detail lines), single or multiple page
and form letters. SQR can display data in columns. Special formats such as mailing labels are also possible. SQR can even create
output suitable for magnetic tape transfer or for creating pages on laser printers. The more you use SQR, the more you will
understand just how many different varieties of reports are possible.

SQR is a specialized programming language for data access, for manipulating data, and for reporting. SQR supports the full
complement of SQL commands. Using SQR, you can build complex report procedures that execute subsidiary SQL statements
conditionally, implementing either nested or hierarchical program logic. An SQR program can execute multiple queries.

SQR features include:

- Flexibility and scalability of client-server architecture


- Comprehensive facilities for combined report processing and SQL processing
- Multiple platform portability
- Multiple RDBMS portability

Besides creating report output, SQR may be used as a high level programming language, adding procedural logic and control to
SQL queries and commands. Many non-report applications can be written using SQR, including global database manipulation and
maintenance, table load and unload, interactive query and display and many other applications.

Initialization Files for SQR


SQR.INI
The SQR.INI file is the initialization file for SQR v3.x. This file contains settings and parameters used by the compile and
execution phases.
For SQR v3.x, the environment variable SQRDIR and SQRFLAGS should be defined in the SQR.INI file under the
[Environment:Common] and the [Environment: <DB type>] section. The SQRDIR should point to the directory where the
SQRW.EXE resides. E.g. SQRDIR=J:\H611ora\SQRBINW

PSSQR.INI (Windows) or PSSQR.UNX (Unix) or PSSQR.VMS (VMS) or PSSQR (AS400/OS390)


The PSSQR.INI file is the initialization file for SQR v4.x. This file contains settings and parameters used by the compile and
execution phases.

The -ZIF report argument for SQRFLAGS is required for SQR4. On the Client Workstation or the NT Server, it should point to the
PSSQR.INI file that contains additional date formatting information for SQR. The environment variable SQRDIR should also be
defined in this file as well. This flag should be added to the Configuration Manager; Process Scheduler tab under the environment
variable PSSQRFLAGS. You need to fully qualify the entire path up to and including the PSSQR.INI file
(e.g. -ZIFJ:\H750ORA\SQR\PSSQR.INI).

On the Unix Server, the -ZIF report argument for SQRFLAGS should point to the file pssqr.unx. This flag should be added to the
SQRFLAGS environment variable defined in the psconfig.sh which is located under $PS_HOME. (i.e. SQRFLAGS="-i$PS_SQR/
-m$PS_SQR/allmaxes.max -ZIF$PS_SQR/pssqr.unx";export SQRFLAGS) or added to the SQRFLAGS environment variable set
through PSADMIN. Remember to bring the Process Scheduler Server Agent down and then back up after making modifications to
the environment. The psconfig.sh file is only read once during start-up.

To run SQRs outside of PeopleSoft through the SQRW icon, the -ZIF flag needs to be added on the Target line where you have
specified the path to the SQRW.EXE. (Right-click on the SQRW icon, choose Properties from the Menu, and then select the
Shortcut tab.) Put a space and then the -ZIF flag pointing to the PSSQR.INI file.
For Instance: H:\PT75300\sqrbinw\SQRW.EXE -ZIFJ:\H750ORA\SQR\PSSQR.INI.

4
Setting up Process Scheduler Definitions for SQR
Process Types
Type Definition
Menu : Process Scheduler | Use | Process Types |
Panel : PRCSTYPEDEFN

Record(s) : PS_PRCSTYPEDEFN

Process Scheduler, Process Types, Type Definition


Generic Process Type: Each process type definition is based on a generic process type, as shown in the list below. In turn, each
process definition is based on a particular process type definition. There are five main generic process types that contain various
process types.
SQR SQR Report, SQR Process, SQR Report for Upgrade Compare, SQR Report for Workflow Delivery

Restart Enabled: Currently this option is applicable for Application Engine Processes only. It is used to enable a process request to
be restarted from Process Monitor.

Command Line: Program name required to execute the process. %SQRBIN%SQRW.EXE

Parameter List: Used for all NON-SQR Generic Type processes to pass runtime parameters for your process.

Working Directory: All Process Types that run on the Client or NT Server need a working directory for any request that needs
other modules in the current working directory. For Process Types on the server (except NT Server) this value should be blank
- SQR (Client) - %DBDIN%
- SQR (Server) - %%DBBIN%%

Output Destination: specifies the output destination for this process type. It will be used for any process definition that specifies
Process Type as its Output Destination Source, meaning that the process will use the values in the process type definition for where
to send the output.

SQR Parms
Menu : Process Scheduler | Use | Process Types | SQR Parms Push Button
Panel : PRCSTYPESQR

Record(s) : PS_PRCSTYPEDEFN

5
Process Scheduler, Process Types, SQR Parameters
SQR Connect String is required by SQRW to connect to the database. Allows the Process Scheduler to run processes without
operator intervention.

SQR Flags required to run the SQR. %%OUTPUTDEST%% gets its value from the File/Printer edit box in the Process
Scheduler Request dialog.

SQR Run Cntl Parms are the variables that the SQR requires when running outside the Process Scheduler. Allows the Process
Scheduler to run processes without operator intervention.

SQRW Search Path -- SQR for Windows (SQRW) provides the -i flag to specify a search path for the SQR #include files
(SQCs), but there’s no facility within SQRW to specify a search path for SQR programs. Process Scheduler provides this
functionality with the SQRW Search Path parameter. At run time, The path gets searched and then used to preface the report
name in the parameter list with the first directory in the search path where the program is found. SQRW Search Path is only
supported for SQRW on the Windows Client and Windows NT Server.

SQT Working Directory is required by pre-compiled SQRs, called SQTs. The system uses this directory if you turn on the
SQR Runtime check box on the Process Definition panel.

SQR Process Definitions


Process Definitions
Menu : Process Scheduler | Use | Process Definitions | Process Definitions
Panel : PRCSDEFN

Record(s) : PS_PRCSDEFN, PS_SERVERDEFN, PS_PRCSDEFNPNL, PS_PRCSDEFNGRP

Process Scheduler, Process Definitions, Process Definitions


Description: A short description for the process.
Process Class: Used by the Process Server Agent to run processes of defined Process Classes. This helps in restricting types of
requests to servers. If not defined to a given server, this process will remain “queued” because it will not be selected by that
server to initiate the request.
Server Name: Used to restrict running of the Process on a specific server only. If left blank the process can be run on any
server that can process requests for the specified Process Class. The ScheduleProcess() PeopleCode function will use this
“Server Name”, if run location of Server is selected and Server Name isn’t specified.
Priority: (Low, Medium, High) Applicable for processes run on the server only. If multiple processes are queued to run on a
given server this field defines the relative priority of the process.
Run Location: (optional) Enables you to specify the default run location for this process. The value in the Process Scheduler
Request dialog overrides this setting.

6
Note: This isn’t used to restrict processing of this process on client or server.

Recurrence Name: Used for processes to be run on the server only. You have to choose an existing definition for run intervals.
Recurrence definitions are added and maintained from the Process Request Dialog.

Note: Specifying a Run Recurrence won’t start the process. It has to be kicked off manually the first time.

Long Description: (optional) long description of the process.


Log Client request: (On by default for all API aware processes). Turning this ON causes the system to log the request to the
Process Request table each time an operator runs the process on the client.
SQR Runtime: If turned on, the system appends “.SQT” to the process name in the parameter list on the Process Definitions
Options panel, and uses the SQT Working Directory specified on Process Types | SQR Parms push button
API Aware: Each process defined is either API aware or API unaware. An API aware process is able to update its process
status using some special code provided. API unaware processes do not have any defined program interface to Process
Scheduler. (E.g. WINWORD.EXE)
To make SQR processes API aware, use the standard API code provided by PeopleSoft. The API code updates Process
Scheduler to run status, completion code, message set, and message number. The API call is given just before it COMMITs
processing.
If an error is encountered in the process, the code performs the rollback and updates the run status to “unsuccessful,”
COMMITs this update, and then terminates.
If this option is turned on for any process that is not API aware, Process Scheduler will include this process in the concurrent
task count. This can result in improper server load balancing. As the processes within a job have to notify the server of the run
status when complete, the processes in the Job Definitions have to be API aware. This is how the decision is made to continue
with the next job process.

Note: Just setting this field for custom processes is not sufficient. You need to include code in your process to update the
PSPRCSRQST - Process Request Table to the appropriate status.

Panel Groups: Adding a Panel Group to a process definition causes that process definition to appear in the Process Scheduler
Request dialog when File Run is selected within that panel group, provided you have security to run the process. For example,
consider the Panel Cross Reference Report (XRFPANEL.SQR). You can run this report from the following locations:
• Process Scheduler, Process, Single Process (PRCSSINGLE)
• Process Scheduler, Process, Multiple Process (PRCSMULTI)
Reports are not all run through the Process Scheduler menu, because they are categorized by application functionality.
Also, some reports require you to enter run control arguments through panel groups. These panel groups are later attached
to menus using the Application Designer.
Process Security Groups (Process Groups): Process Security Groups control what an operator or operator class can
submit to the Process Scheduler. Each process definition requires at least one Process Security Group to make it a member
of that group. A process may be a member of multiple Process Security Groups.
The Process Group is added to a security profile in Security Administrator. Switch to Security Administrator display to
View | Process Groups, to display list of process groups accessible for a security profile.

Process Definition Options


Menu : Process Scheduler | Use | Process Definitions | Process Definition Options
Panel : PRCSDEFNOPT

7
Record(s) : PS_PRCSDEFN

Process Scheduler, Process Definitions, Process Definition Options


Overrides
Parameter List, Command Line, Working Directory, SQR Flags, SQR Parameters: You can choose to prepend, append
or override these options. In this example, SQR flags will be appended with the –debugx and –s flags to the list of existing
SQRFLAGS set. These settings are specific to this process only.
Output Destination Parms
Output Dest Type: (File, Printer, Window or None). Defines the default destinations through the run control definition.
None or blank defaults to the operator run control values.
Output Dest Source:
None - If you do not want the output file or report produced for the process. Operators from classes other than ALLPNLS
will not get any output.
Process Definition - This will default to use the output destination specified by the Process Definition.
Process Type Definition - Use this to default the output destination to the one specified by the Process Type.
User Specified - (Default) Output destination will be determined by destination of the Run Control on the Process
Scheduler Request Dialog. Make sure the operator has the ability to override the output destination (This is set through
Security Administrator | Edit | Process Profile | Allow Requestor to checkbox for the Operator Class). If a user is not
allowed to override the output destination by their Operator Process Profile, the output source destinations will be
enforced.
Output Destination: You can either enter a Filename or Printer name. Typically this should be Blank.

Job Definitions
Job Definition
Menu : Process Scheduler | Use | Job Definitions | Job Definition
Panel : PRCSJOBDEFN
Record(s) : PS_PRCSJOBDEFN, PS_SERVERDEFN, PS_PRCSJOBITEM, PS_PRCSDEFN
A job is a collection of Processes. If we need to run certain processes in a specific order / simultaneously we can define a job
and call them in the order desired.
Description: Description of the job to identify how it will be used.
Server Name: The Server Name where you want the job to run.
Process Class: You may select an existing Process Class from the drop-down list, or enter a unique process class name.
Creating a new process class makes it available to your process server definitions. You must add new process classes to any
servers that you expect this process job to run. If not defined to a given server, this process job will remain “queued” until a
Process Server Agent with the required process class is active.

8
Process Scheduler, Job Definitions, Job Definition
Job Run Mode: (Serial or Parallel) Choose Serial if you want each process within the job request to run sequentially. Choose
Parallel if you aren’t particular about the order the processes run.
Job Priority: (High, Medium, or Low) Process Scheduler will initiate the job with the higher priority first.
Recurrence Name: To run jobs recursively at previously defined intervals, you can use a recurrence name.
Process Type: Type of the Process (i.e. SQR Report.)
Process Name: Name of the Process.
Item #: Item numbers must start with one and run sequentially with no gaps. You can’t have Item # as 10, 20, 30, etc. It has to
be 1,2,3 and so on.
Run Always: The completion code is determined by each application. As long as each process runs successfully, the next
process will be selected to run. If the prior process fails, as in the process status is Error or Unsuccessful, and you have
checked this flag for the following process, then the following process will be scheduled to run.

Panel and Process Groups


Menu : Process Scheduler | Use | Job Definitions | Panel and Process Groups
Panel : PRCSJOBDEFN2
Record(s) : PS_PRCSJOBGRP, PS_PRCSJOBPNL
Process Security Groups: Adding a Panel Group to a job definition causes that job definition to appear in the Process
Scheduler Request dialog when you select File, Run within that panel group, provided you have security to run the process. To
add new rows press F7.
Panel Groups: This makes the job definition a member of that group. A job definition may be a member of multiple Process
Security Groups. Process Security Groups are then assigned to Operator Ids or Operator Classes in Security Administrator.
This allows you to specify the process requests that particular operators and classes of operators can run. To add new rows
press F7.

9
Process Scheduler, Job Definitions, Panel and Process Groups

Establishing Process Scheduler Security


A chief concern with any automated process scheduling tool is security. How do you ensure that only those users authorized can
initiate processes on-line? Through Security Administrator, you set up Operator Ids and classes of operators that determine who or
what class of users may access specific windows, menus, and panels. You can restrict process activity by granting access to process
scheduling panels only to the appropriate operators. You use the following tools to achieve process security.
• In Process Scheduler you create Process Security Groups where you can group processes together that have the same security
requirements.
• In Security Administrator you define which Process Security Groups specific operators or operator classes are authorized to
run.

Creating Process Security Groups


When you define Process Definitions you can assign each process to one or more Process Security Groups. For example, you
might define the Tools panel cross reference report to TLSALL and SQRALL. You might also create new Process Security
Groups to assign to one or more operators or operator classes.
Creating a new Process Security Group
• Select Use, Process Definitions, Process Definitions.
• Place you cursor in the Process Security Groups edit box and press F7 to add a new row.

Note. If you’re adding a new Process Definition, one blank edit box will appear under Process Security Groups by default.
You don’t need to press F7 to add a row for the first Process Security Group.

• Place your cursor in the new, empty edit box, and enter the name of the Process Security Group you want to add.
For example:

10
Enter New Process Security Group
• After you have entered the new name, select File, Save.

Adding an Existing Process Security Group


• Select Use, Process Definitions, Process Definitions.
• Place you cursor in the Process Security Groups edit box and press F7 or click the Insert Row button to add a new row.
• Press the down arrow to the right of the edit box.

The Valid Values dialog appears.

Adding an Existing Process Security Group to a Process Definition


From the Valid Values dialog, select the appropriate Process Security Group in the Process Gr. list, and click OK.

Defining Operator Security for Processes


Once you define Process Security Groups, you’ll use Security Administrator to specify which operators and classes of operators
are authorized to run processes associated with a Process Security Group. Process Scheduler checks this table before displaying
the Process Scheduler Request dialog or processing a ScheduleProcess PeopleCode request to verify that the operator signed on is
authorized to execute the process.
To associate operators with Process Security Groups
• Select Go, PeopleTools, Security Administrator.
• From Security Administrator, select File, Open and select the appropriate Operator/Class Name on the Open Operator/Class
dialog to open the desired operator record.

Note. You can associate Process Security Groups with an Operator Class or a Single Operator ID not assigned to a class.
But you can’t associate Process Security Groups to an Operator ID also assigned to a class because an operator assigned to a
class assumes the security profile of that class.
11
• Click on the Process Groups icon, then select Insert, Process Group.
• Select the Process Group that you want to insert into the Operator Class from the Insert Process Group dialog.

Insert Process Group Dialog

Note. Process Groups are the same as Process Security Groups.

• Select a Process Group (in this case NEWGROUP) that you want to insert into the Operator Class from the Insert Process
Group dialog.
This will now enable an operator of this class to run this process.

Process Defaults for Operators and Operator Classes


You define an Operator’s Process Profile to establish processing defaults, such as file and printer destinations or OS/390 job
names and accounts. A Process Profile can apply to an operator or to a class of operators.
• Open the desired operator or operator class definition in Security Administrator.
• Click once on the Process Groups icon.
• Select the appropriate operator profile by double-clicking it in the list.

The Process Scheduler - Operator Profile dialog appears.


Process Scheduler Operator Profile
Client Destinations
File: Output filename on the client - %TEMP%\ where TEMP is an environment variable on client.
Printer: Output printer on the client - LPTx; where x=1,2,3

12
Server Destinations
File: Output filename on the server.
Server Sample Value
AS/400 <library>/<file>(<member>)
OS/390 HLQ.PSVV
NT %%TEMP%%\
UNIX /tmp/
VMS <directory name>
Printer:
Server Value Output to
NT LPTx specified LPT port; where x=1,2,3
UNIX /tmp/ +P default Unix printer
UNIX /tmp/ +P-ddest specified Unix printer - dest
VMS +P/queue=PrintQueueName specified VMS print queue -
PrintQueueName
Allow Process Request: Used to adjust the level of access rights for operators to view and update process requests initiated
by the operator(s) under this profile. Both “View By” and “Update By” can be changed to Owner, All, or None. Check
settings here if you have problems viewing processes in the Process Monitor.

Allow Requester To: Used for further adjustment of Operator rights.


Override Output Dest: You may sometimes want the user to specify the run location during run time. Checking this box can
do this.
Override Server Parms: User can override the server parameters during run time.
View Server Status: View the status of the server. If unchecked you can’t view the server status. The server status button
will be greyed out.
Update Server Status: This option enables you to suspend, restart, or bring down a server if needed. If unchecked you can
not bring down the Process Scheduler through the Process Monitor.
Update Recurrence Defn: Checking this box allows you to update Recurrence Definition while making the Process
Scheduler Request.
E.g. Here’s how the Process Scheduler Request will appear if Override Output Dest, Override Server Parms and
Update Recurrence Defn are unchecked.

Process Scheduler Request Dialog when Override Output Dest is turned off
OS/390 Job Controls (For OS/390 Jobs only) It is used to associate a class of users. A user belonging to this class will use
these for all OS/390 processes initiated. This is greyed out if you are not connected to a DB2/OS390 database.

13
Submitting Process Requests

• (Run with Defaults) - used when only one process is associated with this panel group.

• (Run) - used when more than one process is associated with this panel group.

Use the appropriate button to submit requests that will bring the following panel:

Process Scheduler Request dialog


Run Location: Client or Server.
Server: If you select server specify the Server Name. If you select Run Location as server but do not enter the Server
Name isn’t specified your Process Request remains queued due to lack of complete information.
Output Destination is where you specify the format of your process output. You have the following options:
File If you select is File the output will be sent to the directory specified in the File/Printer field. A default value may
appear in this field if it is set in Security Administrator.
Printer If you select this option your output will be written to the local or network printer you specify.
Window This option is only enabled if you are running the process on the client, and is only applicable to Crystal
processes. In this case, your output will be written to the Crystal interface.
File/Printer If you select File as the output, specify the location the file should be written, and if you selected Printer,
then specify the printer to which the output should be directed.
Run Date/Time The Run Date and Time displays the current date and time stamp from the database (seconds are zeroed
out). The process can be selected to run anytime after this date/time has passed. This is only relevant to processes running
the server that you schedule to run at a particular time.
Date. To select a date, press the down arrow in the Date edit box to reveal a calendar from which you can double-click
on the appropriate date.
Time. To select a time, place your cursor in the Time edit box and enter the appropriate time you want the process to
run.
Run Recurrence: Run recurrence is not supported for processes that run on the client, so this entire section of the dialog is
disabled if you select Client as the run location. The Run Recurrence allows you to choose a recurring time interval for a
process request to be run on the Server. You can associate a recurrence with any server-based process request or job when
the Run Location is set to Server. Below the drop-down list are the following buttons:
New To add a new run recurrence.
Edit To modify an existing run recurrence.
Delete To delete an existing run recurrence.
At the bottom of the panel is a list of all the processes specified within the Security Administrator process group definition.
The listing is divided into columns with the following headings:
• First Column Items with a + (plus sign) to their left are jobs. A job contains multiple process requests. To view the
processes within the job, double-click on the row.
• Description Provides a long description of the process.
• Name Shows the actual name of the process.
• Process Type Descr Shows the Process Type, such as COBOL SQL or Crystal.

14
Process Monitor
This tool is used to view and update the status of process requests and Process Server Agents.
Menu : Process Monitor | View | Process Requests
Record(s) : PSPRCSRQST

Process Monitor Process View

Process Request Detail - Process Detail


The Process Detail is provided on two panels. You may view this information either by double-clicking on a process request
line or selection the View/Detail menu or by clicking on the Process Detail push button (magnifying glass button).

Process Request Detail, Process Detail


Process:
Desc: Process Description
Class: Process Class
Type: Process Type
Run Status: The status of the process. Success / Error
Operator: Operator running the Process
Instance: Process Instance Number
Operating System: Operating system where the Process ran
Database Type: Type of the database
Server Name: Name of server if the process ran on the server.
Date/Time Stamps:
Request: Time when the request was queued in the Process Request table.
Run: The request can start anytime after this time is passed.
Begin: Actual time when this request was selected and initiated.
15
End: Time when the process ended to Success or Error
Update Process: If your Operator ID is not authorized to update a given request, then the Update Process section will be
greyed out. If you are authorized, the following options are available depending on their current run status.
Hold Request: You can’t hold a request that is currently processing.
Queue Request: Usually processes to be run at a later interval will be in status.
Cancel Request: You can’t cancel a job that has already completed.
Delete Request: You can delete processes that have been cancelled or have been successful.
Run:
Location: Run location (Client / Server)
Control ID: The Run Control ID used to run the process.
Return Code: The return code is determined by either the Process Scheduler or the third party application (such as SQR or
Crystal), depending on how the PeopleSoft application uses the return code.

Process Request Detail - Request Parameters


Menu : Process Monitor | View | Process Requests
Record(s) : PSSERVERSTAT, PS_SERVERDEFN

Process Request Detail, Request Parameters


Parameters:
Command Line: Command required to execute the process
Working Dir: Working directory, if defined, for the process.
Parm List: Parameter list created by the Process Scheduler to run the process.
Message Text: Displays any messages returned in relation to the request.
Copy to Clipboard push button enables you to copy these parameters to the clipboard. Use these parameters to test this
process as a stand-alone request. This helps to check for a request-related problem versus a problem related to Process
Scheduler.
Here’s a sample output when you click this button:
1998-04-30-17.04.18.897000
Process Instance = 1
Working Directory = c:\apps\db\oracle7\bin
Command Line = q:\pt701\sqrw\sbs\SQRW.EXE q:\pt701\sqr\XRFWIN TCHURY7/SYSADM/%ACCESSPSWD%
-ic:\user\sqr\;q:\pt701\sqr\ -mq:\pt701\sqr\allmaxes.max -oc:\temp\sqr.log -XCB -fc:\temp\ 1 PTDMO tac

16
Process Monitor Server View
If authorized, you can monitor and even update the status of all servers in the Process Monitor Servers view. You access this
view by selecting View, Server or clicking the Servers push button on the toolbar (the button that looks like a computer). From
the Servers view, you can track all available Process Servers and their Descriptions. If a process request has been initiated on a
server, you can review the Begin Date/Time, and Last Update Date/Time. The Status column tells you if the server is currently
down, suspended (not accepting new processes to run), or active (running).

Server Detail
Double-clicking on any server displayed in the Servers View brings up details about the selected server.

Process Monitor Server Detail


Operating System: Operating system of the server.
Days before purge: Days before the process may be purged.
Active Requests: Number of Active requests on the server.
Status: Status of the server.
API (max):
Aware: Maximum number of API Aware processes that may run on this server.
Unaware: Maximum number of API Unaware processes that may run on this server.
Intervals (seconds):
Sleep Time: Sleep Time of the Process Server Agent.
Heartbeat: Heartbeat Time of the Process Server Agent.
Update Status:
Stop Server: Process Server Agent is down.
Suspend Server: Process Server Agent is suspended.
Restart Server: Use this to restart suspended Process Server Agent.

17
Process Scheduler Client Workstation & NT Server Setup
On the Client Workstation most of the settings required by the Process Scheduler are set through Configuration Manager.

Process Scheduler Setup


The following list contains only the Environment Variables required for SQR.
TEMP - Temporary directory. This is where you will find log files and other output files.
DBBIN - Path to the Database Drivers – Client Connectivity Program files
PS_HOME - PeopleSoft Home Directory
PSSQRFLAGS - SQR Report Arguments (SQRFLAGS)
PSSQR1 - Path of Custom SQRs (local drive)
PSSQR2 - Path of PeopleSoft delivered SQRs (local drive)
PSSQR3 - Path to Custom SQRs (network drive)
PSSQR4 - Path to PeopleSoft delivered SQRs (network drive)
SQRBIN - Path to SQR Executable (Required by the Process Scheduler)
WinWord - Directory for Word for Windows executable

Note: SQRDIR and SQRFLAGS - These variables are set in the SQR.INI file for SQR3 and in the PSSQR.INI file for SQR4.

SQR Printing
18
Client Workstation & NT Server

SQR is a 32-bit MS-DOS based program and therefore must conform to DOS’s limitations. In order to print through the
Peoplesoft Process Scheduler, you must be able to print from DOS. On the Client Workstation and NT Server, we recommend
that you print to LPTx ports. These must be captured at the DOS level.

NET USE LPT1 \\PLE-PRINT-08\B1-P4130 where \\PLE-PRINT-08\B1-P4130 is the network path to the printer.

Type NET USE /HELP | MORE for additional information and options such as /PERSISTENT:YES which controls the use of
persistent network connections. (/PERSISTENT:YES is an NT option only.)

For Novel Networks, there is a different capture command.


CAPTURE LPT1 Q=RXHPL45 NB where RXHPL45 is the Novell Queue Name and NB is another option. For instance, NB for
no banner.

Other optional commands:


TI= 1 (time out can be any number -- 1 is recommended)
NB (no banner)
NFF (no form feed)
NT (no trailer)

These capture commands can be added to your AUTOEXEC.BAT file or your login script so that they are automatically executed
when you re-boot your workstation.

On Windows 95 Workstations, you also have the capability to capture the Printer Port from the Printer Icon.

1 Select Start, Settings, Printers


2 Point to default printer, then click right mouse button
3 Select Properties from menu
4 Choose the Details tab
5 Click Capture Printer Port button
Device = LPT1
Path = network path to the printer (ie \\PLE-PRINT-08\B1-P4130)
6 Click OK to accept change
7 Click OK to close Properties
8 Close Printers window

Unix Server
In order to print from Unix, you must be able to print directly from the Unix Command line using the LP command to the desired print queue
(ie. lp –dP56 reportname.lis).

In order to print successfully through the Peoplesoft Process Scheduler, you must first specify the following: /tmp/ +P-
dprintqueuename where /tmp/ is a valid directory where a file can be created. The prcs_sqr shell script, which launches the SQR
executable, takes the .LIS file that is created in the /tmp/ directory and uses the Unix LP command to print to the desired
printqueuename. When the prcs_sqr shell script sees +P in the output destination, it knows to use the Unix LP command. The
following is an example of what should be specified in the File/Printer section of the Output Destination on the Process Scheduler
Request panel: /tmp/ +P-dP56. The only space should be between the last forward slash and the plus sign.
To successfully print SQRs that are submitted to run on a Unix server, you must fill out the Process Request Detail panel to show
the following (for example):
Run Location: Server
Server Name: PSUNX
Output: File
File/Printer: /tmp/ +P-d<printer-name>
Where <printer-name> is the name of the Unix printer you want to use. If you leave the -d flag out, and just type "/tmp/ +P", the
output will go to the default Unix printer.

With PT7.5 using PSADMIN, you have the ability to specify an Output Directory.
19
Option #3 – Configure a Process Scheduler Server

Values for config section - Process Scheduler


LogFence=0
ProgramName=PSRUN PTPUPRCS
PrcsServerName=PSUNX
PSSQR1=%PS_HOME%/sqr
PSSQR2=
PSSQR3=
PSSQR4=
PSSQRFLAGS=-i%PSSQR1%/,%PSSQR2%/,%PSSQR3%/,%PSSQR4%/ -m%PSSQR1%/allmaxes.max
Log Directory=%PS_SERVDIR%/logs
OutputDirectory=%PS_SERVDIR%/output/

So, you could also specify %%OUTPUTDIRECTORY%% +P-dprintqueuename in the File/Printer section of the Output
Destination on the Process Scheduler Request panel. You can also specify $TEMP if you have it defined properly.

OS/390 Server
File: Enter your Peoplesoft Hi-Level Qualifier (PSHLQ) to use as the default HLQ.PPVV to output reports directly to sequential
or partitioned datasets.

Printer: Enter your desired OS/390 Printer Destination (eg. DEST=U3)

Make sure the values entered are in uppercase. Do not use quotes to delimit HLQ.PPVV.

In the SHELL JCL for SQR, OUTNODE’ denotes an OS/390 Partitioned Data set (PDS). The PDS is a requirement for SQR
output. If the SQR report, such as XRFWIN, were to be directed to an Output Destination of File, the following substitution
would occur:

The following line in SHELSQRF


// OUTNODE=’%OUTDEST%.SQRLIST’, OPTIONAL:USER-DEF OUTPUT
would be changed to
// OUTNODE=’PT700C1.SQRLIST’, OPTIONAL:USER-DEF OUTPUT
If this was redirected to the printer, this is how the substitution will take place.
// OUTNODE=’DEST=U3’, OPTIONAL:USER-DEF OUTPUT
.........
//*****************************************************************************
//* Main portion of JCL Shell
*
//*****************************************************************************
.........
//SQROUTP DD SYSOUT=*,DEST=U3

VMS Server
In order to print from VMS, you must be able to print directly from the VMS Command line to the desired print queue name.

In order to print successfully through the Peoplesoft Process Scheduler, you must specify the following:
+P/queue=PrintQueueName. When the PS_BIN::PRCS_SQR.COM shell script sees +P in the output destination, it knows to
send the output to the printer.

20
DEBUGGING TIPS & TECHNIQUES
All PLATFORMS

SQR Commands and SQRFLAGS

#DEBUG[xxx] / -DEBUG[xxx]
When debugging a program it is often useful to:
1) Display data or show when a procedure or query executes by using temporary SHOW or DISPLAY commands in key places in
the program.
2) Isolate problem areas by temporarily skipping the parts of the program that work correctly.
3) 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 or your program. Precede the command with #DEBUG, as shown in the example below:

#debug display $s

When #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 will be displayed only when you run the program with –DEBUG. You can process 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, as shown in the following example:

sqr reportname username/password@dbname –DEBUGabc

In this example, commands proceeded by #DEBUG, #DEBUGa, #DEBUGb or #DEBUGc are compiled when the program is
executed. Commands proceeded with #DEBUGd are not compiled because “d” was not specified in the –DEBUG command line
flag. Please refer to pages 74-75 of the SQR4 Language Reference Guide.

DISPLAY
Displays the specified column, variable or literal. The DISPLAY command can be used to display data to a terminal. The data is
displayed to the current location on the screen. If you wish to display more than one field on the same line, use NOLINE on each
display except the last. If you require more control over the display, use the SHOW command. Please refer to pages 111-114 of
the SQR4 Language Reference Guide.

Syntax: DISPLAY {any_lit | _var | _col} [[:$]edit_mask] [NOLINE]

SHOW
Displays one or more variables or literal on the screen. In addition, cursor control is supported ANSI terminals. Any number of
variables and screen positions can be used in a single command. Each one is processed in sequence. Screen locations can be
indicat3ed by either fixed or relative positions in the format (A,B), where A is the line and B is the column on the screen. A
and/or B can also be numeric variables. Relative [positions depend on where the previous SHOW command ended. The screen
cursor is usually immediately to the right of the previously displayed value and one line down if the line was advanced.

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 (…), CLEAR-SCREEN, 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. Please refer to
pages 248-252 of the SQR4 Language Reference Guide.

Syntax: SHOW [cursor_position]


[CLEAR-SCREEN | CS | CLEAR-LINE | CL] [any_lit | _var | _col]
[EDIT edit_mask] [BOLD] [BLINK] [UNDERLINE] [REVERSE] [NORMAL] [BEEP] [NOLINE] …

21
-S
The –S command line flag requests that the status of all cursors be displayed at the end of the report run. Status includes the text
of each SQL statement, number of times each was compiled and executed, and the total number of rows selected. This
information can be used for debugging SQL statements and enhancing performance and tuning.

-T
During the Development of an SQR program, you frequently test it by running it and examining its output. In many cases, you
are only interested in the first few pages of the report. To speed the cycle of running and viewing a few pages, use the –T
command line flag. The –T flag lets reports finish more quickly because all BEGIN-SELECT ORDER BY clauses are ignored.
The database will not sort the data and the first set of records will be selected sooner. Enter the desired number of test pages after
the –T flag. For example, -T6 will cause the program to stop after 6 pages of output have been created.

NOTE: If you program contains break logic, the breaks may occur in unexpected locations because the ORDER BY clause is
ignored.

#IF / #ELSE / #END-IF or #ENDIF / #IFDEF / #IFNDEF


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 turn on or
off a set of statements, as shown in the following example:

#define DEBUG_SESSION Y

#if DEBUG_SESSION ‘Y’


begin-procedure dump_array
let #i = 0
while #i < #counter
! Get data from the array
get $state $city $name $phone from customer_array (#i)
print $state (,1)
print $city (,7)
print $name (,24)
print $phone (,55)
position (+1)
add 1 to #i
end-while
end-procedure ! dump_array
#end-if

The dump_array procedure is only used for debugging. 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 sensitive. Please refer to pages 147-149 of the SQR4 Language Reference
Guide.

Client Workstation / NT Server


Go to the Process Monitor and double-click on the process that failed. Select the Request Parameter’s tab and then click the
Copy-to-Clipboard button. Paste the contents into Notepad or Wordpad (or an equivalent editor). Delete everything up to and
including the words Command Line = and replace any % variables with their actual values (i.e. %ACCESSPSWD%). Save this
as a .BAT file and run it from DOS (i.e. c:\temp\xrfwin.bat). Use these parameters to test this process as a stand-alone request.
This helps to check for request-related problems versus a problem related to the Process Scheduler.

1998-11-20-13.22.27.000000
Process Instance = 7
Working Directory = C:\Apps\DB\ORACLE7\bin
Command Line = j:\h750ora\sqrbinw\SQRW.EXE j:\h750ora\sqr\XRFWIN H750D20/%ACCESSPSWD%@H750D20
-ij:\h750ora\sqr\ -mj:\h750ora\sqr\allmaxes.max -oc:\temp\sqr.log -ZIFj:\h750ora\sqr\pssqr.ini -XCB -fc:\temp\ 7 PS 1

22
Unix Server
To trace the prcs_sqr shell script, change the first line #!/bin/sh to #!/bin/sh -x in $PS_HOME/bin/prcs_sqr. Process Scheduler
logging is controlled by the LOGFENCE parameter. By default this is set to 5-Highest. Log is sent to the file
ProcessName_ProcessInstance.log. Although with PT7.5.x

OS/390 Server
The PTPSQLRT program allows you to capture SQL trace information. The Process Scheduler program PTPUPRCS runs
program PTPSQLRT and has several parameter settings in the delivered JCL to enable SQL trace and Dynamic Explain traces.
In the //PARMFILE DD * statement in the JCL, PARM 6 must be set to YES (Y) to enable SQL Trace. For example:
//* PARMFILE - PARAMETER 1 IS OPRID - LEAVE AS SYMBOLIC
//* PARAMETER 2 IS PROCESS SCHEDULER SERVER NAME
//* PARAMETER 3 IS A YES/NO SWITCH FOR PERFORMANCE STATISTICS
//* PARAMETER 4 IS PROCESS INSTANCE; 0 TRIGGERS PROC.INSTANCE
//* PARAMETER 5 IS A YES/NO SWITCH FOR DYNAMIC EXPLAINS
//* PARM 5 REQUIRES THAT PARM 3 IS SET TO YES
//* PARAMETER 6 IS A YES/NO SWITCH TO ENABLE PARALLEL PROCESS
//* PARAMETER 7 IS A YES/NO SWITCH TO ENABLE SQL TRACE
//*
//PARMFILE DD *
%OPRID%
PSMVS
N
0
N
N
N
/*
//RPTFILE DD SYSOUT=*
//

The following example provides some sample output that you would see in the active job queue.
PeopleTools 7 Process Scheduler

Copyright (c) 1988-1997 PeopleSoft, Inc.

All Rights Reserved

STATEMENT=PTPUPRCS_S_PRCDTTM
SELECT CURRENT TIMESTAMP FROM PSPRCSLOCK ORDER BY 1
PREPARE SELECT STMT FOR 0002=0002 PTPUPRCS_S_PRCDTTM
VAR LIST=SQLDA-SELECT
SQLD=0001 TYPE=0392 LEN=0026
VAR LIST=SQLDA-BIND
OPEN CURSOR FOR 0002=0002 PTPUPRCS_S_PRCDTTM
FETCH ROW FOR 0002=0002 PTPUPRCS_S_PRCDTTM
CLOSE CURSOR FOR 0002=0002 PTPUPRCS_S_PRCDTTM
STATEMENT CLEARED FOR 0002=0002
CONNECTION DISCONNECTED FOR 0002=0000
1998-02-20 15.01.00 Server Initialization...
1998-02-20 15.01.00Server Initialization...
STATEMENT=PTPUPRCS_U_SETLOCK
UPDATE PSPRCSLOCK SET PRCSLOCK=1
PREPARE UPDATE STMT FOR 0002=0002 PTPUPRCS_U_SETLOCK
VAR LIST=SQLDA-BIND
EXECUTE UPDATE STMT FOR 0002=0002 PTPUPRCS_U_SETLOCK
STATEMENT=PTPUPRCS_S_SVRDEFN
23
SELECT SLEEPTIME, HEARTBEAT, MAXAPIAWARE, MAXAPIUNAWARE, OPSYS, DAYSBEFOREPURGE
:1
PREPARE SELECT STMT FOR 0001=0001 PTPUPRCS_S_SVRDEFN
VAR LIST=SQLDA-SELECT
SQLD=0001 TYPE=0500 LEN=0002
SQLD=0002 TYPE=0500 LEN=0002
SQLD=0003 TYPE=0500 LEN=0002
SQLD=0004 TYPE=0500 LEN=0002
SQLD=0005 TYPE=0452 LEN=0001
SQLD=0006 TYPE=0500 LEN=0002
VAR LIST=SQLDA-BIND
SQLD=0001 TYPE=0452 LEN=0005 DATA=PSMVS
OPEN CURSOR FOR 0001=0001 PTPUPRCS_S_SVRDEFN
FETCH ROW FOR 0001=0001 PTPUPRCS_S_SVRDEFN
STATEMENT=PTPUPRCS_S_SVRSTAT
CLOSE CURSOR FOR 0001=0001 PTPUPRCS_S_SVRDEFN
SELECT LASTUPDDTTM, BEGINDTTM, SERVERACTION, SERVERSTATUS FROM PSSERVERSTAT WHE
PREPARE SELECT STMT FOR 0001=0001 PTPUPRCS_S_SVRSTAT
VAR LIST=SQLDA-SELECT
SQLD=0001 TYPE=0393 LEN=0026
SQLD=0002 TYPE=0393 LEN=0026
SQLD=0003 TYPE=0500 LEN=0002
SQLD=0004 TYPE=0500 LEN=0002
VAR LIST=SQLDA-BIND
SQLD=0001 TYPE=0452 LEN=0005 DATA=PSMVS
OPEN CURSOR FOR 0001=0001 PTPUPRCS_S_SVRSTAT
FETCH ROW FOR 0001=0001 PTPUPRCS_S_SVRSTAT
STATEMENT=PTPUPRCS_U_SVRSTAT
UPDATE PSSERVERSTAT SET SERVERSTATUS = :1, SERVERACTION = :2 ,LASTUPDDTTM = CUR
TIMESTAMP WHERE SERVERNAME = :3
PREPARE UPDATE STMT FOR 0003=0003 PTPUPRCS_U_SVRSTAT
VAR LIST=SQLDA-BIND
SQLD=0001 TYPE=0500 LEN=0002 DATA=0003
SQLD=0002 TYPE=0500 LEN=0002 DATA=0000
SQLD=0003 TYPE=0452 LEN=0005 DATA=PSMVS
EXECUTE UPDATE STMT FOR 0003=0003 PTPUPRCS_U_SVRSTAT
STATEMENT CLEARED FOR 0003=0003
STATEMENT CLEARED FOR 0002=0002
STATEMENT CLEARED FOR 0001=0001 PTPUPRCS_S_SVRSTAT
RUN UNIT COMMITTED
1998-02-20 15.01.00 Server Initialization Complete

Confirm that the DB2 plan for PTPSQLRT is bound to the correct database. JCL member PSBNDADD in HLQ.PPVVV.JCLLIB
is used to bind the plan for PTPSQLRT. The Process Scheduler job on the mainframe server executes a program and a DB2 plan:
//SYSTSIN DD *
DSN SYSTEM (DSNT) RETRY(1) TEST(0)
RUN PROGRAM (PTPUPRCS) -
PLAN (PT750TM)
END
The OWNER and QUALIFIER parameters in PSBNDADD should equal the owner of the tables for the database that PTPUPRCS
is running on (i.e. OWNER (PT750TM), QUALIFIER (PT750TM)). The database that the Process Scheduler runs against is
determined by the bind parameters used to bind the DB2 plan for PTPSQLRT.

VMS Server
Edit the PSTOOLS.INI file to turn on trace and restart the Process Scheduler Server Agent. By default the output of the SQL
logging will be sent to the null device (NL:). To send the output to a file, add a valid filename to the platform definition

24
parameter list. The command file PS_BIN:PRCS_BAT will check for the presence of a value and define the logical DYSQLLOG
to it.

AS/400 Server
Shut down the Process Scheduler Server, if running, before you start to debug it using the Debug utilities provided with the
AS/400.
Note: You may need to recreate the objects using the PSCRTOBJ command with the Create debuggable objects option set to
*YES. This step is required if you originally created the objects with the option set to *NO.
You may also increase the Sleep Time and Heartbeat parameters from the on-line menu to make debugging easier. Remember to
rest the values when you are done with the debugging.

Common SQR errors when running SQR from the SQRW shortcut.
SQR 00001 Error while opening the message file Sqrerr.dat
Reason/ Resolution:
1) Sqrerr.dat file is not in the SQRBINW directory or corrupt. Reload it from the CD.
2) SQRDIR environment variable in the SQR.INI or PSSQR.INI file under the [Environment: <DB type>] section, is not
pointing to the correct directory:
E.g.: SQRDIR=H:\PS700\sqrbinw (It should point to the directory where the SQRW.EXE or the SQRERR.DAT file
resides.) The SQR.INI file resides under the C:\WINDOWS or C:\WINNT directory. The –ZIF flag points the
PSSQR.INI file.
On NT, you may define the SQRDIR in the Control Panel – System - Environment.
If receiving this error message on the UNIX Server, then check the directory where the SQRDIR points and look for the
SQRERR.DAT file. If it is not there, then copy it from the SQR Server CD. If it is there, then check if it has any data. If
it does, then perhaps it has become corrupted, so reload it. Also make sure that the SQRDIR is pointing to the
<sqr_install>/bin directory or the directory where the SQRERR.DAT file resides on the UNIX box.

SQR 00006 Corrupt message file: invalid count


Reason/ Resolution:
1) The environment variable SQRDIR is not set correctly. It should point to the directory where the SQRW.EXE resides. It
should be defined in the SQR.INI file for SQR3 and the PSSQR.INI file for SQR4 under the [Environment: <DB type>]
section. The SQR.INI file resides under the C:\Windows or C:\Winnt directory. The –ZIF flag points to the PSSQR.INI file.
On an NT Workstation, you can also set this variable under Control Panel - System – Environment.
E.g. SQRDIR=H:\PS701\SQRBINW

2) Sqrerr.dat is corrupted. Reload it from the CD.

NOTE: If running through the Process Scheduler, make sure that SQRBIN is also set correctly and should be pointing to the
directory where the SQRW.EXE resides. (SQRBIN is defined in the Configuration Manager, Process Scheduler tab).

If this error comes up on running SQR on UNIX, check the SQRDIR environment variable defined in the PSCONFIG.SH file.
It should point to the <sqr_install>/bin directory or the directory where the SQRERR.DAT resides.

SQR 00014 The required environment variable hasn’t been defined.


Reason/ Resolution:
25
The environment variable SQRDIR is not set correctly. It should point to the directory where the SQRW.EXE resides. It
should be defined in the SQR.INI file for SQR3 and the PSSQR.INI file for SQR4 under the [Environment: <DB type>]
section. On an NT Workstation, you can also set this variable under Control Panel - System – Environment. The SQR.INI file
resides under the C:\WINDOWS or C:\WINNT directory. The –ZIF flag points the PSSQR.INI file.
E.g. SQRDIR=H:\PS701\SQRBINW

SQR 001803 Connect failed. Perhaps username/password incorrect


Reason/ Resolution:
1) Occasionally the SQRW version that is installed is not the right version for the Database Platform. To test if you have the
right version of SQRW for your Database Platform, open the SQRW window and click on the About button, the window below
will pop-up and you can check if you have the correct version of SQRW for your database platform. If it is not the right one,
then download the correct one from the CD.

Eg: ORACLE

This shows that it is for Oracle.


For Example: If your database platform is Oracle and in the SQRW window, you have an entry for ODBC Data Source, you
have installed an incorrect SQRW version. The best way to recover would be to get the Tools CD, re-run setup.exe and install
SQRW ONLY.

2) If you receive this error running SQRs in Three-Tier, perhaps you do not have the database drivers installed. Even though
you logon in three-tier, SQR essentially still runs in two-tier. SQR requires direct database connectivity; therefore, the Client
Database Connectivity programs files (database drivers) needs to be installed on the Workstation or a local File Server.

3) You can ignore the version numbers, as long as the Database and Hardware are correct. (See FAQs section -- Why are the
RDBMS/OS versions on the SQR Server CDs different than what was ordered?)

SQR 04700 Cannot open the program file <filename>


Reason/ Resolution:
1) The SQR Report is not located in the directory which is provided in the Report Name field;
2) The user does not have read access to the directory where the SQR Report resides;
3) The SQR does not exist in the directories pointed to by PSSQR1, PSSQR2, PSSQR3, and PSSQR4
Copy the SQR to the directories pointed to by SQR Search Path (PSSQR1, PSSQR2, PSSQR3, and PSSQR4) in the
Configuration Manager, Process Scheduler tab.

SQR 04701 Can’t logon to the database.


Reason/ Resolution:
1) Database server might be unavailable. Can check the connectivity by logging on to the Database using any SQL TOOL.
(E.g.: SQL*Plus in Oracle, SQLTalk in SQLBase etc.)
2) The path in the -i report argument for SQRFLAGS should end with a trailing backslash, “\”. (E.g.: -in:\hr600\psuser\srq\)
3) SQRW shortcut should be pointing to the directory where the connectivity programs of the Database reside. (Eg:
c:\apps\db\orawin95\bin) It is also the directory where the SQL TOOL like SQL*Plus or SQLTalk reside.
4) The Oracle\Bin directory or the Working Directory (Start In) should be included in the MS-DOS PATH (Autoexec.bat).
26
5) Check the Process Types => SQR Parameters => Check the SQR Connect String and make sure it is in the right order:
E.g. %%ACCESSID%%/%%ACCESSPSWD%%@%%DBNAME%% for Oracle
6) Possibly missing some DLLs from the Database Connectivity program files (database drivers) directory; therefore, you
may want to re-install SQL*NET.
7) The Environment Variable DBBIN, defined in the Configuration Manager, Process Scheduler tab should be pointing to the
directory where the connectivity programs of the Database reside.
8) You may also add the following in the SQR.INI file (SQR 3.x) or the PSSQR.INI file (SQR 4.x) under the section
[Environment:Oracle]
ORACLE_DLL = ORA804.dll - > filename will depend upon the appropriate Oracle release.

SQR 04713 Can’t Open the #include file < filename.sqc>


Reason/ Resolution:
1) The -i report argument for SQRFLAGS is not pointing to the directory where the SQCs reside. Make sure that if there are
multiple paths for the -i report argument that they are separated by a semicolon (;).
E.g.: -Ic:\user\sqr\;n:\hr701\sqr\;n:\user\sqr\;n:\pt701\sqr\
2) The path in the -i report argument for SQRFLAGS should end with a trailing backslash, “\”. Eg: -iN:\HR600\SQR\
(forward slash “/ “ for Unix, backslash “\ “ for Windows)
1) Make sure that the Process Type for SQR Reports (the SQR Parms) passes the %PSSQRFLAGS% environment
variable for the SQR Flags.
4) Check the Configuration Manager, Process Scheduler tab (PSSQRFLAGS) to make sure the paths specified by the –i flag are
correct.

SQR 04717 Cannot open the report output file


Reason/ Resolution:
• Beginning with SQRW version 3.x onwards, we recommend customers not to define the -f report argument for
SQRFLAGS, to run the SQRs from the shortcut/icon we need to explicitly define the -f at the command line.
1) To send output to a file have the -f report argument point to the directory where you wish the output to reside. You need to
have write access to the directory. SQR generates a REPORTNAME.LIS by default. You just have to provide the name of the
directory.
E.g.: C:\TEMP\ (Don't forget the “\” at the end of the directory)
2) The Output Destination provided in the File/Printer box on the Process Scheduler Request panel is incorrect. It should be set
to “C:\TEMP\” or “%temp%\”, or /tmp/ for Unix. Whenever specifying a directory include the trailing slash.
3) If directing the output to the printer, make sure that LPT1 is captured. (E.g.: -fLPT1) Please refer to the SQR Printing
section.
4) Check the Process Profile for the Class of Users that is having trouble under Security Administrator. Under Allow Requestor
to, Override Output Dest should be checked.

SQR 05703 Error opening the SQR log file SQR.LOG


Reason/ Resolution:
1) The -o report argument for SQR Flags has not been defined. This should be defined in the SQR.INI file under the
[Environment: <DB type>] section. It should point to the directory and the name of the log file. (E.g.: -oC:\TEMP\SQR.LOG)
If this error is encountered while running the SQR through Process Scheduler, then the -o flag can be defined in the
Configuration Manager, Process Scheduler tab under PSSQRFLAGS
2) User may not have write access to the directory where the SQR.LOG file is being created.

Unable to initiate process type (process name) (report name) WIN32 error 267 message = directory name invalid
(65,37)
Error: "Unable to initiate process. Type SQR report request <name> win32 error 0. Message = The operation completed
successfully (65,37).
1) Check the environment variable DBBIN in the Configuration Manager, Process Scheduler tab. It should point to the
directory where the Database Connectivity Program files (Database Drivers) reside. (E.g. SQL*Net; SQLTalk; etc.)
2) Correct the Command Line or Working Directory for the Process Type, if incorrect.
3) Check whether the SQRW.EXE is in the directory where the SQRDIR and/or SQRBIN are pointing.
4) If your process writes data to a particular drive, check whether you have WRITE permission.
5) Add the path to the Database Connectivity Program files (Database Drivers) to the DOS PATH (autoexec.bat).

27
Can’t print SQRs on the Unix printer
Explanation: Let’s first understand how SQRs are printed on the Unix server. The prcs_sqr shell script kicks off the SQR
program to create a (.LIS) file which is then printed using the ‘lp” command.
Cause: lp command is not set correctly.
Action: Contact you UNIX System Administrator for lp settings. (See SQR Printing Section)

Unknown flag on command line: -d printing SQRs on Unix


Explanation: Printing SQRs on the Unix server involves two steps.
1. The prcs_sqr shell script first creates a report file
2. The depending on the flag this file is printed using the lp command
Action: To print an SQR on the Unix server, in the File/Printer field on the Process Scheduler Request, enter a directory name
where the file needs to be created temporarily followed by the +P flag. The prcs_sqr shell script uses this flag to identify that the
SQR report needs to be printed. It will print to the default print queue. If you need to specify a printer use the
-dprint_queuename (See SQR Printing section)
E.g.: /tmp/ +P-dprint_queuename

PRCS_SQR[234] : sqr : not found


Error:
PeopleSoft prcs_sqr Started
Process instance is 2923
SQR Output file is /tmp/fin0008_2923.lis
prcs_sqr: sqr: not found
prcs_sqr: ------------------- Error -------------------
prcs_sqr: Command failure
prcs_sqr: SQR Command Terminated abnormally
prcs_sqr: Return code : 1
prcs_sqr: ------------------- Error -------------------

Cause: The SQR executable is either not installed on the Unix system or the SQRDIR is not defined and included in the PATH.
Action: The SQRDIR environment variable is set in the psconfig.sh file. Whenever you set any environment variables remember
to export the values. Since the Process Scheduler Server Agent reads all of the environment variables during start-up, you will
have to restart it whenever you change any of these environment variables.

Cause: SQRDIR set and exported, but when adding it to the PATH an extra colon (:) is added
E.g.: PATH=$PATH:$SQRDIR:; export PATH.
Action: Removed the extra colon (:) after the SQRDIR.
E.g. with the correct format : PATH=$PATH:$SQRDIR ; export PATH

Cause: SQR executables are not installed on UNIX.


Action: Install the SQR executables and re-link if appropriate.

SQR prompts for Oprid and RunCntlid when run through the Process Scheduler
Cause: The SQR program code has been written for the Process Type “SQR Report” but the Process Definition is “SQR
Process”. The Process Type “SQR Process” requires only %%INSTANCE%% as the SQR Run Cntl Parms while “SQR Report”
uses %%INSTANCE%%, %%OPRID%% and %%RUNCNTLID%%. Since the SQR Report is written to input, for instance,
oprid and runcntlid, and the only value supplied through the command line is instance, the program prompts you for the
remaining values.
Action: Provide the right SQR Run Cntl Parms in Process Type.

SQRW / Informix - String to Date conversion error


Cause: Date/Time settings are incorrect.
Action: Set DbDate to Y4MD and DbTime to %Y-%m-%d %H:%M:%S.%F3 in SetNet.
28
For Unix, this is defined in the psconfig.sh file.
For the Client Workstation and NT Server, this is defined within SetNet32.

ScheduleProcess: Attempt to start client process failed. Return Code: 00014.


Cause: The word “client” in the message is misleading. Basically this error is caused when the specified process is cannot be
started. Please check the path of the process.
Action: Correct the path of the process if incorrect. On UNIX, the search for files is performed using PATH. Either include the
directory containing the process in the PATH or provide an absolute path to the process. The shell scripts prcs_sqr and prcs_bat,
on UNIX, require a command file that is created to contain information to run a process. If the Process Scheduler is unable to
create these command files, you may get this error.

Common Causes for JCL errors on the mainframe


Incorrect value for the ‘%OUTDEST%’ substitution variable in the OS/390 SHELL JCL members. If the output destination is
File then this value must be the first two qualifiers for the output dataset on the mainframe. If the output destination is Printer
then this value must be your desired OS/390 Printer Destination. (E.g.; DEST=U3)
In the SHELL JCL for COBOL and Application Engine, ‘OUTNODE’ denotes a sequential report file. If a COBOL process,
such as PTPTEDIT were directed to File output, the following substitution would occur for the following line in SHELCBLF

// OUTNODE='%OUTDEST%.%PRCSNAME%', OPTIONAL:USER-DEF
would be changed to:
// OUTNODE='PT.PT750TM.PTPTEDIT', OPTIONAL:USER-DEF
In the SHELL JCL for SQR, ‘OUTNODE’ denotes an OS/390 Partitioned Data set (PDS). The PDS is a requirement for SQR
output. If the SQR report XRFPANEL were directed to File output, the following substitution would occur in the following line
in SHELSQRF:
// OUTNODE='%OUTDEST%.SQRLIST', OPTIONAL:USER-DEF OUTPUT
would be changed to:
// OUTNODE='PT.PT750TM.SQRLIST', OPTIONAL:USER-DEF OUTPUT
Missing information in the OS/390 job control information (See the section titled OS/390 Job Controls) will result in JCL errors.
For example, if the OS/390 job name is missing for the operator id or class then jobs submitted on the mainframe will have a job
name of one character in length (i.e. ‘A’ - ‘K’).

Frequently Asked Questions


Is it possible to run the SQR on the client in the 3 Tier Mode?

SQR does not understand the concept of Three-Tier Architecture. All it knows is that it requires direct database connectivity in
order to run. So, even though you may be logged on to PeopleSoft in Three-Tier, SQR is really being run in Two-Tier. It
does not run through the Application Server. The Database Drivers (Client Connectivity Program files) must be installed
directly on the Client Workstation or from a File Server

Eg: Need SQL*NET on the client if running the SQR against an Oracle Database.

For more information, please refer to the Three-Tier Answer Book on Customer Connection under News and Information ---
Installation Communication.

Is it possible to run SQRW for two different Platforms from the same machine without changing the SQR.INI
or PSSQR.INI every time or is it possible to run two different versions of SQRW from the same machine?

Yes, in the SQR.INI or PSSQR.INI there are [Environment : <DB type>] section for each Platform type and you can define the
SQRDIR for each of them. When SQR is launched, it would pick the value for the SQRDIR environment for the DB type.

E.g.: [Environment:Oracle] [Environment:SQLBase]


SQRDIR=R:\pt601ora\sqrbinw SQRDIR=R:\pt700sbs\sqrbinw
29
If you want to switch between versions of SQRW, you can change the SQRDIR variable to point to the directory containing the
sqrw.exe. You may also copy the SQR.INI or PSSQR.INI into the directory where the SQRW.exe resides and then define the
SQRDIR for each version. This will force the system to look at the SQR.INI or PSSQR.INI in the directory where the executables
resides instead of C:\WINDOWS or C:\WINNT. For customers using SQR4, the –ZIF flag points to the file PSSQR.INI.

In case of PT7, the SQR.INI resides in the SETUP directory also, so you may make use of these instead of copying the SQR.INI
to the SQRBINW. Just make sure that if you want the system to pick up the SQR.INI from, the SETUP directory that you don't
have one in the C:\WINDOWS or C:\WINNT and there is no SQRDIR defined in the System Environments in case of NT
machine.

How are the Process Instance, Operator ID and Run Control ID read by SQRs?
Ever tried running SQRs off the SQRW shortcut or the Unix or VMS prompt?
Please press ENTER (Do not input a value):
Wondered why you get this prompt? Most of the PeopleSoft delivered SQRs are written so that they can be run from as well as
outside the Process Scheduler. All these SQRs use the procedure Get-Run-Control-Parms defined in PRCSAPI.SQC. This is
how the procedure would look like:
Begin-Procedure Get-Run-Control-Parms
Input $prcs_process_instance ‘Please press ENTER (Do not input a value)’
if not isnull($prcs_process_instance)
let #prcs_process_instance = to_number($prcs_process_instance)
Input $prcs_oprid ‘Please press ENTER (Do not input a value)’
let $prcs_oprid = upper($prcs_oprid)
Input $prcs_run_cntl_id ‘Please press ENTER (Do not input a value)’
else
let #prcs_process_instance = 0
end-if
if #prcs_process_instance > 0
let #prcs_run_status = #prcs_run_status_processing
do Update-Prcs-Run-Status
let #prcs_run_status = #prcs_run_status_successful
end-if
end-procedure

The 3 input commands correspond to the 3 values send at the command line namely %%INSTANCE%% %%OPRID%% %
%RUNCNTLID%%. When we run the SQR from SQRW and do not input any value the SQR interprets as being run outside the
Process Scheduler and hence will input us for the other input parameters otherwise being sent through the Run Control Tables.

Process Monitor options are greyed out in Operator Profile.


The Process Monitor is not accessible for that operator class. Add Process Monitor to the list of available menus through Operator
Security.

Can you have multiple SQR Search Paths on Unix?


Yes! Beginning with PT7.5, with the introduction of PSADMIN, you can now have multiple SQR Search Paths on Unix.

[Process Scheduler]
;=========================================================================
; General settings for the Process Scheduler
;=========================================================================
LogFence=0
ProgramName=PSRUN PTPUPRCS
30
PrcsServerName=PSUNX
PSSQR1=%PS_HOME%/sqr
PSSQR2=
PSSQR3=
PSSQR4=
PSSQRFLAGS=-i%PSSQR1%/,%PSSQR2%/,%PSSQR3%/,%PSSQR4%/ -m%PSSQR1%/allmaxes.max -ZI
F%PSSQR1%/pssqr.unx
Log Directory=%PS_SERVDIR%/logs
OutputDirectory=%PS_SERVDIR%/output/

Why are the RDBMS/OS versions on the SQR Server CDs different than what was ordered?
The main concern occurs after the SQR License Code/Key is entered. Customers and Installers are seeing what they believe to be
improper versions of the SQR product. As long as the Database and Hardware are correct, you can ignore the version numbers.
For Example: For SQR v4.2.3, the version text that pops up for Sun/Oracle is SQR Server - 4.2.3 / SunOS - 5.5.1 / Oracle 7.2.3.
The only part that is important is SunOS and Oracle. There is not a separate version for Sun Solaris 2.51 (SunOS 5.51) or 2.6
(SunOS 5.6), nor is there a separate version for Oracle 7.3.4 or 8.0.4. The CD that has been delivered by PeopleSoft has been
certified against all of PeopleSoft's certified Server configurations. The same rule applies for the SQR delivered on the
PeopleTools CD, you can ignore the version number.

Do you need to re-link SQR? Where the database version does matter is in the decision on whether to re-link or not. In the case
mentioned above, re-linking will be necessary if the Oracle version is newer that 7.2.3. See the Install Guides for how to re-link.
Re-Linking is required on Oracle if the Database version is newer than the one used to build the product. Re-linking for Informix
and Sybase Platforms is optional. Our experience has been that re-linking is not required on Informix and Sybase. If SQR does
not start, try re-linking. This is the same process that has been required for SQR3 installs.

Tips to Printing Graphics


1) Make sure the SQR uses our delivered SETUP31.SQC (portrait) or SETUP32.SQCs (landscape)
2) Make sure to include the USEPRNTR.SQC and that the line use-printer-type {PRINTER_TYPE} is Uncommented within
this SQC. Don’t forget to call the procedure Init_Printer from within the SQR.
3) Make sure the PRINTER_TYPE defined within the SETENV.SQC is set to HPLaserjet or Declare the printer from with the
SQR (i.e. Declare-Printer
Type=HPLaserjet
End-Declare
4) To direct the output to a printer, use the –PRINTER:WP flag. On the Process Scheduler Request panel under the Output
Destination, choose Printer. In the file/printer box type: c:\temp\ -printer:wp. This will force SQR to print to the default
Windows printer. To use -printer:wp, LPT1 must be mapped to a printer.

SQR COMMAND LINE FLAGS


Each flag begins with a dash (-). Flags with arguments must be followed immediately by the argument with no intervening space.
This does not represent a complete list – only the most commonly used. Please refer to the SQR4 Language Reference Guide.

-A Causes the output to be appended to an existing output file of the same name. If the file does not exist, a new one is
created. This is useful when you want to run the same report more than once but only want to create a single
output file.

-Bnn (ODBC, Oracle, SYBASE CT-Lib) Indicates the number of rows to buffer each time data is retrieved from the database.
The default is 10 rows. Additional memory is required to buffer more rows. You can enhance performance by
using additional memory to buffer more rows. Regardless of the setting, all rows are retrieved. When used on the
command line, -B controls the setting for all BEGIN-SELECT commands. Within a program, each BEGIN-
SELECT command may also have its own -B flag for further optimization.

31
-BURST:{xx} Specifies the type of bursting to be performed.
-BURST:T generates the Table of Contents file only.
-BURST:S generates the report output according to the symbolic Table of Contents entries set in the program with
the TOC-ENTRY command’s "level" argument. In -BURST:S[ {l} ], {l} is the level at which to burst upon. The
setting -BURST:S is equivalent to -BURST:S1.
-BURST:P generates the report output by report page numbers. In -BURST:P[ {l} , {s} [, {s}] …] ] , {l} is the
number of logical report pages that each .HTM file will contain and {s} is the page selection: {n}, {n}-{m}, -{m},
or {n}-. The setting -BURST:P is equivalent to -BURST:P0,1- when using -PRINTER:HT or -BURST:P1 when
using
-PRINTER:EH. Note: -BURST:P and -BURST:S require -PRINTER:EH or -PRINTER:HT. The Page range
selection feature of -BURST:P requires -PRINTER:HT. -BURST:T requires -PRINTER:HT

-C (Windows) Specifies that the Cancel dialog box appears while the program is running so you can easily terminate the
program execution.

-CB (Windows, Callable SQR) Forces the communication box to be used.

-Dnn (non-Windows) Causes SQR to display the report output on the terminal at the same time it is being written to the output
file. nn is the maximum number of lines to display before pausing. If no number is entered after -D, the display
will scroll continuously. The printer type must be LP or the display is ignored. If the program is producing more
than one report, the display is for the first report only.

-DBdatabase (SYBASE) Causes the SQR program to use the specified database, overriding any USE command in the SQR
program.

-DEBUG[xxx] Causes lines preceded by #DEBUG to be compiled. Without this flag, these lines are ignored. See the SQR
Command #DEBUG for more information.

-DNT: xx} Specifies the default behavior for numeric variables. The value for xx can be INTEGER, FLOAT, DECIMAL, or
V30. To specify a precision for DECIMAL, append it with a colon delimiter (:)—for example,
-DNT:DECIMAL:20. See the DEFAULT argument for DECLARE-VARIABLE for a detailed explanation. The
DEFAULT argument in the DECLARE-VARIABLE command will take precedence, if used.

-E[file] Causes error messages to be directed to the named file, or to the default file program.err. If no errors occur, no file
is created.

-EH_CSV Generate a report}.csv file from the report data. Note: This flag is only applicable when the -PRINTER:EH flag is
specified.

-EH_CSV:file Associate the CSV icon with the specified file. Note: This flag is only applicable when the -PRINTER:EH flag is
specified.

-EH_Icons:dir Specifies the directory where the HTML should look for the referenced icons. Note: This flag is only applicable
when the -PRINTER:EH flag is specified.

-EH_Scale:{nn}Sets the scaling factor from 50 to 200. Note: This flag is only applicable when the -PRINTER:EH flag is
specified.
-F[library| file(member)] (AS/400) Overrides the default output file name library/lis(program). The default action places
the lis in a source file called lis in the same library as the member program}. To use the current library, specify -F without an
argument. To change the name of the output file, specify -F with the new name. If the new name does not specify a library, the
file will be created in the current library. The output file is not created until data is actually printed on the page. If no data is
printed, no output file will be created. To specify an alternate filename: -FSQRDIR/LIS(file)

-F[file | directory] Overrides the default output file name, program.lis. The default action places the program.lis in the same
directory as the program.sqr file. To use the current directory, specify -F without an argument. To change the
name of the output file, specify -F with the new name. If the new name does not specify a directory, the file will
be created in the current directory. The output file is not created until data is actually printed on the page. If no
data is printed, no output file will be created.
The following table shows how to specify the file name and directory for different operating systems.
Operating Directory Example
System Character
VMS ] or : -FSYS$USER:[REPORTS] or
-FSYS$SCRATCH:
UNIX / -F$HOME/reports/
32
Prime/Stratus > -Freports>
OS/390 ( -FDSN:SQR.REPORTS(

-Gfile_mode (VM) Specifies the file mode to use when the report output file is created. See the VM C Library manual,
"afopen" function, for a complete description of all the valid keywords and values.

-Gfile_attributes (VMS, OpenVMS) Specifies the file attributes to use when the report output file is created. Up to 10 sets
of attributes may be specified, separated by commas (,). See the VAX C Library manual, "create" function, for a
complete description of all the valid keywords and values.

-GPRINT=YES | NO (OS/390) -GPRINT=YES causes SQR’s report output file to have ANSI control
characters written to the first column of each record of the file. -GPRINT=NO causes the control
characters to be omitted.

-Idir_list Specifies the list of directories that SQR will search when processing the #INCLUDE directive if the include file
does not exist in the current directory and no path was specified for the file. The directory names must be
separated by either commas (,) or semicolons (;). For UNIX-based systems, if your shell uses semicolons as
command delimiters, you must precede each semicolon with a backslash (\). Always append the directory
character to the end of each directory name. See the -F flag for a list of directory characters by operating system.
For example, under UNIX: sqr myreport sammy/baker -I/home/sqr/inc/,/usr/sqr/incl/

-ID (non-Windows) Causes the copyright banner to be displayed on the console.

-KEEP Creates .SPF file output in addition to .LIS files, for each report that your program generates.

-LLs | d}{c | i} LOAD-LOOKUP: s = SQR, d = DB, c = case-sensitive, i = case-insensitive See the LOAD-LOOKUP
command.

-LOCK
{RR | CS | RO | RL | XX} (SQLBase) Defines the types of locking (isolation level) for the session. See the SQLBase
manual for a full explanation of the different isolation levels. See also the BEGIN-SELECT Command.

-Mfile Defines a startup file containing sizes to be assigned to various internal parameters for extra small or large or
complex reports.

-NOLIS Prevents the creation of .LIS files. Instead, .SPF files are created.

-NR (SQLBase) Specifies that the No Recovery mode is used when connecting to the database.

-O[file] Directs log messages to the specified file or to program.log if no file is specified. By default, the file sqr.log is
used in the current working directory.

-P (OS/390, AS/400) Suppresses printer control characters from column 1.

-PB (Informix) Causes column data to retain trailing blanks.

-Proleid[/rolepass] (Ingres) The role identifier used to associate permissions with SQR.

-PRINTER:xx Causes printer type xx to be used when creating output files.


xx Printer Type Example
EH Enhanced HTML -PRINTER:EH
HP HP LaserJet -PRINTER:HP
HT HTML -PRINTER:HT
LP Line Printer -PRINTER:LP
PS PostScript -PRINTER:PS
WP Windows -PRINTER:WP
Types LP, HP, and PS produce files with the .LIS extension. Types EH and HT produce .htm file output. Type HT
produces version 2.0 HTML files with the report content inside of <PRE></PRE> tags. Type EH produces reports
in which content is fully formatted with version 3.0 or 3.2 HTML tags. On Windows systems, the WP extension
sends the output to the printer. If you also want to create an .SPF file, use -KEEP.

33
-RS Saves the program in a run-time file. The program is scanned and checked for correct syntax. Queries are validated. Then,
the executable version is saved in a file with the name program.sqt. Note that ASK variables are not prompted for
after compilation.

-RT Uses the run-time file saved with the -RS flag. All syntax and query checking is skipped and processing begins
immediately. Note that ASK variables are not prompted for after compilation.

-S Requests that the status of all cursors be displayed at the end of the report run. Status includes the text of each SQL
statement, number of times each was compiled and executed, and the total number of rows selected. This
information can be used for debugging SQL statements and enhancing performance and tuning.

-SORTnn (SQLBase) Specifies the size of the sort buffer in characters.

-Tnn Specifies that you want to test your report for nn pages. All ORDER BY clauses in SELECT statements are ignored to save
time during testing. If the program is producing more than one report,
SQR stops after the specified number of pages defined for the first report have been output.

-T{B} (AS400/DB2, SYBASE CT-Lib, ODBC) Trims trailing blanks from database character columns.
(OS390/DB2) Prevents SQR from removing trailing blanks from database character columns.
-T{B|Z|BZ|ZB} (OS390/DB2) -TB prevents SQR from removing trailing blanks from database character columns. -TZ
prevents SQR from removing trailing zeros from the decimal portion of numeric columns. -TBZ
or -TZB prevents both.
(AS400/DB2) -TB trims trailing blanks from database character columns. -TZ prevents SQR from removing
trailing zeros from the decimal portion of numeric columns. -TBZ or -TZB is legal.

-Uusername (Ingres) Specifies the user name. This overrides the user name specified in the connectivity string.

-Vserver (SYBASE) Uses the named server.

-XB (non-Windows) Suppresses the SQR banner and the "SQR... End of Run" message.

-XC (Callable SQR) Suppresses the database commit when the report has finished running.

-XCB (Windows) Do not use the communication box. Requests for input will be made in Windows dialog boxes.

-XL Prevents SQR from logging on to the database. Programs run in this mode cannot contain any SQL statements. -XL lets
you run SQR without accessing the database. You still must supply at least an empty slash (/) on the command
line as a placeholder for the connectivity information. For example: sqr myprog / -xl

-XMB (Windows) Disables the error message display so that a program can be run without interruption by error message
boxes. Error messages will only be sent to an .err file. See the -E flag for more information.
-XNAV Prevents SQR from creating the ’Navigation Bar’ in .HTM files generated with -PRINTER:HT. This will occur
when only a single. HTM file is produced. Multiple .HTM files generated from a single report will always contain
the ’Navigation Bar’.

-XP (SYBASE) Prevents SQR from creating temporary stored procedures. See the BEGIN-SELECT Command for more
information.

-XTB Preserves the trailing blanks in an .LIS file at the end of a line.

-XTOC Prevents SQR from generating the Table of Contents for the report. This flag is ignored when either
-PRINTER:EH or -PRINTER:HT is also specified.

-ZIFfile} Sets the full path and name of the SQR initialization file, PSSQR.INI.

-ZIV Invokes the SPF Viewer after generating program.spf file. This flag implicitly invokes the -KEEP flag to create
program.spf. In case of multiple output files, only the first report file will be passed to the Viewer.

-ZMFfile} Specifies the full path and name of the SQR error message file, sqrerr.dat.

34

Vous aimerez peut-être aussi