Skip to content

Stored Procedure Walkthrough

This section is kept for documentation of legacy processes, see the section on Native SQL stored procedures for more current practices.

Here we show the ZMF Db2 Option stage and promotion processes for SQL stored procedure SQL00002 from the sample used by Db2 Connect (IBM Db2 Connect User's Guide, SC09-4835).

CMNSTG01 STAGE:              ACTP000072 Components              Row 1 to 1 of 1 
Command ===> _________________________________________________ Scroll ===> CSR 

   Name          + Type  Status    Changed         Procname   User     Request 
b  SQL00002        SPQ   INCOMP    20160204 202145            JPRESTO   *BUILD
******************************* Bottom of data ********************************
ISRBROBA NTP.S6.ACTP.STG6.\#000072.SPQ(SQL00002) - 01 Line 00000000 Col 001 080
Command ===> _________________________________________________ Scroll ===> CSR 
********************************* Top of Data **********************************
CREATE PROCEDURE USER15.PROCEDURE2 ( )
    RESULT SETS 1
    LANGUAGE SQL
    EXTERNAL NAME SQL00002
    COLLID TEST
    WLM ENVIRONMENT C105SP
    RUN OPTIONS 'TEST(ALL,*,,VADTCPIP&192.168.1.3:*)'
P1: BEGIN
    DECLARE cursor1 CURSOR WITH RETURN FOR
        SELECT SCHEMA, NAME FROM SYSIBM.SYSROUTINES;
    OPEN cursor1;
END P1
******************************** Bottom of Data ********************************

Staging stored procedure SQL00002 displays the following panel.

CMNSTG04                      Stage: Build                      HISTORY ASSUMED 
Command ===> __________________________________________________

        Package: ACTP000072     Status: DEV     Install Date: 20160229

Staged name . . . . SQL00002                                                  +
Library type . . .  SPQ - DB2 Stored Proc Source - SQL Language
Dataset name . . .  CMNTP.S6.ACTP.STG6.\#000072.SPQ                           +

Language . . . . . . . . . SQL      (Blank for list) 
Compile procedure . . . .  CMNSQL   (Blank for list; ? for designated proc.)
Compile parms . . . . . .  _________________________________
Pgm binder parms . . . . . _________________________________

Enter "/" to select option 
  / Db2 processing 
  / Other Db2 options 
  _ Other options 
  _ Suppress messages 

...

Job statement information: 
  //USER015D JOB (SM-1IKF-SM),'TEST',
  //        CLASS=A,MSGCLASS=X,NOTIFY=JPRESTO
  //*
  //*

Language SQL is associated with compile procedure CMNSQL.

Skeleton CMN$$CEE is customized to provide STEPLIB data set names.

...

ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS        2013/01/31 16.08 PAGE 6 
NEW: CMNTP.S4.V71201.CMNZMF.CUSTOM.SKELS(CMN$$CEE)    OLD: CMNTP.S0.V712.CMNZMF.SKELS(CMN$$CEE)

                     LISTING OUTPUT SECTION (LINE COMPARE)  

ID       SOURCE LINES                                                               TYPE   LEN N-LN# O-LN#  
    ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8  
    //             REGION=0M,                                                                  00008 00008  
    //             COND=(4,LT),                                                                00009 00009  
    //       PARM=('&COMPPRM1',                                                                00010 00010  
    )SEL &COMPPRM2 NE &Z                                                                       00011 00011  
    //             '&COMPPRM2',                                                                00012 00012  
    )ENDSEL &COMPPRM2 NE &Z                                                                    00013 00013  
    )SEL &COMPPRM3 NE &Z                                                                       00014 00014  
    //             '&COMPPRM3',                                                                00015 00015  
    )ENDSEL &COMPPRM3 NE &Z                                                                    00016 00016  
    //             '&COMPOPT')                                                                 00017 00017  
