!!!! Mainframe Samples !!!!
| Program (source code) | Description |
| COBDYNA.txt | Dynamic SQL update |
| COBDYNB.txt | Dynamic SQL fetch |
| COBDYNC.txt | Dynamic SQL fetch using SQLDA |
| DB2CBLN.txt | Multi-row fetch cursor |
| DB2SCRL.txt | Scrollable cursor |
| DB2UPDT.txt | Update cursor |
|
Call Db2 Native SQL Stored Procedure with result set SQL for MEDIAN_RESULT_SET Stored Procedure |
|
|
Call Db2 Native SQL Stored Procedure SQL for GET_EMP_NAME Stored Procedure SQL for RETURN_DEPT_SALARY Stored Procedure |
| Program (Source Code) | Description |
| db2panda.py | Create Panda DataFrame |
| db2parm.py | Prepare and execute SQL statements with variable input |
| db2proc.py | Call Db2 Native SQL Stored Procedure |
| logindata.py | Db2 login details (update as required) |
| Program (Source Code) | Description |
| data.properties | Java properties file (update as required) |
| READEMP.txt | SQL for READ_EMP Stored Procedure |
| db2seldata.java | Read Db2 data using JDBC |
| db2proc.java | Call Db2 Native SQL Stored Procedure |
| db2procparm.java | Call Db2 Native SQL Stored Procedure with parameters |
| Program (source code) | Description |
| db2server_php.txt | Db2 connection parameters (update as required) |
| db2sel_php.txt | Prepare and execute SQL statements |
| db2fetch_php.txt | Read Db2 data using $_GET input variable |
| db2callproc_php.txt | Call Db2 Native SQL Stored Procedure with parameters |
| db2selparm_php.txt | Prepare and execute SQL statements with variable input |
| Program (source code) | Description |
| db2static.sqc | Run static SQL |
| db2dynamic.sqc | Run dynamic SQL |
| db2callproc.sqc | Call Db2 Native SQL Stored Procedure with parameters |
| db2callprocset.sqc | Call Db2 Native SQL Stored Procedure with result set |
| Program (source code) | Description |
| REXX_Db2_Select.txt | Run Db2 Select SQL |
| REXX_Db2_Update.txt | Run Db2 Update SQL (multiple rows using cursor) |
| REXX_Db2_SP.txt | Call Db2 Native SQL Stored Procedure with parameters |
| REXX_Db2_SP_Set.txt | Call Db2 Native SQL Stored Procedure with result set |
| Program (source code) | Description |
|
COBOL code for Stored Procedure SQL for Stored Procedure (Parameter Style General) COBOL program to invoke Stored Procedure : EMPDTL1C |
|
|
COBOL code for Stored Procedure SQL for Stored Procedure (Parameter Style General with Nulls) COBOL program to invoke Stored Procedure : EMPDTL2C |
|
|
COBOL code for Stored Procedure SQL for Stored Procedure (Parameter Style DB2SQL) COBOL program to invoke Stored Procedure : EMPDTL3C |
|
|
COBOL code for Stored Procedure SQL for Stored Procedure (Parameter Style DB2SQL with DBINFO) COBOL program to invoke Stored Procedure : EMPDTL4C |
|
|
COBOL code for Stored Procedure SQL for Stored Procedure COBOL program to invoke Stored Procedure : GETEMPDT |
| Program (source code) | Description |
|
SQL for External Stored Procedure EMPDTLSR REXX code for EMPDTLSR |
|
|
SQL for External Stored Procedure returning a result set REXX code for EMPRSETR |
| Program (source code) | Description |
|
C code for Stored Procedure SQL for Stored Procedure (Parameter Style General) C program to invoke Stored Procedure : EMPDTL1P |
|
|
C code for Stored Procedure SQL for Stored Procedure (Parameter Style General with Nulls) C program to invoke Stored Procedure : EMPDTL2P |
|
|
C code for Stored Procedure SQL for Stored Procedure (Parameter Style General with Nulls returning a Result Set) C program to invoke Stored Procedure : EMPRSETP |
| Program (source code) | Description |
|
JAVA code for Stored Procedure SQL for Stored Procedure (Parameter Style JAVA) JAVA program to invoke Stored Procedure : EmpDtlsJ |
|
|
JAVA code for Stored Procedure SQL for Stored Procedure (Parameter Style JAVA returning a Result Set) JAVA program to invoke Stored Procedure : EmpRsetJ |
|
|
SQLJ code for Stored Procedure SQL for Stored Procedure (Parameter Style JAVA) |
|
|
SQLJ code for Stored Procedure SQL for Stored Procedure (Parameter Style JAVA returning a Result Set) |
| Program (source code) | Description |
| SP_EMPDTLSS.txt | SQL for Stored Procedure EMPDTLSS |
| SP_EMPRSETS.txt | SQL for Stored Procedure returning a result set |
| Name | Type (JCL/PROC) | Description |
| JCL_COBCOMP.txt | JCL | Compile, Link-Edit & Run a COBOL program (No Db2 access) |
| JCL_DB2COMP.txt | JCL | Pre-Compile, Compile, Link-Edit & Bind a COBOL program (with Db2 access). For External Stored Procedure program use “INCLUDE SYSLIB(DSNRLI)” in SYSIN of Link-Edit step. |
| JCL_COMPC.txt | JCL | Compile, Link-Edit & Run a C program (No Db2 access) |
| JCL_DB2COMPC.txt | JCL | Pre-Compile, Compile, Link-Edit & Bind a C program (with Db2 access). For External Stored Procedure program use “INCLUDE SYSLIB(DSNRLI)” in SYSIN of Link-Edit step. |
| JCL_COMPSQLP.txt | JCL | Compile, Link-Edit & Bind a Db2 SQL Stored Procedure |
| JCL_DB2JAVA.txt | JCL | Compile & Run a Java program (with Db2 access) |
| JCL_BINDPLAN.txt | JCL | Bind a Db2 Plan |
| JCL_BINDPKG.txt | JCL | Bind a Db2 Package |
| JCL_DB2_Run.txt | JCL | Run a Db2 program |
| JCL_VSAMALT.txt | JCL | Create VSAM & Alternate Index |
| JCL_OCOPY.txt | JCL | Copy data between an MVS data set and the z/OS UNIX file system |
| JCL_REXXCMP.txt | JCL | Compile, Link-Edit & Run a REXX program of OBJ type |
| PROC_DB2COMP.txt | PROC | Pre-Compile, Compile, Link-Edit & Bind a COBOL program (with Db2 access). For External Stored Procedure program use “INCLUDE SYSLIB(DSNRLI)” in SYSIN of Link-Edit step. |
| PROC_DSNHC.txt | PROC | Pre-Compile, Compile, Link-Edit & Bind a C program (with Db2 access). For External Stored Procedure program use “INCLUDE SYSLIB(DSNRLI)” in SYSIN of Link-Edit step. |
| PROC_DSNHSQL.txt | PROC | Compile, Link-Edit & Bind a Db2 SQL Stored Procedure |
| PROC_CBCXCB.txt | PROC | Compile & Link-Edit a C program (No Db2 access) |
| PROC_REXXCL.txt | PROC | Compile & Link-Edit a REXX program of OBJ type |