Source member listing for the SQL statement processor

 

This example shows a source member listing for the SQL statement processor.

By using the code examples, you agree to the terms of Code license and disclaimer information Figure 1. QSYSPRT listing for SQL statement processor

5722SS1 V5R4M0 060210        Run SQL Statements       SCHEMA       02/10/06 15:35:18   Page   1
Source file...............CORPDATA/SRC Member....................SCHEMA Commit....................*NONE Naming....................*SYS Generation level..........10
Date format...............*JOB Date separator............*JOB Time format...............*HMS Time separator ...........*JOB Default Collection........*NONE IBM SQL flagging..........*NOFLAG ANS flagging..............*NONE Decimal point.............*JOB Sort Sequence.............*JOB Language ID...............*JOB Printer file..............*LIBL/QSYSPRT Source file CCSID.........65535
Job CCSID.................0
Statement processing......*RUN Allow copy of data........*OPTIMIZE Allow blocking............*READ SQL rules.................*DB2
Decimal result options:   Maximum precision.......31
  Maximum scale...........31
  Minimum divide scale....0
Source member changed on 04/01/98  11:54:10
5722SS1 V5R4M0 060210         Run SQL Statements         SCHEMA      02/10/06 15:35:18   Page   2
Record  *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8  SEQNBR  Last change     1
    2     DROP COLLECTION DEPT;
    3     DROP COLLECTION MANAGER;
    4
    5     CREATE SCHEMA DEPT     6          CREATE TABLE EMP (EMPNAME CHAR(50), EMPNBR INT)
    7                             -- EMP will be created in collection DEPT     8          CREATE INDEX EMPIND ON EMP(EMPNBR)
    9                             -- EMPIND will be created in DEPT    10          GRANT SELECT ON EMP TO PUBLIC;  -- grant authority    11
   12     INSERT INTO DEPT/EMP VALUES('JOHN SMITH', 1234);
   13                              /* table must be qualified since no    14                                 longer in the schema */
   15
   16     CREATE SCHEMA AUTHORIZATION MANAGER    17                               -- this schema will use MANAGER's    18                               -- user profile    19           CREATE TABLE EMP_SALARY (EMPNBR INT, SALARY DECIMAL(7,2),
   20                                    LEVEL CHAR(10))
   21           CREATE VIEW LEVEL AS SELECT EMPNBR, LEVEL    22                FROM EMP_SALARY    23           CREATE INDEX SALARYIND ON EMP_SALARY(EMPNBR,SALARY)
   24
   25           GRANT ALL ON LEVEL TO JONES GRANT SELECT ON EMP_SALARY TO CLERK    26                    -- Two statements can be on the same line * * * * *  E N D  O F  S O U R C E  * * * * *
5722SS1 V5R4M0 060210      Run SQL Statements          SCHEMA           02/10/06 15:35:18   Page   3
Record  *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8  SEQNBR  Last change MSG ID  SEV  RECORD  TEXT SQL7953   0       1  Position 1 Drop of DEPT in QSYS complete.
SQL7953   0       3  Position 3 Drop of MANAGER in QSYS complete.
SQL7952   0       5  Position 3 Schema DEPT created.
SQL7950   0       6  Position 8 Table EMP created in DEPT.
SQL7954   0       8  Position 8 Index EMPIND created in DEPT on table EMP in 
                     DEPT.
SQL7966   0      10  Position 8 GRANT of authority to EMP in DEPT completed.
SQL7956   0      10  Position 40 1 rows inserted in EMP in DEPT.
SQL7952   0      13  Position 28 Schema MANAGER created.
SQL7950   0      19  Position 9 Table EMP_SALARY created in collection                      MANAGER.
SQL7951   0      21  Position 9 View LEVEL created in MANAGER.
SQL7954   0      23  Position 9 Index SALARYIND created in MANAGER on table                      EMP_SALARY in MANAGER.
SQL7966   0      25  Position 9 GRANT of authority to LEVEL in MANAGER                      completed.
SQL7966   0      25  Position 37 GRANT of authority to EMP_SALARY in MANAGER                      completed.
 
Message Summary Total    Info    Warning    Error    Severe    Terminal    13     13         0         0         0          0
00 level severity errors found in source * * * * *  E N D  O F  L I S T I N G  * * * * *

 

Parent topic:

Using the SQL statement processor