I - //STEPLIB   DD DISP=SHR,DSN=CBC.SCCNCMP                                         RPL=   2   00018 00018 
D - //STEPLIB   DD DISP=SHR,DSN=somnode.SCCNCMP  
I - //          DD DISP=SHR,DSN=CEE.SCEERUN                                                    00019 00019  
D - //          DD DISP=SHR,DSN=somnode.SCEERUN  
    )IM CMN$$SYC                                                                  MAT=   1   00020 00020  
I - //          DD DISP=SHR,DSN=CEE.SCEEH.H                                         RPL=   1   00021 00021  
D - //          DD DISP=SHR,DSN=somnode.SCEEH.H  
    )SEL &DB2PC EQ Y                                                                MAT=   1   00022 00022  
I - //          DD DISP=SHR,DSN=SYS2.DB2810.SDSNC.H                                 RPL=   1   00023 00023  
D - //          DD DISP=SHR,DSN=somnode.SDSNC.H  
    )ENDSEL &DB2PC EQ Y                                                             MAT=  65   00024 00024  
    )CM                                                                                        00025 00025  
    )CM  DEFAULT OPTIONS FOR SQL STOREDP PROCEDURE GENERATED C                                 00026 00026  
    )CM                                                                                        00027 00027  
    //SYSLIN    DD DISP=(,PASS),DSN=&&&&OBJECT&C\#N(&CMPNAME),                                 00028 00028  
    //             UNIT=SYSDA,SPACE=(CYL,(1,1,1)),                                             00029 00029  
    //             DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)                                        00030 00030  
    //SYSPRINT  DD DISP=(,PASS),DSN=&&&&LIST30C&C\#C,                                          00031 00031  
    //             UNIT=&DEFNVUN,SPACE=(CYL,(5,5),RLSE),                                       00032 00032  
    //             DCB=(RECFM=FBM,LRECL=133,BLKSIZE=23275)                                     00033 00033 
*** CHANGE SECTION CUTOFF ****************************** 

Skeleton CMN$PARM is customized to provide execution parameter CCSID(1047) for the Db2 precompiler in skeleton CMN$$PDB. The default CCSID pair for a z/OS 1.8 LE environment is (1047,819), where 1047 indicates the EBCDIC IBM-1047 codepage and 819 indicates the ASCII ISO8859-1 codepage.

...

ISRSUPC   -   MVS/PDF FILE/LINE/WORD/BYTE/SFOR COMPARE UTILITY- ISPF FOR z/OS        2013/01/31 16.08 PAGE 39 
NEW: CMNTP.S4.V71201.CMNZMF.CUSTOM.SKELS(CMN$PARM)     OLD: CMNTP.S0.V712.CMNZMF.SKELS(CMN$PARM)  

                     LISTING OUTPUT SECTION (LINE COMPARE)  

ID       SOURCE LINES                                                               TYPE   LEN N-LN# O-LN#  
    ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8  
    )SET LINKPRM2 = &Z                                                                         00575 00575  
    )SET LINKPRM3 = &Z                                                                         00576 00576  
    )CM                                                                                        00577 00577  
    )ENDSEL &LNGNAME EQ SASC                                                                   00578 00578  
    )CM                                                                                        00579 00579  
    )CM                                                                                        00580 00580  
    )CM                                         SQL                                            00581 00581  
    )CM                                                                                        00582 00582  
    )SEL &LNGNAME EQ SQL                                                                       00583 00583  
    )CM                                                   DB2 PRECOMPILE                       00584 00584  
I - )SET DB2PPRM1 = HOST(C),MARGINS(1,80),CCSID(1047)                               RPL=   1   00585 00585  
D - )SET DB2PPRM1 = HOST(C),MARGINS(1,80)  
    )SET DB2PPRM2 = &Z                                                              MAT=  22   00586 00586  
    )SET DB2PPRM3 = &Z                                                                         00587 00587  
    )CM                                                   COMPILE                              00588 00588  
    )SET COMPPRM1 = /OPTFILE(DD:SYSOPTF)                                                       00589 00589  
    )SET COMPPRM2 = &Z                                                                         00590 00590  
    )SET COMPPRM3 = &Z                                                                         00591 00591  
    )CM                                                        SYSOPTF DD                      00592 00592  
    )SET COMPOPT1 = NOSEQUENCE,MARGINS(1,80)                                                   00593 00593  
    )SET COMPOPT2 = &Z                                                                         00594 00594  
    )SET COMPOPT3 = &Z                                                                         00595 00595 
