10.12.2012 Views

Application Programming and SQL Guide - Kmlinux

Application Programming and SQL Guide - Kmlinux

Application Programming and SQL Guide - Kmlinux

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

|<br />

CICS . . . . . . . . . . . . . . . . . . . . . . . . . . . 940<br />

Appendix C. Running the productivity-aid sample programs . . . . . . 941<br />

Running DSNTIAUL . . . . . . . . . . . . . . . . . . . . . . 942<br />

Running DSNTIAD . . . . . . . . . . . . . . . . . . . . . . . 946<br />

Running DSNTEP2 <strong>and</strong> DSNTEP4 . . . . . . . . . . . . . . . . . 947<br />

Appendix D. <strong>Programming</strong> examples . . . . . . . . . . . . . . . 951<br />

Sample COBOL dynamic <strong>SQL</strong> program . . . . . . . . . . . . . . . 951<br />

Pointers <strong>and</strong> based variables . . . . . . . . . . . . . . . . . . 951<br />

Storage allocation . . . . . . . . . . . . . . . . . . . . . . 951<br />

Example . . . . . . . . . . . . . . . . . . . . . . . . . . 952<br />

Sample dynamic <strong>and</strong> static <strong>SQL</strong> in a C program . . . . . . . . . . . . 964<br />

Sample DB2 REXX application . . . . . . . . . . . . . . . . . . 967<br />

Sample COBOL program using DRDA access . . . . . . . . . . . . . 981<br />

Sample COBOL program using DB2 private protocol access . . . . . . . 989<br />

Examples of using stored procedures . . . . . . . . . . . . . . . . 995<br />

Calling a stored procedure from a C program . . . . . . . . . . . . 996<br />

Calling a stored procedure from a COBOL program . . . . . . . . . . 999<br />

Calling a stored procedure from a PL/I program . . . . . . . . . . . 1002<br />

C stored procedure: GENERAL . . . . . . . . . . . . . . . . . 1003<br />

C stored procedure: GENERAL WITH NULLS . . . . . . . . . . . 1006<br />

COBOL stored procedure: GENERAL . . . . . . . . . . . . . . 1008<br />

COBOL stored procedure: GENERAL WITH NULLS . . . . . . . . . 1011<br />

PL/I stored procedure: GENERAL . . . . . . . . . . . . . . . . 1013<br />

PL/I stored procedure: GENERAL WITH NULLS . . . . . . . . . . . 1014<br />

Appendix E. Recursive common table expression examples . . . . . . 1017<br />

Appendix F. REBIND subcomm<strong>and</strong>s for lists of plans or packages 1023<br />

Overview of the procedure for generating lists of REBIND comm<strong>and</strong>s . . . . 1023<br />

Sample SELECT statements for generating REBIND comm<strong>and</strong>s . . . . . . 1023<br />

Sample JCL for running lists of REBIND comm<strong>and</strong>s . . . . . . . . . . 1026<br />

Appendix G. Reserved schema names <strong>and</strong> reserved words . . . . . . 1029<br />

Reserved schema names . . . . . . . . . . . . . . . . . . . . 1029<br />

Reserved words . . . . . . . . . . . . . . . . . . . . . . . 1029<br />

Appendix H. Characteristics of <strong>SQL</strong> statements in DB2 UDB for z/OS 1033<br />

Actions allowed on <strong>SQL</strong> statements . . . . . . . . . . . . . . . . 1033<br />

<strong>SQL</strong> statements allowed in external functions <strong>and</strong> stored procedures . . . . 1036<br />

<strong>SQL</strong> statements allowed in <strong>SQL</strong> procedures . . . . . . . . . . . . . 1038<br />

Appendix I. Program preparation options for remote packages . . . . . 1043<br />

Appendix J. DB2-supplied stored procedures . . . . . . . . . . . 1045<br />

WLM environment refresh stored procedure (WLM_REFRESH) . . . . . . 1045<br />

Environment for WLM_REFRESH . . . . . . . . . . . . . . . . 1046<br />

Authorization required for WLM_REFRESH . . . . . . . . . . . . 1046<br />

WLM_REFRESH syntax diagram . . . . . . . . . . . . . . . . 1046<br />

WLM_REFRESH option descriptions . . . . . . . . . . . . . . . 1046<br />

Example of WLM_REFRESH invocation . . . . . . . . . . . . . . 1047<br />

The CICS transaction invocation stored procedure (DSNACICS) . . . . . . 1048<br />

Environment for DSNACICS . . . . . . . . . . . . . . . . . . 1048<br />

Authorization required for DSNACICS . . . . . . . . . . . . . . 1048<br />

DSNACICS syntax diagram . . . . . . . . . . . . . . . . . . 1049<br />

Contents xvii

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!