Académique Documents
Professionnel Documents
Culture Documents
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.
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.
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
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.
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.
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.
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.
7
Record(s) : PS_PRCSDEFN
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.
9
Process Scheduler, Job Definitions, Panel and Process Groups
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.
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.
• 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.
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.
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:
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
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.
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.
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.)
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.
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
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.
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:
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
#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:
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.
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.
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.
#define DEBUG_SESSION Y
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.
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
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.
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.
Eg: ORACLE
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?)
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)
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
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.
// 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’).
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.
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 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.
-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.
-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/
-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.
-Proleid[/rolepass] (Ingres) The role identifier used to associate permissions with SQR.
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.
-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.
-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