*** CHANGE SECTION CUTOFF ****************************** 

The EBCDIC CCSID for Db2 subsystem C105 is 1047, which can be viewed in the Subsystem Parameters panel DSNTIPF.

Subsystem Parameters

This is the DBB for SQL00002.

...

ISRBROBA NTP.S6.ACTP.STG6.\#000072.DBB(SQL00002) - 01 Line 00000000 Col 001 080
Command ===>                                                    Scroll ===> CSR
******************************** Top of Data **********************************
BIND PLAN(SQL00002) PKLIST(CMN6.SQL00002) ACT(REP) -
    ISO(CS) EXPLAIN(NO) VALIDATE(BIND) ACQUIRE(USE) RELEASE(COMMIT)
******************************* Bottom of Data ********************************

Stage job steps for stored procedure SQL00002 are shown in this job output.

...

                    J E S 2 J O B L O G -- S Y S T E M C 0 0 1 -- N O D E M P 3 J E S 2

20.29.41 J0984224 ---- THURSDAY, 04 FEB 2016 ----  
20.29.41 J0984224  IRR010I  USERID SERT    IS ASSIGNED TO THIS JOB.  
20.29.45 J0984224  ICH70001I SERT     LAST ACCESS AT 20:25:07 ON THURSDAY, FEBRUARY 4, 2016  
20.29.45 J0984224  $HASP373 USER015D STARTED - INIT 1    - CLASS A        - SYS C001  
20.29.46 J0984224 -                                               --TIMINGS (MINS.)--              -----PAGING COUNTS----
20.29.46 J0984224 -STEPNAME PROCSTEP      RC   EXCP   CONN   TCB    SRB  CLOCK   SERV   WORKLOAD   PAGE  SWAP   VIO  SWAPS
20.29.46 J0984224 -SERCOPY                00    200    253   .00    .00     .0  38740   BATCH         0     0     0      0
20.29.49 J0984224 -WRITE                  00    739    748   .00    .00     .0  52102   BATCH         0     0     0      0
20.29.50 J0984224 -SQL2C                  00    479    226   .00    .00     .0  21822   BATCH         0     0     0      0
20.29.51 J0984224 -DB2PC                  00    363    154   .00    .00     .0  15849   BATCH         0     0     0      0
20.29.52 J0984224 -BT90DBR                00    127    178   .00    .00     .0   8612   BATCH         0     0     0      0
20.30.21 J0984224 -C                      00  22496   6925   .01    .00     .4  9536K   BATCH       639     0     0      0
20.30.22 J0984224 -SSIDN                  00    105    105   .00    .00     .0  16501   BATCH         0     0     0      0
20.30.24 J0984224 -PLKED                  00    650   1115   .00    .00     .0  27544   BATCH         0     0     0      0
20.30.24 J0984224 -ALOC                   00     15     11   .00    .00     .0    926   BATCH         0     0     0      0
20.30.24 J0984224 -ALOCIN                 00     34     26   .00    .00     .0   3963   BATCH         0     0     0      0
20.30.26 J0984224 -LNK                    00    328    195   .00    .00     .0  45995   BATCH         0     0     0      0  
20.30.27 J0984224 -BT90STL                00    234    155   .00    .00     .0  38530   BATCH         0     0     0      0
20.30.28 J0984224 -CPYSTL                 00    258    225   .00    .00     .0  49494   BATCH         0     0     0      0
20.30.29 J0984224 -CPYDBR                 00    145    123   .00    .00     .0  18455   BATCH         0     0     0      0
20.30.31 J0984224 -SUCCESS                00    852    589   .00    .00     .0  73243   BATCH         0     0     0      0
20.30.32 J0984224 -CHKCOND                00     13      9   .00    .00     .0    955   BATCH         0     0     0      0
20.30.32 J0984224 -FAILURE             FLUSH      0      0   .00    .00     .0      0   BATCH         0     0     0      0
20.30.33 J0984224 -PRINT                  00    487    491   .00    .00     .0  58834   BATCH         0     0     0      0
20.30.34 J0984224 -COMPLST                00    143    171   .00    .00     .0  17747   BATCH         0     0     0      0
20.30.35 J0984224 -ILODLST                00    693    521   .00    .00     .0  45988   BATCH         0     0     0      0
20.30.37 J0984224 -USER015D ENDED.   NAME-TEST                 TOTAL TCB CPU TIME=      .03 TOTAL ELAPSED TIME= .8  
20.30.37 J0984224 $HASP395 USER015D ENDED  
------ JES2 JOB STATISTICS ------   
  04 FEB 2016 JOB EXECUTION DATE   
          510 CARDS READ   
        2,104 SYSOUT PRINT RECORDS  
            0 SYSOUT PUNCH RECORDS   
          113 SYSOUT SPOOL KBYTES   
         0.92 MINUTES EXECUTION TIME

