Sample Query Processor Configuration Files

The following pages contain three examples of Query Processor configuration files.

Note: All release names, pack names, and usercodes are arbitrary. They are used as examples only. When creating your own Query Processor configuration file, use the appropriate names and usercodes.

Example 1

This example defines two releases. The Query Processor software for release MYREL1 is on a pack named SYSOLD. The MYREL2 release software is on a pack named TESTPACK. For both releases, the default code file titles are used.

Usercode DEBORAH uses the Query Processor software that resides on the pack TESTPACK. All other usercodes use the default release software, which resides on the pack SYSOLD.

The Query Processor configuration file in this example enables users to continue to use the MYREL1 release SQL database while some experimentation is carried out using an updated version of the Query Processor software.

RELEASE MYREL1
    (PACK = SYSOLD)
RELEASE MYREL2
    (PACK = TESTPACK)
USER
     DEBORAH = MYREL2
DEFAULT RELEASE
    MYREL1
Note: The SL for MCPSQLCONFIG and MCPSQLCLI cannot be changed through the MCPSQL/CONFIG file since those modules are responsible for processing the MCPSQL/CONFIG file contents.

Example 2

This example defines several releases and assigns various usercodes to specific releases. This Query Processor configuration file defines the MYREL1, MYREL2, and MYREL3 release software as residing on the PACKFORMYREL1, PACKFORMYREL2, and PACKFORMYREL3 packs, respectively.

Usercode OSWALD uses MYREL1. Usercodes BETTY and BOB use MYREL2, and usercodes KAREN, JEFF, and TINA use MYREL3.

Usercode FRED uses software based on his current family statement. If his family statement is set to PACKFORMYREL1, he uses the MYREL1 software on that pack. If his family statement is set to PACKFORMYREL3, he uses the MYREL3 software. If his family statement includes PACKFORMYREL2, he uses the MYREL2 software.

Usercode JOE has a release for his own use, called PRIVATE-FIX. It is based on MYREL2 but has two different files, one of which can be found on PACK under the usercode JOE. The second file is also located on PACK, but it can be found under usercode EUROPE. In addition, the second file uses the coded character set named LatinCyrillicEBC rather than the default coded character set.

All other usercodes use the MYREL2 Query Processor software.

RELEASE MYREL1 (PACK = PACKFORMYREL1)
RELEASE MYREL2 (PACK = PACKFORMYREL2)
RELEASE MYREL3 (PACK = PACKFORMYREL3)
USER
     OSWALD = MYREL1
     BETTY,BOB = MYREL2
     KAREN, JEFF, TINA = MYREL3
RELEASE FAMILY-SQL
USER FRED     = FAMILY-SQL
RELEASE PRIVATE-FIX  = MYREL2
    SL MCPSQLSUPPORT = (JOE)SYSTEM/MCPSQL/SUPPORT ON PACK
USER JOE = PRIVATE-FIX
DEFAULT RELEASE = MYREL2
VIEWCONNECTION VIEWUPLOAD
RESOURCE SHIPPING = (JOE)SHIPPINGDB ON PACK
RESOURCE INTL = CCS LatinCyrillicEBC,
                       (EUROPE)INTLDB ON PACK 
Note: The coded character set identifier CCS LatinCyrillicEBC can also be specified by its library ccsnumber, as follows:RESOURCE INTL = CCS 29 (EUROPE) INTLDB ON PACK

Example 3

This example assumes that the following support library function has been created on the system:

SL MYSCODE = *SYSTEM/MCPSQL/SCODE ON PACK1

Usercode HARRIET has a release for her own use, called MYREL1TEST. It is based on release MYREL1 but is using a new version of *SYSTEM/MCPSQL/SCODE.

RELEASE MYREL1 (PACK = SYSOLD)RELEASE MYREL1TEST (PACK = TESTPACK)
  SL MCPSQLSCODE = MYSCODE
USER
     HARRIET = MYREL1
DEFAULT RELEASE
    MYREL1

Example 4

This example illustrates an SQL query across two databases. All databases must be MODE INPUT and all SQL queries must be read-only.

Database Name - DB1:
STUDENT DATA SET (
STUDENTNAME ALPHA(20);
CLASSID NUMBER(10);
);
Database Name - DB2:
CLASS DATA SET (
INSTRUCTORNAME ALPHA(20);
CLASSID NUMBER(10);
);

These two databases must be defined in one RESOURCE in the Query Processor configuration file (MCPSQL/CONFIG).

RESOURCE DB1DB2 = (UC)DB1 ON PACK,
                  (UC)DB2 ON PACK

The following lists an example of an SQL query across DB1 and DB2 databases:

select * from db1.STUDENT mydb1, db2.CLASS mydb2
                          where mydb1.CLASSID = mydb2.CLASSID