|
|
Appendix E. Using SQL in PL/I
Using PL/I Sample Programs
384
Using DBCS Characters in PL/I
388
Rules for Using SQL in PL/I
384
Using SQL Statements in PL/I Subroutines . . 389
Placing and Continuing SQL Statements . . . 384
Coding the SIZE Parameter in VSE JCL (DB2
Delimiting SQL Statements
384
Server for VSE)
390
Using the INCLUDE Statement
385
Handling SQL Errors
390
Declaring Static External Variables
385
Handling Program Interrupts
390
Identifying Rules for Case
385
Using Dynamic SQL Statements in PL/I
391
Declaring Host Variables
385
Defining DB2 Server for VSE & VM Data Types for
Using Host Variables in SQL Statements . . . 388
PL/I
393
Using PL/I Variables in SQL: Data Conversion
Using Stored Procedures
394
Considerations
388
383
Using PL/I Sample Programs
ARIS6PLD is a PL/I language sample program for VSE systems that is shipped
with the DB2 Server for VSE product. ARIS6PLC is a PL/I language sample
program for VM systems that is shipped with the DB2 Server for VM product. It
resides on the production disk for the base product. You may find it useful to print
this sample program before going through this appendix as the hard copy will
provide an illustration for many of the topics discussed here.
You can learn most of the rules for using SQL within PL/I just by scanning
through the program. Note, in particular, how the program satisfies the
requirements of the application prolog and epilog. Near the beginning of the
program all the host variables are declared and error handling is defined. Near the
logical end of the program, the database changes are rolled back, to assure the
database remains consistent for each use of the sample program. For your own
applications, of course, you will enter a commit.
The DCL statements for the host variables are determined by referring to Table 43
on page 393. That figure gives the PL/I representation for each of the DB2 Server
for VSE & VM data types. When you are coding your own applications, you will
need to obtain the data types of the columns that your host variables interact with.
This can be done by querying the catalog tables, which are described in the DB2
Server for VSE & VM SQL Reference manual.
Rules for Using SQL in PL/I
Placing and Continuing SQL Statements
All statements in your PL/I program, including SQL statements, must be contained
in columns 2 through 72 of your source deck. Normal PL/I continuation rules
apply.
Continuation of tokens (the basic syntactical units of a language) is allowed from
one line to the next, by coding the first part of the token up to column 72 on the
line to be continued and coding the next part of the token from column 2 on the
continuation line. If either column 72 of the continued line or column 2 of the
continuation line is blank, the token is not continued.
See the DB2 Server for VSE & VM SQL Reference manual for a discussion on tokens.
Delimiting SQL Statements
Delimiters are required on all SQL statements to help the database manager
distinguish them from regular PL/I statements. You must precede each SQL
statement in your program with EXEC SQL, and end each statement with a
semicolon. EXEC and SQL must be on the same line, with only blanks separating
them (no in-line host language or SQL comments).
Within SQL statements, host language and SQL comments are allowed anywhere
that blanks are allowed. However, there should not be any host language or SQL
comments within SQL statements that are dynamically defined and executed.
An SQL statement cannot be followed on the same line by another SQL statement,
a normal PL/I statement, or a host language comment. When you preprocess a
program containing such a combination, the trailing statements or host language
comments are ignored and will not appear in the SYSPRINT listing.
384
Application Programming
Using the INCLUDE Statement
To include external secondary input, specify the following at the point in the
source code where the secondary input is to be included:
EXEC SQL INCLUDE text_file-name;
The text_file-name is the member name of a P-Type source member of a VSE
library or the file name of a CMS file (with a “PLICOPY” file type) located on a
CMS minidisk accessed by the user.
Declaring Static External Variables
A declaration for a variable with the attributes STATIC and EXTERNAL must also
have the attribute INITIAL. If it does not, the declaration generates a common
CSECT, which the database manager cannot handle.
PL/I programming using “DEFAULT RANGE (*) STATIC” gives an error message.
The preprocessor builds control blocks that are incompatible with this statement.
Identifying Rules for Case
The keywords “EXEC SQL” must appear in uppercase in your PL/I program. The
rest of an SQL statement can be in mixed case, but will be interpreted as
uppercase, except for text within quotation marks, which will be left in the original
case.
Declaring Host Variables
You must declare all host variables in an SQL declare section. For a description of
an SQL declare section, refer to “Declaring Variables That Interact with the
Database Manager” on page 8.
Declare host variables in the source file before the first use of the variable in an
SQL statement. You can use the following types of variables in an SQL statement:
v Scalar variables
v Structure variables
v Structure elements
v Array variables
For information on the use of these variables in an SQL statement, refer to “Using
Host Variables” on page 55 and “Using Host Structures” on page 55.
Note: You can declare non-host variables in an SQL declare section; however,
declarations that do not conform to DB2 Server for VSE & VM declaration
rules may return errors.
The declaration of a host variable is subject to the following rules:
v You can use scalar variables and structure elements as main variables. You can
also use them as indicator variables if they are declared with a data type of
short integer.
v The only arrays accepted by the PL/I preprocessor are arrays of short integer
elements. These arrays may be used as indicator arrays only. The following
example is an indicator array:
DCL IND_ARRAY(10) BINARY FIXED(15);
Indicator array elements cannot be used as main or indicator variables.
v A structure variable (which defines a host structure) is any two-level structure
declared in an SQL declare section. The following example is a host structure:
Appendix E. Using SQL in PL/I
385
DCL 01 PROJ_STRCT,
05 PROJNO
CHAR(6),
05 ACTNO
BINARY FIXED(15),
05 ACSTAFF
BINARY FIXED(31),
05 ACSTDATE
CHAR(10),
05 ACENDATE
CHAR(10);
This structure represents the following list of host variables when used in an
SQL statement:
PROJNO, ACTNO, ACSTAFF, ACSTDATE, ACENDATE
In other words, the two following SQL statements are equivalent:
EXEC SQL SELECT PROJNO, ACTNO, ACTSTAFF, ACSTDATE, ACENDATE
INTO
:PROJ_STRCT
FROM PROJ_ACT
WHERE PROJNO = ‘100000’
EXEC SQL SELECT PROJNO, ACTNO, ACSTAFF, ACSTDATE, ACENDATE
INTO :PROJNO, :ACTNO, :ACSTAFF, :ACSTDATE, :ACENDATE
FROM PROJ_ACT
WHERE PROJNO = ‘100000’
A host structure can either be a stand-alone structure or a substructure of a more
complex structure. The following example is a complex structure that contains a
host structure:
DCL 01 EMPLOYEE,
05 EMPNO
CHAR(6),
05 EMPNAME
10 FIRSTNAME
CHAR(12),
10 MIDINIT
CHAR(1),
10 LASTNAME
CHAR(15),
05 WORKDEPT
CHAR(3),
05 PHONENO
CHAR(4);
The structure EMPNAME is a host structure.
You can use the elements of the host structure and the elements of a complex
structure containing a host structure as host variables. In the previous example,
EMPNO, FIRSTNAME, MIDINIT, LASTNAME, WORKDEPT, and PHONENO can all be used
as host variables.
v
DCL or DECLARE must be the first character sequence on the line, but cannot
start in column 1. You can, however, have a carriage control character in column
1. Otherwise, the line is ignored. (You can place inline host language comments
anywhere after the DECLARE or DCL keyword, and you can continue these
comments over multiple lines.)
v
DECLARE statements can be continued on additional lines, but you cannot have
more than one DECLARE statement on the same line. All DECLARE statements
must end with a semicolon. Rules for continuation of variable names and PL/I
keywords are the same as those described for SQL statements.
v
Declare only one host variable per DCL or DECLARE statement. If you declare
multiple variables, only the first variable is recognized; the others are ignored.
For example:
DCL AA FIXED BIN(15) INIT(7),
BB CHAR(7),
BB and CC are ignored.
CC BINARY FLOAT(53);
The next rule provides one exception to this limitation.
v Factoring of scalar variable names, structure element names and indicator array
names is supported. For example, the following declarations are valid:
386
Application Programming
DCL (X,Y,Z) BINARY FIXED(31);
DCL (ARR1(10), ARR2(5), ARR3(6)) BINARY FIXED (15);
DCL 01 STUCT,
05 (FLD1, FLD2, FLD3) CHAR(10),
05 FLD4
CHAR(5);
v
In addition to the attributes discussed in Table 43 on page 393, the PL/I
preprocessor also supports the following attributes in declarations imbedded in
an SQL declare section:
ALIGNED
UNALIGNED
INTERNAL
EXTERNAL
STATIC
AUTOMATIC
DEFINED
CONTROLLED
CONNECTED
INITIAL
v
In PL/I, the BASED and LIKE functions are not permitted in host structure
declarations.
v
You cannot duplicate variable names in a single source file even if they are in
different blocks or functions. The PL/I preprocessor defines a duplicate as any
name that cannot be referenced unambiguously when fully qualified.
v
You should not declare variables whose names begin with SQL or RDI, because
these names are reserved for database manager use.
v
The database manager allows host variable names, statement labels, and SQL
descriptor area names of up to 256 characters in length, subject to any PL/I
language restriction mentioned in this appendix.
You can have a label on the “EXEC SQL BEGIN DECLARE SECTION;”, but not on
the “EXEC SQL END DECLARE SECTION;”. If you do place a label on this
statement, the preprocessor does not recognize it and assumes that the SQL declare
section has not ended.
When placing host language comments after either of these statements, make sure
the comment ends on the same line. If it does not, PL/I compiler errors result.
Note: Other program variables can also be declared as usual outside the SQL
declare section. The previous restrictions do not apply to non-SQL
declarations.
In the declaration below, only DATES and PRODUCTS may be used as host structures.
ORDERNO and CUSTNUM may be used as scalar host variables and may be qualified as
CUSTORD.ORDERNO and ORDINFO.CUSTNUM or CUSTORD.ORDINFO.CUSTNUM.
EXEC SQL BEGIN DECLARE SECTION;
DCL 1 CUSTORD,
2 ORDERNO CHAR(10),
2 ORDINFO,
3 CUSTNUM CHAR(10),
3 DATES,
5 ORDDATE CHAR(6),
5 DELIVDTE CHAR(6),
2 PRODUCT,
3 STOCKNO CHAR(10),
Appendix E. Using SQL in PL/I
387
3 QUANTITY CHAR(3);
EXEC SQL END DECLARE SECTION;
EXEC SQL SELECT STOCKNO, QUANTITY
INTO :PRODUCT
FROM ORDER
WHERE STOCKNO = ’1234567890’;
Using Host Variables in SQL Statements
When you reference host variables, host structures, structure fields or indicator
arrays in an SQL statement, you must precede each reference by a colon (:) The
colon distinguishes these variables from SQL identifiers (such as column names).
The colon is not required outside an SQL statement.
Using PL/I Variables in SQL: Data Conversion Considerations
Host variables must be type-compatible with the columns with which they are to
be used. For example, if you want to compare a program variable with the
QONHAND column of the database, and the data type of QONHAND is
INTEGER, you should declare the program variable BIN FIXED(31), BIN
FIXED(15), BIN FLOAT, FLOAT BIN, or FIXED DECIMAL(10). (Refer to
“Assigning Data Types When the Column Is Created” on page 44 for details on the
FLOAT data type.)
The database manager considers the numeric data types compatible, as well as the
character string data types (CHAR, VARCHAR, and LONG VARCHAR, including
strings of different declared lengths), and the graphic string data types (GRAPHIC,
VARGRAPHIC, LONG VARGRAPHIC). Of course, an overflow condition may
result if, for example, you assign a 31-bit integer to a 15-bit integer and the current
value of the 31-bit integer is too large to fit in 15 bits. Truncation also occurs when
a decimal number having a scale greater than zero is assigned to an integer. In
general, overflow occurs when significant digits are lost, and truncation occurs
when nonsignificant digits are lost.
The datetime data types are also considered compatible with character data types
(CHAR, and VARCHAR, but not LONG VARCHAR and VARCHAR > 254).
Refer to “Converting Data” on page 48 for a data conversion summary.
Using DBCS Characters in PL/I
The rules for the format and use of DBCS characters in SQL statements are the
same for PL/I as for other host languages supported by the system. For a
discussion of these rules, see “Using a Double-Byte Character Set (DBCS)” on page
51.
When using the string-constant format of the PREPARE or EXECUTE IMMEDIATE
statement, if the statement in the string-constant contains DBCS characters, you
must append an M to the string-constant. For example:
EXEC SQL PREPARE S13 FROM
'SELECT TRANSLATE(''laabb'') || ''l<▌AB▐>'' FROM SYSTEM.SYSCCSIDS'M;
When coding graphic constants in static SQL statements, use one of the following
PL/I formats of the graphic constant:
388
Application Programming
1. '<▌XXXX▐>'G
2.
<@'▌XXXX▐@'@G>
Note: N is a synonym for G.
When coding graphic constants in dynamically executed SQL statements, use the
SQL format of the graphic constant (that is, G'<▌XXXX▐>'). Refer to “Using Graphic
Constants” on page 58 for a discussion of graphic constants.
Using SQL Statements in PL/I Subroutines
The first SQL statement encountered in a sequential scan of your program by the
PL/I preprocessor that requires an in-line call to the resource adapter results in the
generation of control blocks SQLTIE and RDIEXT, and other declarations
commonly used by internal DB2 Server for VSE & VM code that is associated with
the remaining SQL statements in your program. If your program structure involves
SQL statements in multiple procedures, you must maintain structures so that the
SQLTIE and RDIEXT are addressable by all other SQL statement occurrences in
your program.
Figure 90 represents an incorrect structure.
A: PROC OPTIONS(MAIN);
CALL B;
CALL C;
B: PROC;
EXEC SQL CONNECT
EXEC SQL DECLARE C1 CURSOR
EXEC SQL OPEN C1
END B;
C: PROC;
EXEC SQL DECLARE C2 CURSOR
EXEC SQL OPEN C2
END C;
END A;
Figure 90. Incorrect PL/I Program Structure
SQLTIE and RDIEXT will be generated from the CONNECT in B, but it is not
addressable from C, where other SQL statements appear. This can be solved by
putting the CONNECT statement in A, where it will cause SQLTIE and RDIEXT to
be generated at a place that is addressable by both B and C.
Appendix E. Using SQL in PL/I
389
Coding the SIZE Parameter in VSE JCL (DB2 Server for VSE)
When executing PL/I application programs in VSE single user mode, specify
SIZE=750K, not SIZE=AUTO, in the EXEC job control statement.
Handling SQL Errors
There are two ways to declare the return code structure (called SQLCA):
1. You can write the following statement in your source program:
EXEC SQL INCLUDE SQLCA;
The preprocessor replaces this with the declaration of the SQLCA structure.
2. You may declare the SQLCA structure directly, as shown in Figure 91.
DCL 1 SQLCA,
2 SQLCAID CHAR(8),
2 SQLCABC BIN FIXED(31),
2 SQLCODE BIN FIXED(31),
2 SQLERRM CHAR(70) VAR,
2 SQLERRP CHAR(8),
2 SQLERRD (6) BIN FIXED(31),
2 SQLWARN,
3 SQLWARN0 CHAR(1),
3 SQLWARN1 CHAR(1),
3 SQLWARN2 CHAR(1),
3 SQLWARN3 CHAR(1),
3 SQLWARN4 CHAR(1),
3 SQLWARN5 CHAR(1),
3 SQLWARN6 CHAR(1),
3 SQLWARN7 CHAR(1),
3 SQLWARN8 CHAR(1),
3 SQLWARN9 CHAR(1),
3 SQLWARNA CHAR(1),
2 SQLSTATE CHAR(5);
Figure 91. SQLCA Structure (in PL/I)
The SQLCA must not be declared within the SQL declare section. The meanings of
the fields in the SQLCA are discussed in the DB2 Server for VSE & VM SQL
Reference manual.
You may find that the only variable in the SQLCA you really need is SQLCODE. If
this is the case, declare just the SQLCODE variable, and invoke NOSQLCA support
at preprocessor time.
The number of SQLCODE declarations is not limited by the preprocessor. If a
stand-alone SQLCODE is specified, the code inserted by the preprocessor into the
PL/I code to expand an EXEC SQL statement will refer to the address of that
SQLCODE. The PL/I compiler determines if multiple declarations within a
program section are not acceptable. In addition, the PL/I compiler determines
which region of the code an SQLCODE declaration refers to.
Handling Program Interrupts
If a program interrupt occurs and the database manager is unaware of it, you may
receive unexpected results. To allow the system to process the interrupt, include
the following declaration statement after the “EXEC SQL END DECLARATION
SECTION” statement:
390
Application Programming
DCL PLIXOPT CHAR(20) VAR INIT(’TRAP(OFF)’) STATIC EXTERNAL;
If your PL/I compiler is NOT Language Environment enabled, add the following
statement instead:
DCL PLIXOPT CHAR(20) VAR INIT(’NOSTAE,NOSPIE’) STATIC EXTERNAL;
Using Dynamic SQL Statements in PL/I
You may need to declare an SQLDA structure to execute dynamically defined SQL
statements. You can have the system include the structure automatically by
specifying:
EXEC SQL INCLUDE SQLDA;
in your source code, or by directly coding the structure as shown in Figure 92.
DCL 1 SQLDA BASED(SQLDAPTR),
2 SQLDAID CHAR(8),
2 SQLDABC BIN FIXED(31),
2 SQLN BIN FIXED(15),
2 SQLD BIN FIXED(15),
2 SQLVAR(SQLSIZE REFER(SQLN)),
3 SQLTYPE BIN FIXED(15),
3 SQLLEN BIN FIXED(15),
3 SQLDATA PTR,
3 SQLIND PTR,
3 SQLNAME CHAR(30) VAR;
DCL SQLSIZE BIN FIXED(15);
DCL SQLDAPTR PTR;
Figure 92. SQLDA Structure (in PL/I)
The SQLDA must not be declared within the SQL declare section. See the DB2
Server for VSE & VM SQL Reference manual for more information on the individual
fields within the SQLDA.
In addition to the structure above, you should declare an additional mapping for
the same area. The SQLPRCSN and SQLSCALE fields of the second mapping are
used when decimal data is used. Table 42 shows this mapping.
Table 42. SQLDAX Structure (in PL/I)
DCL 1 SQLDAX BASED(SQLDAPTR),
2 SQLDAIDX CHAR(8),
2 SQLDABCX BIN FIXED(31),
2 SQLNX BIN FIXED(15),
2 SQLDX BIN FIXED(15),
2 SQLVARX(SQLSIZE REFER(SQLNX)),
3 SQLTYPEX BIN FIXED(15),
3 SQLPRCSN format 1 or format 2,
3 SQLSCALE format 1 or format 2,
3 SQLDATAX PTR,
3 SQLINDX PTR,
3 SQLNAMEX CHAR(30) VAR;
The SQLPRCSN and SQLSCALE fields can be declared in one of two formats.
Appendix E. Using SQL in PL/I
391
Table 42. SQLDAX Structure (in PL/I) (continued)
Format 1:
3 SQLPRCSN BIT(8),
3 SQLSCALE BIT(8),
The fields must be set by bit 8 strings. For example, for a precision of 5 and scale of 2, the
following assignments are required:
SQLDAPTR->SQLPRCSN = ’00000101’B
SQLDAPTR->SQLSCALE = ’00000010’B
Format 2:
3 SQLPRCSN CHAR(1),
3 SQLSCALE CHAR(1),
This format requires the declaration of additional variables. These are a CHAR(2) variable
and a BASED FIXED BIN(15) variable for both precision and scale. For example:
DCL PRCSNC CHAR(2);
DCL PRCSNN FIXED BIN(15) BASED (ADDR(PRCSNC));
DCL SCALEC CHAR(2);
DCL SCALEN FIXED BIN(15) BASED (ADDR(SCALEC));
The SQLDAX fields for a precision of 5 and scale of 2 would be:
PRCSNN = 5;
SCALEN = 2;
SQLDAPTR->SQLPRCSN = SUBSTR(PRCSNC,2,1);
SQLDAPTR->SQLSCALE = SUBSTR(SCALEC,2,1);
Format 2, although more complex, allows PL/I manipulation of the precision and scale
fields. For example, the value of the SQLPRCSN field can be determined simply by
reversing the substring operation above. That is:
SUBSTR(PRCSNC,2,1) = SQLDAPTR->SQLPRCSN;
Such an operation cannot be done using format 1.
Because the PL/I SQLDA is declared as a based structure, your program can
dynamically allocate an SQLDA of adequate size for use with each EXECUTE
statement. For example, the code fragment below allocates an SQLDA adequate for
five fields and uses it in an EXECUTE of statement S3:
SQLSIZE=5;
ALLOCATE SQLDA SET(SQLDAPTR);
/* Add code to set values and pointers in the SQLDA */
EXEC SQL EXECUTE S3 USING DESCRIPTOR SQLDA;
The statement SQLSIZE=5 determines the size of the SQLDA to be allocated by
means of the PL/I REFER feature. The ALLOCATE statement allocates an SQLDA
of the size desired, and sets SQLDAPTR to point to it. (Before an EXECUTE
statement is issued using this SQLDA, your program must fill in its contents.)
You can use a similar technique to allocate an SQLDA for use with a DESCRIBE
statement. The following program fragment illustrates the use of SQLDA with
DESCRIBE for three fields and a “prepared” statement S1:
EXEC SQL DECLARE C1 CURSOR FOR S1;
SQLSIZE = 3;
ALLOCATE SQLDA SET(SQLDAPTR);
EXEC SQL DESCRIBE S1 INTO SQLDA;
IF SQLD > SQLN THEN
- get a bigger one;
Set SQLDATA and SQLIND;
EXEC SQL OPEN C1;
EXEC SQL FETCH C1 USING DESCRIPTOR SQLDA;
392
Application Programming
Defining DB2 Server for VSE & VM Data Types for PL/I
Table 43. Data Types for PL/I
DB2 Server for VSE & VM
Description
Keyword
Equivalent PL/I Declaration
A binary integer of 31 bits, plus sign.
INTEGER or INT
BINARY FIXED(31)
A binary integer of 15 bits, plus sign.
SMALLINT
BINARY FIXED(15)
1
A packed decimal number, precision
DECIMAL[(p[,s])] or DEC[(p[,s])]¹
FIXED DECIMAL(p,s)
p, scale s (1 ≤ p ≤ 31 and 0 ≤ s ≤ p).
In storage the number occupies a
maximum of 16 bytes. Precision is
the total number of digits. Scale is
the number of those digits that are to
the right of the decimal point.
A single-precision (4- byte)
REAL or FLOAT(p), 1 ≤ p ≤ 21
BINARY FLOAT(p) or FLOAT
floating-point number, in short
BINARY(p), 1 ≤ p ≤ 21
DECIMAL
System/390 floating-point format.
FLOAT(p) or FLOAT DECIMAL(p),
1≤p≤7
A double-precision (8- byte)
FLOAT or FLOAT(p), 22 ≤ p ≤ 53
BINARY FLOAT(p) or FLOAT
floating-point number, in long
or DOUBLE PRECISION
BINARY(p), 22 ≤ p ≤ 53
DECIMAL
System/390 floating-point format.
FLOAT(p) or FLOAT DECIMAL(p),
8 ≤ p ≤ 16
A fixed-length character string of
CHARACTER[(n)] or CHAR[(n)]
CHARACTER(n)
length n where 0 < n ≤ 254.
A varying-length character string of
VARCHAR(n)
CHARACTER(n) VARYING
maximum length n. If n > 254 or ≤
32 767, this data type is considered a
long field. See “Using Long Strings”
on page 45 for more information.
A varying-length character string of
LONG VARCHAR
CHARACTER(n) VARYING
maximum length 32,767 bytes.
A fixed-length string of n DBCS
GRAPHIC[(n)]
GRAPHIC(n)
characters where 0 < n ≤ 127.
A varying-length string of n DBCS
VARGRAPHIC(n)
GRAPHIC(n) VARYING
characters. If n > 127 or ≤ 16 383, this
data type is considered a long field.
See “Using Long Strings” on page 45
for more information.
A varying-length string of DBCS
LONG VARGRAPHIC
GRAPHIC(n) VARYING
characters of maximum length 16 383.
A fixed or varying-length character
DATE
CHARACTER(n) or
string representing a date. The
CHARACTER(n) VARYING
minimum and maximum lengths
vary with both the format used and
whether it is an input or output
operation. See the DB2 Server for VSE
& VM SQL Reference manual for more
information.
Appendix E. Using SQL in PL/I
393
Table 43. Data Types for PL/I (continued)
DB2 Server for VSE & VM
Description
Keyword
Equivalent PL/I Declaration
A fixed or varying-length character
TIME
CHARACTER(n) or
string representing a time. The
CHARACTER(n) VARYING
minimum and maximum lengths
vary with both the format used and
whether it is an input or output
operation. See the DB2 Server for VSE
& VM SQL Reference manual for more
information.
A fixed or varying-length character
TIMESTAMP
CHARACTER(n) or
string representing a timestamp. The
CHARACTER(n) VARYING
lengths can vary on input and
output. See the DB2 Server for VSE &
VM SQL Reference manual for more
information.
Notes:
1. NUMERIC is a synonym for DECIMAL and may be used when creating or
altering tables. In such cases, however, the CREATE or ALTER function will
establish the column (or columns) as DECIMAL.
2. The data type can be stated in any way that is acceptable to PL/I; BIN
FIXED(31), BINARY FIXED(31), and FIXED BIN(31) are all equivalent. If several
variables have exactly the same attributes, you can combine them in a single
DCL statement:
DCL (X,Y,Z) BIN FIXED;
Using Stored Procedures
The following example shows how to define the parameters in a stored procedure
that uses the GENERAL linkage convention. The NOEXECOPS procedure option
must be specified.
PLISAMP: PROC(PARM1, PARM2, ...)
OPTIONS(MAIN, NOEXECOPS);
DCL PARM1 ...
/* first parameter */
DCL PARM2 ...
/* second parameter */
Figure 93. Stored Procedure - Using GENERAL Linkage Convention
The following example shows how to define the parameters in a stored procedure
that uses the GENERAL WITH NULLS linkage convention.
394
Application Programming
PLISAMP: PROC(PARM1, PARM2, INDSTRUC)
OPTIONS(MAIN, NOEXECOPS);
DCL PARM1 ...
/* first parameter */
DCL PARM2 ...
/* second parameter */
DCL 01 INDSTRUC,
02 IND1 BIN FIXED(15),
/* first ind var */
02 IND2 BIN FIXED(15);
/* second ind var */
Figure 94. Stored Procedure - Using GENERAL WITH NULLS Linkage Convention
Appendix E. Using SQL in PL/I
395
Appendix F. Decision Tables to Grant Privileges on Packages
How to Use the Decision Tables
398
Decision Tables
399
397
How to Use the Decision Tables
The DB2 Server for VSE & VM product uses decision tables to determine whether
the owner of a package has the authority or the privilege to execute a given
statement. There are three possible scores for each static statement:
‘G’
Means that the package owner has the necessary authorization or privilege
for this statement such that the owner can receive the RUN privilege.
‘Y’
Means that the package owner has the necessary authorization or privilege
for this statement such that the owner can receive the RUN privilege, but
not the GRANT option on that privilege.
‘D’
Means that the package owner must have DBA authority to execute the
program containing this statement. No entry is made in the authorization
catalog tables.
‘G’ is the highest score, followed by ‘Y’, followed by ‘D’. For example, suppose a
program contains three statements. The package owner receives a ‘G’, on two of
them, but a ‘Y’ on the third (this occurs when the object referenced in the
statement does not exist, or the privileges of the object cannot be resolved). In this
situation, the database manager assigns the package a ‘Y’ (the lower score),
allowing the owner to run the package but not to grant the RUN privilege on the
package to another user. Because the preprocessor does not distinguish between
certain SQL statements that are applied to one application server or to another, you
can compensate by doing one of the following:
v Use dynamic statements that cause RUNAUTH=G on both application servers.
v Create separate packages on each application server. These separate packages
can then be invoked by a mainline program.
v Create dummy tables that have the same user IDs and table names on the other
application server.
Dynamic statements are always given a score of ‘G’.
The next few pages show tables. In these tables:
‘G’, ‘Y’, and ‘D’ have the meanings outlined above.
‘(G)’ and ‘(Y)’ mean that the score for the statement is either ‘G’ or ‘Y’, an error
message is produced when the program is preprocessed, a partial section for
the statement is placed into the package, and the authority for the statement is
checked again at the time the package is run.
‘n/a’ means ‘not applicable’.
package owner is the authorization ID of the person who preprocesses the
program.
398
Application Programming
Decision Tables
ACQUIRE DBSPACE
Dbspace Owner
1
2
3
Pkg Owner's
PRIVATE
Authority
Dbspace Owner
Dbspace Owner
PUBLIC
is Pkg Owner
not Pkg Owner
A
DBA
D
G
D
B
RESOURCE
(G)
G
(G)
C
None of the above
(G)
(G)
(G)
For cases A2 and B2, the system makes an entry in the SYSUSERAUTH catalog
table with RESOURCEAUTH set to ‘Y’. In addition, the NAME column is set to the
package_id and the AUTHOR column is set to the authorization ID of the person
who preprocessed the program. The entry indicates the program’s dependency.
ALTER DBSPACE
Dbspace Owner
Pkg Owner's
1
2
Authority
Dbspace Owner
Dbspace Owner
is Pkg Owner
not Pkg Owner
A
DBA
G
D
B
non-DBA
G
(G)
Appendix F. Decision Tables to Grant Privileges on Packages
399
ALTER TABLE
Table Owner
Pkg Owner's
Authority and
1
2
3
Tbl Privilege
Table Owner
Table Owner
Table does not
is Pkg Owner
not Pkg Owner
yet exist
A
DBA, no ALTER
n/a
D
D
B
ALTER without GRANT
n/a
Y
n/a
C
ALTER with GRANT
G
G
n/a
D
non-DBA , no ALTER
n/a
(G)
(G)
For cases B2, C1, and C2, the system makes entries in the SYSTABAUTH catalog
table with the ALTERAUTH columns set to ‘Y’. The entries represent this
package’s dependency on ALTER privilege for the table.
The preprocessor determines which level of RUN privilege to give the owner. For
some SQL statements, privileges are not checked for all objects affected by the
statement. For example, when manipulating primary and foreign keys with the
ALTER TABLE statement, ALTER privilege is only checked for the table_name
following the ALTER TABLE statement rather than all the tables involved.
Additional ALTER and REFERENCES privileges are checked at run time.
COMMENT ON
Table/View Owner
Pkg Owner's
1
2
Authority
Table/View Owner
Table/View Owner
is Pkg Owner
not Pkg Owner
A
DBA
G
D
B
non-DBA
G
(G)
400
Application Programming
CREATE INDEX
Table on which INDEX is based
1
2
3
4
Pkg Owner's
Table Exists and
Table does not yet exist
Authority and
the Table's Owner
and the Table's Owner
Tbl Privilege
is Pkg Owner
not Pkg Owner
is Pkg Owner
not Pkg Owner
A
n/a
D
(G)
(Y)
DBA, no INDEX
B
non-DBA, INDEX
n/a
Y
n/a
n/a
without GRANT
non-DBA, INDEX
C
G
G
n/a
n/a
with GRANT
D
non-DBA , no INDEX
n/a
(G)
(G)
(Y)
For cases B2, C1, and C2, the system makes an entry in the SYSTABAUTH catalog
table with the INDEXAUTH column set to ‘Y’. The entries represent this package’s
dependency on INDEX authority privilege for the table.
Note: It is possible for the owner of a table to create an index on that table in the
name of another authorization ID. This is true even if the table owner does
not have DBA authority.
CREATE TABLE
Table O wner
Pkg Owner's
1
2
Authority
Table O wner
Table O wner
is Pkg Owner
not Pkg Owner
A
DBA
G
D
B
non-DBA
G
(G)
DELETE
There are two decision tables that apply to DELETE:
The Table Where the Deletion Is Applied :
Appendix F. Decision Tables to Grant Privileges on Packages
401
Table/View on which DELETE is applied
1
2
3
4
Pkg Owner's
Table/View Exists and
Table/View does not yet exist
Authority and
the Table/View's Owner
and the Table/View's Owner
Tbl Privilege
is Pkg Owner
not Pkg Owner
is Pkg Owner
not Pkg Owner
A
n/a
D
(G)
(Y)
DBA, no DELETE
B
non-DBA, DELETE
n/a
Y
n/a
n/a
without GRANT
non-DBA, DELETE
C
G
G
n/a
n/a
with GRANT
D
non-DBA , no DELETE
n/a
(G)
(G)
(Y)
In cases B2, C1, and C2, the application server makes entries in the SYSTABAUTH
catalog table with the DELETEAUTH column set to ‘Y’. The entries represent this
package’s dependency on the DELETE privilege for the table.
Any Tables Referenced in a WHERE Clause :
Note: The authorization checking in the previous decision table precedes the logic
of this table. If the first decision table yields a negative SQLCODE,
processing stops. Otherwise, the system applies the lowest level of
authorization gained from the two decision tables.
Table/Views in WHERE clause
1
2
3
4
Pkg Owner's
Table/View Exists and
Table/View does not yet exist
Authority and
the Table/View's Owner
and the Table/View's Owner
Tbl Privilege
is Pkg Owner
not Pkg Owner
is Pkg Owner
not Pkg Owner
A
n/a
Y
(G)
(Y)
DBA, no SELETE
B
non-DBA, SELECT
n/a
Y
n/a
n/a
without GRANT
non-DBA, SELECT
C
G
G
n/a
n/a
with GRANT
D
non-DBA , no SELECT
n/a
(G)
(G)
(Y)
Figure 95. Tables/Views in WHERE clause
In cases B2, C1, and C2, the application server makes entries in the SYSTABAUTH
catalog table with the SELECTAUTH column set to ‘Y’. The entries represent this
package’s dependency on SELECT privilege for the table.
402
Application Programming
In case A2, the system makes an entry in the SYSUSERAUTH catalog table to show
this package’s dependency on DBA authority.
GRANT for Authorities Statement
Authority Granted
Authority
of Grantor
1
2
3
4
CONNECT to
DBA
RESOURCE
another user
CONNECT to self
A
D
D
D
G
DBA
B
Non-DBA
G
G
G
G
INSERT:
There are two decision tables that apply to INSERT:
The Table Where the Insertion Is Applied :
Table/Views to which INSERT is applied
1
2
3
4
Pkg Owner's
Table/View Exists and
Table/View does not yet exist
Authority and
the Table/View's Owner
and the Table/View's Owner
Tbl Privilege
is Pkg Owner
not Pkg Owner
is Pkg Owner
not Pkg Owner
A
n/a
D
(G)
(Y)
DBA, no INSERT
B
non-DBA, INSERT
n/a
Y
n/a
n/a
without GRANT
non-DBA, INSERT
C
G
G
n/a
n/a
with GRANT
D
non-DBA, no INSERT
n/a
(G)
(G)
(Y)
In cases B2, C1, and C2, the system makes entries in the SYSTABAUTH catalog
table with the INSERTAUTH column set to ‘Y’. The entries represent this package’s
dependency on INSERT privilege for the table.
Any Tables Referenced in a WHERE Clause of a Subselect :
Appendix F. Decision Tables to Grant Privileges on Packages
403
Note: The authorization checking in the previous decision table precedes the logic
of this table.
The decision table used here is the same as that used by tables in the WHERE
clause of a DELETE in Figure 95 on page 402.
In cases B2, C1, and C2, the system makes entries in the SYSTABAUTH catalog
table with the SELECTAUTH column set to ‘Y’. The entries represent this
package’s dependency on SELECT privilege for the table.
In case A2, the system makes an entry in the SYSUSERAUTH catalog table to show
this package’s dependency on DBA authority.
REVOKE for Authorities Statement
Authority Revoked
Authority
of Revoker
1
2
3
DBA
RESOURCE
CONNECT
A
D
D
D
DBA
B
Non-DBA
G
G
G
SELECT
There are two decision tables that apply to SELECT:
The Tables in the FROM List :
Table/Views in the FROM list
1
2
3
4
Pkg Owner's
Table/View Exists and
Table/View does not yet exist
Authority and
the Table/View's Owner
and the Table/View's Owner
Tbl Privilege
is Pkg Owner
not Pkg Owner
is Pkg Owner
not Pkg Owner
A
n/a
Y
(G)
(Y)
DBA, no SELECT
B
non-DBA, SELECT
n/a
Y
n/a
n/a
without GRANT
non-DBA, SELECT
C
G
G
n/a
n/a
with GRANT
D
non-DBA, no SELECT
n/a
(G)
(G)
(Y)
In cases B2, C1, and C2, the application server makes entries in the SYSTABAUTH
catalog table with the SELECTAUTH column set to ‘Y’. The entries represent this
package’s dependency on INSERT privilege for the table.
404
Application Programming
In case A2, there are some instances where a ‘Y’ entry is made in the DBAAUTH
column of the SYSUSERAUTH catalog table, showing package dependencies on
DBA authority.
Any Tables Referenced in a WHERE Clause :
Note: The authorization checking in the previous decision table precedes the logic
of this table.
The decision table used here is the same as that used by tables in the WHERE
clause of a DELETE in Figure 95 on page 402.
In cases B2, C1, and C2, the system makes entries in the SYSTABAUTH catalog
table with the SELECTAUTH column set to ‘Y’. The entries represent this
package’s dependency on SELECT privilege for the table.
In case A2, the system makes an entry in the SYSUSERAUTH catalog table to show
this package’s dependency on DBA authority.
The UPDATE Tables
There are two decision tables that apply to UPDATE:
The Table Where the Update Is Applied :
Table/Views to which UPDATE is applied
1
2
3
4
Pkg Owner's
Table/View Exists and
Table/View does not yet exist
Authority and
the Table/View's Owner
and the Table/View's Owner
Tbl Privilege
is Pkg Owner
not Pkg Owner
is Pkg Owner
not Pkg Owner
A
n/a
D
(G)
(Y)
DBA, no UPDATE
B
non-DBA, UPDATE
n/a
Y
n/a
n/a
without GRANT
non-DBA, UPDATE
C
G
G
n/a
n/a
with GRANT
D
non-DBA, no UPDATE
n/a
(G)
(G)
(Y)
In cases B2, C1, and C2, the system makes entries in the SYSTABAUTH catalog
table with the UPDATEAUTH column set to ‘Y’. The entries represent this
package’s dependency on UPDATE privilege for the table.
Any Tables Referenced in a WHERE Clause :
Note: The authorization checking in the previous decision table precedes the logic
of this table.
Appendix F. Decision Tables to Grant Privileges on Packages
405
The decision table used here is the same as that used by tables in the WHERE
clause of a DELETE in Figure 95 on page 402.
In cases B2, C1, and C2, the system makes entries in the SYSTABAUTH catalog
table with the SELECTAUTH column set to ‘Y’. The entries represent this
package’s dependency on SELECT privilege for the table.
In case A2, the system makes an entry in the SYSUSERAUTH catalog table to show
this package’s dependency on DBA authority.
There are two decision tables that apply to UPDATE:
The LOCK DBSPACE Table
Dbspace Owner
Pkg Owner's
1
2
Authority
Dbspace Owner
Dbspace Owner
is Pkg Owner
not Pkg Owner
A
DBA
G
D
B
non-DBA
G
(G)
The LOCK TABLE Table
Table Owner
Pkg Owner's
Authority and
1
2
3
Tbl Privilege
Table Owner
Table Owner
Table does not
is Pkg Owner
not Pkg Owner
yet exist
A
DBA, no SELECT
n/a
D
D
B
SELECT without GRANT
n/a
Y
n/a
C
SELECT with GRANT
G
G
n/a
D
non - DBA , no SELECT
n/a
(G)
(G)
For cases B1, B2, and C2, the system makes entries in the SYSTABAUTH catalog
table. The entries have the SELECTAUTH column set to ‘Y’ to show the package’s
dependency.
406
Application Programming
Notices
IBM may not offer the products, services, or features discussed in this document in
all countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10594-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
This information could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements
and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
407
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
programs and other programs (including this one) and (ii) the mutual use of the
information which has been exchanged, should contact:
IBM Corporation
Mail Station P300
522 South Road
Poughkeepsie, NY 12601-5400
U.S.A
Such information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
Any performance data contained herein was determined in a controlled
environment. Therefore, the results obtained in other operating environments may
vary significantly. Some measurements may have been made on development-level
systems and there is no guarantee that these measurements will be the same on
generally available systems. Furthermore, some measurement may have been
estimated through extrapolation. Actual results may vary. Users of this document
should verify the applicable data for their specific environment.
Information concerning non-IBM products was obtained from the suppliers of
those products, their published announcements, or other publicly available sources.
IBM has not tested those products and cannot confirm the accuracy of
performance, compatibility, or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the
suppliers of those products.
All statements regarding IBM’s future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
This information may contain examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information may contain sample application programs in source language,
which illustrates programming techniques on various operating platforms. You
may copy, modify, and distribute these sample programs in any form without
payment to IBM, for the purposes of developing, using, marketing, or distributing
application programs conforming to the application programming interface for the
operating platform for which the sample programs are written. These examples
have not been thoroughly tested under all conditions. IBM, therefore, cannot
guarantee or imply reliability, serviceability, or function of these programs.
408
Application Programming
Programming Interface Information
This manual documents intended Programming Interfaces that allow the customer
to write programs to obtain services of DB2 Server for VSE & VM.
Trademarks
The following terms are trademarks of International Business Machines
Corporation in the United States, or other countries, or both:
APL2
CICS
CICS/VSE
DATABASE 2
DataPropagator
DB2
DRDA
IBM
Language Environment
OS/390
QMF
SQL/DS
System/390
VM/ESA
VSE/ESA
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
Other company, product, and service names may be trademarks or service marks
of others.
Notices
409
Bibliography
This bibliography lists publications that are
v DB2 Server for VSE System Administration,
referenced in this manual or that may be helpful.
SC09-2981
v DB2 Server for VSE & VM Performance Tuning
DB2 Server for VM Publications
Handbook, GC09-2987
v
DB2 Server for VSE & VM Application
v DB2 Server for VSE & VM SQL Reference,
Programming, SC09-2889
SC09-2989
v
DB2 Server for VSE & VM Database
Administration, SC09-2888
Related Publications
v
DB2 Server for VSE & VM Database Services
v DB2 Server for VSE & VM Data Restore,
Utility, SC09-2983
SC09-2991
v
DB2 Server for VSE & VM Diagnosis Guide and
v DRDA: Every Manager's Guide, GC26-3195
Reference, LC09-2907
v IBM SQL Reference, Version 2, Volume 1,
v
DB2 Server for VSE & VM Overivew, GC09-2995
SC26-8416
v
DB2 Server for VSE & VM Interactive SQL Guide
v IBM SQL Reference, SC26-8415
and Reference, SC09-2990
VM/ESA Publications
v
DB2 Server for VSE & VM Master Index and
Glossary, SC09-2890
v
VM/ESA: General Information, GC24-5745
v
DB2 Server for VM Messages and Codes,
v
VM/ESA: VMSES/E Introduction and Reference,
GC09-2984
GC24-5837
v
DB2 Server for VSE & VM Operation, SC09-2986
v
VM/ESA: Installation Guide, GC24-5836
v
DB2 Server for VSE & VM Quick Reference,
v
VM/ESA: Service Guide, GC24-5838
SC09-2988
v
VM/ESA: Planning and Administration,
v
DB2 Server for VM System Administration,
SC24-5750
SC09-2980
v
VM/ESA: CMS File Pool Planning,
v
DB2 Server for VSE & VM Performance Tuning
Administration, and Operation, SC24-5751
Handbook, GC09-2987
v
VM/ESA: REXX/EXEC Migration Tool for
v
DB2 Server for VSE & VM SQL Reference,
VM/ESA, GC24-5752
SC09-2989
v
VM/ESA: Conversion Guide and Notebook,
GC24-5839
DB2 Server for VSE Publications
v
VM/ESA: Running Guest Operating Systems,
v DB2 Server for VSE & VM Application
SC24-5755
Programming, SC09-2889
v
VM/ESA: Connectivity Planning, Administration,
v DB2 Server for VSE & VM Database
and Operation, SC24-5756
Administration, SC09-2888
v
VM/ESA: Group Control System, SC24-5757
v DB2 Server for VSE & VM Database Services
v
VM/ESA: System Operation, SC24-5758
Utility, SC09-2983
v
VM/ESA: Virtual Machine Operation, SC24-5759
v DB2 Server for VSE & VM Diagnosis Guide and
v
VM/ESA: CP Programming Services, SC24-5760
Reference, LC09-2907
v
VM/ESA: CMS Application Development Guide,
v DB2 Server for VSE & VM Overivew, GC09-2995
SC24-5761
v DB2 Server for VSE & VM Interactive SQL Guide
v
VM/ESA: CMS Application Development
and Reference, SC09-2990
Reference, SC24-5762
v DB2 Server for VSE & VM Master Index and
v
VM/ESA: CMS Application Development Guide for
Glossary, SC09-2890
Assembler, SC24-5763
v DB2 Server for VSE Messages and Codes,
v
VM/ESA: CMS Application Development Reference
GC09-2985
for Assembler, SC24-5764
v DB2 Server for VSE & VM Operation, SC09-2986
411
v
VM/ESA: CMS Application Multitasking,
v IBM VSE/ESA Guide to System Functions,
SC24-5766
SC33-6511
v
VM/ESA: CP Command and Utility Reference,
v IBM VSE/ESA Installation, SC33-6504
SC24-5773
v IBM VSE/ESA Messages & Codes, SC33-6507
v
VM/ESA: CMS Primer, SC24-5458
v IBM VSE/ESA Networking Support, SC33-6508
v
VM/ESA: CMS User’s Guide, SC24-5775
v IBM VSE/ESA Operation, SC33-6506
v
VM/ESA: CMS Command Reference, SC24-5776
v IBM VSE/ESA Planning, SC33-6503
v
VM/ESA: CMS Pipelines User’s Guide, SC24-5777
v IBM VSE/ESA System Control Statements,
v
VM/ESA: CMS Pipelines Reference, SC24-5778
SC33-6513
v
VM/ESA: XEDIT User’s Guide, SC24-5779
v IBM VSE/ESA System Macros User’s Guide,
SC33-6515
v
VM/ESA: XEDIT Command and Macro Reference,
SC24-5780
v IBM VSE/ESA System Macros Reference,
SC33-6516
v
VM/ESA: Quick Reference, SX24-5290
v IBM VSE/ESA System Utilities, SC33-6517
v
VM/ESA: Performance, SC24-5782
v IBM VSE/ESA Unattended Node Support,
v
VM/ESA: Dump Viewing Facility, GC24-5853
SC33-6512
v
VM/ESA: System Messages and Codes, GC24-5841
v IBM VSE/ESA Using IBM Workstations,
v
VM/ESA: Diagnosis Guide, GC24-5854
SC33-6509
v
VM/ESA: CP Diagnosis Reference, SC24-5855
v
VM/ESA: CP Diagnosis Reference Summary,
CICS/VSE Publications
SX24-5292
v
CICS/VSE Application Programming Reference,
v
VM/ESA: CMS Diagnosis Reference, SC24-5857
SC33-0713
v
CP and CMS control block information is not
v
CICS/VSE Application Programming Guide,
provided in book form. This information is
SC33-0712
available on the IBM VM/ESA operating
v
CICS Application Programming Primer (VS
system home page (http://www.ibm.com/
COBOL II), SC33-0674
s390/vm).
v
CICS/VSE CICS-Supplied Transactions, SC33-0710
v
IBM VM/ESA: CP Exit Customization, SC24-5672
v
CICS/VSE Customization Guide, SC33-0707
v
VM/ESA REXX/VM User’s Guide, SC24-5465
v
CICS/VSE Facilities and Planning Guide,
v
VM/ESA REXX/VM Reference, SC24-5770
SC33-0718
v
CICS/VSE Intercommunication Guide, SC33-0701
C for VM/ESA Publications
v
CICS/VSE Performance Guide, SC33-0703
v
IBM C for VM/ESA Diagnosis Guide, SC09-2149
v
CICS/VSE Problem Determination Guide,
v
IBM C for VM/ESA Language Reference,
SC33-0716
SC09-2153
v
CICS/VSE Recovery and Restart Guide, SC33-0702
v
IBM C for VM/ESA Compiler and Run-Time
v
CICS/VSE Release Guide, GC33-1645
Migration Guide, SC09-2147
v
CICS/VSE Report Controller User’s Guide,
v
IBM C for VM/ESA Programming Guide,
SC33-0705
SC09-2151
v
CICS Transaction Server for VSE/ESA V1R1.0
v
IBM C for VM/ESA User’s Guide, SC09-2152
Resource Definition Guide, SC33-0709
Virtual Storage Extended/Enterprise Systems
v
CICS/VSE Resource Definition (Online),
Architecture (VSE/ESA) Publications
SC33-0708
v IBM VSE/ESA Administration, SC33-6505
v
CICS/VSE System Definition and Operations
Guide, SC33-0706
v IBM VSE/ESA Diagnosis Tools, SC33-6514
v
CICS/VSE System Programming Reference,
v IBM VSE/ESA General Information, GC33-6501
SC33-0711
v IBM VSE/ESA Guide for Solving Problems,
v
CICS/VSE User’s Handbook, SX33-6079
SC33-6510
v
CICS/VSE XRF Guide, SC33-0704
412
Application Programming
CICS/ESA Publications
v IBM Distributed Data Management (DDM)
Architecture, Architecture Reference, Level 4,
v CICS/ESA General Information, GC33-0803
SC21-9526
VSE/Virtual Storage Access Method (VSE/VSAM)
v IBM Distributed Data Management (DDM)
Publications
Architecture, Implementation Programmer’s Guide,
SC21-9529
v VSE/VSAM Commands and Macros, SC33-6532
v VM/Directory Maintenance Licensed Program
v VSE/VSAM Introduction, GC33-6531
Specification, GC20-1836
v VSE/VSAM Messages and Codes, SC24-5146
v IBM Distributed Relational Database Architecture
v VSE/VSAM Programmer’s Reference, SC33-6535
Reference, SC26-4651
v IBM Systems Network Architecture, Format and
VSE/Interactive Computing and Control Facility
Protocol Reference, SC30-3112
(VSE/ICCF) Publications
v SNA LU 6.2 Reference: Peer Protocols, SC31-6808
v VSE/ICCF Administration and Operation,
SC33-6562
v Reference Manual: Architecture Logic for LU Type
6.2, SC30-3269
v VSE/ICCF Primer, SC33-6561
v IBM Systems Network Architecture, Logical Unit
v VSE/ICCF User’s Guide, SC33-6563
6.2 Reference: Peer Protocols, SC31-6808
VSE/POWER Publications
v Distributed Data Management (DDM) General
Information, GC21-9527
v VSE/POWER Administration and Operation,
SC33-6571
CCSID Publications
v VSE/POWER Application Programming,
v Character Data Representation Architecture,
SC33-6574
Executive Overview, GC09-2207
v VSE/POWER Networking, SC33-6573
v Character Data Representation Architecture
v VSE/POWER Remote Job Entry, SC33-6572
Reference and Registry, SC09-2190
Distributed Relational Database Architecture
DB2 Server RXSQL Publications
(DRDA) Library
v DB2 REXX SQL for VM/ESA Installation and
v Application Programming Guide, SC26-4773
Reference, SC09-2891
v Architecture Reference, SC26-4651
v Connectivity Guide, SC26-4783
C/370 Publications
v DRDA: Every Manager's Guide, GC26-3195
v IBM C/370 Installation and Customization Guide,
GC09-1387
v Planning for Distributed Relational Database,
SC26-4650
v IBM C/370 Programming Guide, SC09-1384
v Problem Determination Guide, SC26-4782
Communication Server for OS/2 Publications
C/370 for VSE Publications
v Up and Running!, GC31-8189
v IBM C/370 General Information, GC09-1386
v Network Administration and Subsystem
Management Guide, SC31-8181
v IBM C/370 Programming Guide for VSE,
SC09-1399
v Command Reference, SC31-8183
v IBM C/370 Installation and Customization Guide
v Message Reference, SC31-8185
for VSE, GC09-1417
v Problem Determination Guide, SC31-8186
v IBM C/370 Reference Summary for VSE,
SX09-1246
Distributed Database Connection Services
(DDCS) Publications
v IBM C/370 Diagnosis Guide and Reference for
VSE, LY09-1805
v DDCS User’s Guide for Common Servers,
S20H-4793
VSE/REXX Publication
v DDCS for OS/2 Installation and Configuration
v VSE/REXX Reference, SC33-6642
Guide, S20H-4795
Other Distributed Data Publications
VTAM Publications
Bibliography
413
v VTAM Messages and Codes, SC31-6493
v VS COBOL II Application Programming Guide,
SC26-4045
v VTAM Network Implementation Guide, SC31-6494
v VS COBOL II Application Programming
v VTAM Operation, SC31-6495
Debugging, SC26-4049
v VTAM Programming, SC31-6496
v VS COBOL II Installation and Customization for
v VTAM Programming for LU 6.2, SC31-6497
CMS, SC26-4213
v VTAM Resource Definition Reference, SC31-6498
v VS COBOL II Installation and Customization for
v VTAM Resource Definition Samples, SC31-6499
VSE, SC26-4696
v VS COBOL II Application Programming Guide for
CSP/AD and CSP/AE Publications
VSE, SC26-4697
v Developing Applications, SH20-6435
v CSP/AD and CSP/AE Installation Planning Guide,
Data Facility Storage Management
GH20-6764
Subsystem/VM (DFSMS/VM) Publications
v Administering CSP/AD and CSP/AE on VM,
v DFSMS/VM RMS User’s Guide and Reference,
SH20-6766
SC35-0141
v Administering CSP/AD and CSP/AE on VSE,
Systems Network Architecture (SNA)
SH20-6767
Publications
v CSP/AD and CSP/AE Planning, SH20-6770
v SNA Transaction Programmer’s Reference Manual
v Cross System Product General Information,
for LU Type 6.2, GC30-3084
GH23-0500
v SNA Format and Protocol Reference: Architecture
Logic for LU Type 6.2, SC30-3269
Query Management Facility (QMF) Publications
v SNA LU 6.2 Reference: Peer Protocols, SC31-6808
v Introducing QMF, GC27-0714
v SNA Synch Point Services Architecture Reference,
v Installing and Managing QMF for VSE,
SC31-8134
GC27-0721
v QMF Reference, SC27-0715
Miscellaneous Publications
v Installing and Managing QMF for VM,
v IBM 3990 Storage Control Planning, Installation,
GC27-0720
and Storage Administration Guide, GA32-0100
v Developing QMF Applications, SC27-0718
v Dictionary of Computing, ZC20-1699
v QMF Messages and Codes, GC27-0717
v APL2 Programming: Using Structured Query
v Using QMF, SC27-0716
Language, SH21-1056
v ESA/390 Principles of Operation, SA22-7201
Query Management Facility (QMF) for Windows
Publications
Related Feature Publications
v Getting Started with QMF for Windows,
v DB2 for VM Control Center Operations Guide,
SC27-0723
GC09-2993
v Installing and Managing QMF for Windows,
v DB2 for VSE Control Center Operations Guide,
GC27-0722
GC09-2992
v DB2 Replication Guide and Reference, SC26-9920
DL/I DOS/VS Publications
v DL/I DOS/VS Application Programming,
SH24-5009
COBOL Publications
v VS COBOL II Migration Guide for VSE,
GC26-3150
v VS COBOL II Migration Guide for MVS and
CMS, GC26-3151
v VS COBOL II General Information, GC26-4042
v VS COBOL II Language Reference, GC26-4047
414
Application Programming
|