Package promotion job steps are shown in the following job output.

...

                    J E S 2 J O B L O G -- S Y S T E M C 0 0 1 -- N O D E M P 3 J E S 2    

15.22.18 J0994386 ---- TUESDAY,  09 FEB 2016 ----  
15.22.18 J0994386  IRR010I  USERID SERT    IS ASSIGNED TO THIS JOB.  
20.29.45 J0994386  ICH70001I SERT     LAST ACCESS AT 15:20:23 ON TUESDAY, FEBRUARY 9, 2016  
20.29.45 J0994386  $HASP373 USER015D STARTED - INIT 1    - CLASS A        - SYS C001  
20.29.46 J0994386 -                                               --TIMINGS (MINS.)--              -----PAGING COUNTS----
20.29.46 J0994386 -STEPNAME PROCSTEP      RC   EXCP   CONN   TCB    SRB  CLOCK   SERV   WORKLOAD   PAGE  SWAP   VIO  SWAPS
20.29.46 J0994386 -DDQSPQ                 00    522    238   .00    .00     .0  27448   BATCH         0     0     0      0
20.29.49 J0994386 -PCLIBER             FLUSH      0      0   .00    .00     .0      0   BATCH         0     0     0      0
15.22.21 J0994386 -SQLSPQ                 00    208    133   .00    .00     .0  31762   BATCH         0     0     0      0
15.22.23 J0994386 -DB2PL                  00    644    479   .00    .00     .0   247K   BATCH         0     0     0      0
15.22.23 J0994386 -C105BND                00    218     94   .00    .00     .0  39113   BATCH         0     0     0      0
15.22.24 J0994386 -CPY1SPQ                00     59     61   .00    .00     .0   7094   BATCH         0     0     0      0
15.22.24 J0994386 -CPY1DBR                00     58     58   .00    .00     .0   7085   BATCH         0     0     0      0
15.22.25 J0994386 -CPY1LST                00     57     71   .00    .00     .0   7938   BATCH         0     0     0      0
15.22.26 J0994386 -CPY1STL                00    126     59   .00    .00     .0  14397   BATCH         0     0     0      0
15.22.26 J0994386 -CPY1PKG                00     57     56   .00    .00     .0   6823   BATCH         0     0     0      0
15.22.27 J0994386 -CPY1DBB                00     57     61   .00    .00     .0   7183   BATCH         0     0     0      0
15.22.27 J0994386 VARY WLM,APPLENV=C105SP,REFRESH
15.22.27 J0994386 -STPSTL                 00    164     99   .00    .00     .0  14238   BATCH         0     0     0      0
15.22.40 J0994386 -SUCCESS                00    708    501   .00    .00     .2  52102   BATCH         0     0     0      0
15.22.40 J0994386 -CHKCOND                00     16     10   .00    .00     .0   1262   BATCH         0     0     0      0
15.22.40 J0994386 -FAILURE             FLUSH      0      0   .00    .00     .0      0   BATCH         0     0     0      0
15.22.41 J0994386 -PRINT                  00     97    117   .00    .00     .0   6706   BATCH         0     0     0      0
15.22.41 J0994386 -CLNLCL              FLUSH      0      0   .00    .00     .0      0   BATCH         0     0     0      0
15.22.41 J0994386 -USER015B ENDED.    NAME-PROMOTE             TOTAL TCB CPU TIME=     .01 TOTAL ELAPSED TIME=     .3
15.22.41 J0994386 $HASP395 USER015B ENDED
------ JES2 JOB STATISTICS ------
  09 FEB 2016 JOB EXECUTION DATE
          354 CARDS READ
        1,293 SYSOUT PRINT RECORDS
            0 SYSOUT PUNCH RECORDS
           70 SYSOUT SPOOL KBYTES
         0.39 MINUTES EXECUTION TIME

