Administering SQR for z/OS

This section provides an overview of SQR on z/OS and discusses how to run SQRs outside of Process Scheduler and specify the input and the output files.

The SQR product is available for z/OS server platforms. The z/OS version of SQR is compatible with your existing SQR reports that you currently run from your client machines. All SQL is dynamic, therefore no precompiling is necessary for running SQRs.

You can run SQRs on z/OS by submitting them manually using your own JCL.

SQR for z/OS is delivered with the PeopleTools installation. The PeopleSoft 9.2 Application Installation guide for Db2 for z/OS includes instructions for performing the installation of SQR on the z/OS server. SQR must be installed prior to running PeopleSoft SQRs on the z/OS server.

Allow at least 12 cylinders of 3390 DASD or equivalent disk space to complete the installation.

These run time parameters are supplied to SQRs initiated by the Process Scheduler.

  • PROCESS_INSTANCE

  • OPRID

  • RUN_CNTL_ID (required by specific applications only, such as Financials)

For an SQR submitted as a traditional z/OS batch job, two run time parameters are required, but it is not necessary to pass any specific values. It is only necessary to include a blank line for each parameter in the JCL specified in the SYSIN DD. The appropriate segment of the JCL is shown below:

//SQRNAME  EXEC  SQRPROC,SQRID=SQRNAME
//SQR.SYSIN  DD  *
 
 

/*

Sample SQR JCL is provided in HLQ.PPVVV.JCLLIB(SQRSAMP).

Input and output files are required by SQR when using commands such as OPEN and NEW-REPORT. Remember to consult the appropriate PeopleSoft application documentation for important application specific information concerning SQR for z/OS. For instance, Accounts Payable naming conventions used to build DD names are discussed in the PeopleSoft FSCM: Payables product documentation.

There are two ways to specify input and output files in SQR for z/OS:

  • Add DD statements to the JCL.

    This method allows you to maintain a common set of SQR that can run on any operating system by modifying your JCL.

  • Add a DSN style file name to the SQR.

    This method alleviates the need to modify JCL, but creates a z/OS operating system specific SQR, because file names specified in this manner are hard-coded directly into the SQR source code.

Use the first method if your SQR should run on any operating system. Use the second method if your SQR runs only on the z/OS operating system and you do not anticipate the need to change file names. Also, always use the DD statement method when indicated in PeopleSoft application-specific documentation.

Adding DD Statements to the JCL

You may specify a file name for commands such as OPEN and NEW-REPORT using DOS or UNIX file naming conventions. The SQR for z/OS documentation states that SQR will use up to 8 alpha-numeric characters preceding the file extension as a DD name in JCL.

SQR for z/OS does not find 8 alpha-numeric characters as documented. To get around this problem, the FILEPREFIX and FILESUFFIX environment variables in $PSHLQ$.SQRINC(SETENV) are used when coding file names in SQR. The example below shows that SETENV does not contain values for FILEPREFIX and FILESUFFIX when running on the z/OS operating system:

! File prefixes and suffix    
!                             
#ifdef NT                     
#define FILEPREFIX C:\TEMP\   
#define FILESUFFIX            
#endif                        
!                             
#ifdef MVS                    
#define FILEPREFIX            
#define FILESUFFIX            
#endif                        
!                             
#ifdef UNIX                   
#define FILEPREFIX /usr/tmp/  
#define FILESUFFIX            
#endif                        
!

This coding standard enables DOS or UNIX file naming conventions to be used with the OPEN or NEW-REPORT SQR commands. The root portion of the file name is used as a JCL DD name. The JCL must contain a DD statement with this name. Each file used for input or output requires a separate DD statement in the JCL.

In the following example, SQR for z/OS uses VIEWTBL as the DD name in JCL:

let $outputfile = ‘{FILEPREFIX}VIEWTBL{FILESUFFIX}’
open $outputfile as 1 for-writing record=132

The DD statement in the execution JCL requires the same DD name:

//VIEWTBL DD  DSN=&PSHLQ..OUTFILES(VIEWTBL),DISP=SHR

The data set name specified in the JCL may be either sequential or partitioned dataset. If the SQR requires multiple input or output files, you must add a separate DD statement to the JCL for each file.

Note: DD names must reference either sequential datasets or separate partitioned datasets due to the z/OS restriction on writing to more than one PDS member simultaneously.

Adding a DSN Style File Name to the SQR

File names are preceded by DSN: (dataset name). For example:

OPEN ‘DSN: $PSHLQ$.SQR.DAT(VIEWTBL)’ FOR-READING RECORD=133
NEW-REPORT ‘DSN: $PSHLQ$.SQR.DAT(VIEWTBL)’

DD statement modifications are not required to your JCL when using the hard-coded DSN file name.

The SQR language supports a DECLARE PRINTER command so that reports can be directed to HPLASERJET and POSTSCRIPT type printers. However, if the printer is not mainframe-connected, the TYPE=LINEPRINTER option is required.

The TYPE=LINEPRINTER specification produces a basic text type report which can be redirected to a system printer. Normally, print output lines don't exceed 124 print positions.

SQRs containing the SETUP02 statement (refers to a member in the SQC library) allow print lines up to 177 positions. If SQROUT DD prints to SYSOUT, then supply a DCB override for SYSOUT and set the LRECL to 178, this is given in SQRSAMP JCL under your JCLLIB PDS. It would be a good practice to have DCB override with LRECL=178 for SQROUT DD, as this fits both landscape and portrait mode.

Formatted reports cannot be downloaded, then printed from a workstation connected printer. Only selected SQRs utilize the DECLARE PRINTER feature.

Note: A “formatted” report is one produced with the TYPE=HPLASERJET /POSTSCRIPT specification.

Many customers customize SQRs to tailor information to unique business requirements.

Another reason to customize SQRs is due to the way SQR formats reports when the TYPE=LINEPRINTER option is used. Column header and data field alignment may not be optimal, so modifications may be required.