SQL/MP Programming Manual for COBOL85

Contents
HP NonStop SQL/MP Programming Manual for COBOL85429326-004
ii
2. Host Variables (continued)
2. Host Variables (continued)
Using Indicator Variables for Null Values 2-10
Inserting a Null Value 2-10
Testing for a Null Value 2-11
Retrieving Rows With Null Values 2-12
Creating Host Variables Using the INVOKE Directive 2-13
Advantages of Using an INVOKE Directive 2-13
COBOL Record Descriptions 2-14
Embedded Sign in a Decimal Data Type 2-17
System-Defined Primary Key (SYSKEY) 2-17
Date-Time and INTERVAL Data Types 2-18
Using Indicator Variables With the INVOKE Directive 2-21
Using INVOKE With SQLCI 2-23
Associating a Character Set With a Host Variable 2-24
Treatment in COBOL Statements 2-25
VARCHAR Data Type 2-25
3. SQL/MP Statements and Directives
Embedding SQL Statements 3-1
Coding SQL Statements and Directives 3-1
Placing SQL Statements and Directives 3-2
Finding Information 3-3
4. Data Retrieval and Modification
Opening and Closing Tables and Views 4-2
Causes of SQL Error 8204 (Lost Open Error) 4-2
Recovering From SQL Error 8204
4-3
Single-Row SELECT Statement
4-4
Using a Column Value to Select Data 4-4
Using a Primary Key Value to Select Data 4-5
Using IN SHARE MODE or IN EXCLUSIVE MODE 4-6
INSERT Statement 4-6
Inserting a Single Row 4-7
Inserting a Null Value 4-7
Inserting a Timestamp 4-8
UPDATE Statement 4-8
Updating a Single Row 4-9
Updating Multiple Rows 4-9
Updating Columns With Null Values 4-10