This is the SYSPRINT output from promotion job step DDQSPQ.

...

********************************* TOP OF DATA **********************************

CMNDB2DQ: Extract SQL procedure definition from source

--------------------------------------------------------------------------------

CMNDB2DQ: Processing member SQL00002

--------------------------------------------------------------------------------

CMNDB2DQ: Processing completed max RC - 00
******************************** BOTTOM OF DATA ********************************

This is the SYSPRINT output from promotion job step SQLSPQ. This step interrogates Db2 subsystem C105 for an existing procedure named USER15.PROCEDURE2 and DROPS it.

The new procedure is then templated and CREATED in Db2 C105.

...

ChangeMan(R) ZMF  CMNDB2DD - 8.1.0 Dynamic implementation of SQL/DDL components
CMNDB2DD        Processing begins at 15:22:20 on 02/09/2016
 ------------------------------------------------------------------------------
CMNDB2DD SYSIN: TEST=YES  
CMNDB2DD SYSIN: ERRSTOPAFT=0  
CMNDB2DD SYSIN: DROPRC=4  
CMNDB2DD SYSIN: SQLTERM=@  
CMNDB2DD SYSIN: SQUEEZE=YES  
CMNDB2DD SYSIN: TOLSTDNUM=YES  
CMNDB2DD SYSIN: LINEFEED=NO  
CMNDB2DD SYSIN: SRCSCHEMATEMPLATE=  
CMNDB2DD SYSIN: TGTSCHEMATEMPLATE=  
CMNDB2DD SYSIN: SRCCOLLIDTEMPLATE=  
CMNDB2DD SYSIN: TGTCOLLIDTEMPLATE=  
CMNDB2DD SYSIN: SRCQUALTEMPLATE=  
CMNDB2DD SYSIN: TGTQUALTEMPLATE=  
CMNDB2DD SYSIN: SRCOWNERTEMPLATE=  
CMNDB2DD SYSIN: TGTOWNERTEMPLATE=  
CMNDB2DD SYSIN: SRCWLMTEMPLATE=  
CMNDB2DD SYSIN: TGTWLMTEMPLATE=  
CMNDB2DD SYSIN: DB2ID=C105  
CMNDB2DD SYSIN: MBR=SQL00002 
SQLIN: Input cards follow ...    

CREATE PROCEDURE USER15 . PROCEDURE2 ( ) RESULT SETS 1 LANGUAGE SQL EXTE  
RNAL NAME SQL00002 COLLID TEST WLM ENVIRONMENT C105SP RUN OPTIONS 'TEST(  
ALL,*,,VADTCPIP&192.168.1.3:*)' P1 : BEGIN DECLARE CURSOR1 CURSOR WITH R 
ETURN FOR SELECT SCHEMA , NAME FROM SYSIBM . SYSROUTINES ; OPEN CURSOR1  
; END P1   

