| DB Access Class Library for COBOL V1.0 API Reference - Microsoft(R) Windows(R) - - Microsoft(R) Windows NT(R) - - Microsoft(R) Windows(R) 2000 - |
Contents
Index
![]()
|
Chapter 10 Sample Codings Using Methods Provided
Create a bind table and register in such table variables for handling data in the binary format.
IDENTIFICATION DIVISION.
PROGRAM-ID BIND2-APL.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
*Specify the class name used in the program.
REPOSITORY.
:
CLASS BINDTBL AS "*COB-BINDTABLE".
DATA DIVISION.
WORKING-STORAGE SECTION.
*Define an object variable.
01 BIND-A USAGE OBJECT REFERENCE BINDTBL.
:
*Define a variable for setting a count of the number of items to be set in the bind table.
01 ELM-NO PIC S9(9) COMP-5.
:
*Define bind table variables.
01 GET-DATA.
02 GET-DATA-RSV PIC S9(9) COMP-5.
02 GET-DATA-LEN PIC 9(9) COMP-5.
02 GET-DATA-DAT PIC X(20000).
:
PROCEDURE DIVISION.
:
*Set a count of the number of items to be set in the bind table.
MOVE 1 TO ELM-NO.
*Create a bind table object.
INVOKE BINDTBL "NEW" USING ELM-NO RETURNING BIND-A.
*Register a variable in the bind table.
INVOKE BIND-A "REGISTER-LARGE-DATA"
USING GET-DATA-RSV GET-DATA-LEN GET-DATA-DAT.
:
*Collect the object.
SET BIND-A TO NULL.
:
END PROGRAM BIND2-APL.
Contents
Index
![]()
|