CMNDD018I Statement generated by autodrop option:  
DROP PROCEDURE USER15.PROCEDURE2 RESTRICT    

CMNDD020I Generated drop processed successfully  
CMNDD003I Work committed     


CMNDD001I Templated SQL sentence extracted from member SQL00002 :    

CREATE PROCEDURE USER15 . PROCEDURE2 ( ) RESULT SETS 1 LANGUAGE SQL EXTE  
RNAL NAME SQL00002 COLLID TEST WLM ENVIRONMENT C105SP RUN OPTIONS 'TEST(  
ALL,*,,VADTCPIP&192.168.1.3:*)' P1 : BEGIN DECLARE CURSOR1 CURSOR WITH R  
ETURN FOR SELECT SCHEMA , NAME FROM SYSIBM . SYSROUTINES ; OPEN CURSOR1  
; END P1   

CMNDD002I Sentence processed successfully.  
CMNDD003I Work committed

-------------------------------------------------------------------------------
CMNDB2DD        Processing completed at 15:22:21 on 02/09/2016    MAX RC = 00

This is the SYSPRINT output from promotion job step DB2PL. No templating is used in this example.

...

ChangeMan(R) ZMF       DB2 Option Plan Lookup Program  TUESDAY FEBRUARY 9, 2016  (2016/040) 15:22:22  
CMNDB2PL - 8.1.0 10/10/2014 11.24   

DB2 Plan Used by ChangeMan ZMF Call Attach Facility:  
Using plan (CMNPLAN)    

Control card input (DDNAME = CMNPLCTL)    

         1 ==>   TYPE=PROMOTE  
         2 ==>   AUTHORITY=OWNER,INSERT  
         3 ==>   INSERTQUAL  
         4 ==>   USEREXIT=(ASM,NOUNLOAD)  
         5 ==>   USERID=JPRESTO  
         6 ==>   PACKAGE=ACTP000072  
         7 ==>   PROJECT=ACTP  
         8 ==>   NOBASEDBBRC=12  
         9 ==>   WARNINGRC=4  
        10 ==>   USEDB2PACKAGE  
        11 ==>   PKLTEMPLATE  
        12 ==>   DB2ID=C105  
        13 ==>   LOGICAL=UNIT  
        14 ==>   PLANTGT=  
        15 ==>   PLANSRC=  
        16 ==>   PKGETGT=  
        17 ==>   PKGESRC=  
        18 ==>   LOCNTGT=  
        19 ==>   LOCNSRC=  
        20 ==>   QUALIFIER=  
        21 ==>   QUALTGT=  
        22 ==>   QUALSRC=  
        23 ==>   OWNER=  
        24 ==>   OWNRTGT=  
        25 ==>   OWNRSRC=  
        26 ==>   REMOTEID=UNIT    

Staged bind control statements in this change package (DDNAME = CMNPLPKG)

          1 ==> MBR=SQL00002    

Staged bind control statements in this change package (DDNAME = CMNPLDBB)     

          1 ==> MBR=SQL00002    

Staged DBRMs in this change package (DDNAME = CMNPLDBR)     

          1 ==> MBR=SQL00002     

The following bind control statements are required:   

Templated fields which are over-long will be truncated in the following table.  
See above (control card input) for full length templates.

Origin of      Staged    Actual    Logical   Plan      Package            Location           Owner     Qualifier DB2   Remote Reject 
Bind Reqmt.    Name      Name      Subsys    Template  Template           Template           Template  Template  Subs  ID    

DD:PKGSSTG     SQL00002  SQL00002  UNIT                ?????????????????? ????????????????  ????????   ????????  C105  UNIT  
DD:DBBSSTG     SQL00002  SQL00002  UNIT      ????????  ?????????????????? ????????????????  ????????   ????????  C105  UNIT      



Ending Status:   

CMN7099I CMNDB2PL ending. No errors were encountered.

This is output from the promotion job DB2 BIND PACKAGE and BIND PLAN, step C105BND. No templating is used for the stored procedure walkthrough.

...

IKJ56644I NO VALID TSO USERID, DEFAULT USER ATTRIBUTES USED  
READY  
DSN SYSTEM(C105 )  
DSN   
 BIND PACKAGE(CMN6) ACTION(REP) EXPLAIN(NO) ISOLATION(CS) VALIDATE(BIND) MEMBER(SQL00002)  
DSNT254I -C105 DSNTBCM2 BIND OPTIONS FOR
          PACKAGE = C105.CMN6.SQL00002.()
          ACTION        REPLACE   
          OWNER         SERT   
          QUALIFIER     SERT   
          VALIDATE      BIND   
          EXPLAIN       NO   
          ISOLATION     CS   
          RELEASE   
          COPY  
DSNT255I -C105 DSNTBCM2 BIND OPTIONS FOR   
          PACKAGE = C105.CMN6.SQL00002.()   
          SQLERROR      NOPACKAGE   
          CURRENTDATA   YES   
          DEGREE        1   
          DYNAMICRULES   
          DEFER   
          NOREOPT       VARS   
          KEEPDYNAMIC   NO   
          IMMEDWRITE    NO   
          DBPROTOCOL    DRDA   
          OPTHINT   
          ENCODING      EBCDIC(01047)   
          PATH  
DSNT232I -C105 SUCCESSFUL BIND FOR   
          PACKAGE = C105.CMN6.SQL00002.()  
DSN   
 BIND PLAN(SQL00002) ACQUIRE(USE) RELEASE(COMMIT) ACTION(REP) EXPLAIN(NO) ISOLATION(CS) VALIDATE(BIND) PKLIST(CMN6.SQL00002) 
DSNT252I -C105 DSNTBCM1 BIND OPTIONS FOR PLAN SQL00002   
          ACTION        REPLACE   
          OWNER         SERT  
          VALIDATE      BIND   
          ISOLATION     CS   
          ACQUIRE       USE   
          RELEASE       COMMIT   
          EXPLAIN       NO   
          DYNAMICRULES  RUN  
DSNT253I -C105 DSNTBCM1 BIND OPTIONS FOR PLAN SQL00002   
          NODEFER       PREPARE   
          CACHESIZE     1024   
          QUALIFIER     SERT   
          CURRENTSERVER   
          CURRENTDATA   YES   
          DEGREE        1   
          SQLRULES      DB2   
          DISCONNECT    EXPLICIT   
          NOREOPT       VARS   
          KEEPDYNAMIC   NO   
          IMMEDWRITE    NO   
          DBPROTOCOL    DRDA   
          OPTHINT   
          ENCODING      EBCDIC(01047)   
          PATH  
DSNT200I -C105 BIND FOR PLAN SQL00002 SUCCESSFUL  
DSN 
END

This is output from promotion job step STPSTL, which executes ZMF stored procedure utility CMNDB2SL. This utility issues z/OS commands to REFRESH the WorkLoad Manager APPlication ENVironment - refer to logical subsystem settings for the application.

...

ChangeMan(R) ZMF      CMNDB2SL - 8.1.0 Recycle Stored Procedures and Functions

CMNDB2SL Processing begins at 15:22:27 on 02/09/2016 --------------------------------------------------------------------------------

CMNDB2SL SYSIN: TEST=NO CMNDB2SL SYSIN: DB2ID=C105 
CMNDB2SL SYSIN: WLMENVMASK=C105* 
CMNDB2SL SYSIN: MBR=SQL00002 VARY WLM,APPLENV=C105SP,REFRESH

-------------------------------------------------------------------------------
CMNDB2SL Processing completed at 15:22:27 on 02/09/2016 MAX RC = 00

Control Center

As shown above in the Db2 Connect Control Center, SQL PROCEDURE2 was created by OWNER SERT with external name SQL00002. The same data shown in the Control Center screenshot can be retrieved using TSO/SPUFI.