SQL/MX 3.2.1 Programming Manual for C and COBOL (H06.26+, J06.15+)

Contents
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL663854-005
iv
5. Simple and Compound Statements
Using COBOL Data Description Clauses 4-18
Using Indicator Variables in a COBOL Program 4-19
Inserting Null 4-19
Testing for Null or a Truncated Value 4-20
Retrieving Rows With Nulls 4-21
Creating COBOL Host Variables Using INVOKE 4-22
Using the INVOKE Directive 4-23
INVOKE and Date-Time and Interval Host Variables (SQL/MX Release 1.8
Applications) 4-23
COBOL Record Descriptions Generated by INVOKE 4-23
Using Indicator Variables With the INVOKE Directive 4-27
COBOL Example of Using INVOKE 4-29
Character Set Examples 4-30
Selecting From a UCS2 Character Set Into a VARCHAR Host Variable 4-31
Fetching From a UCS2 Character Set into a VARCHAR Host Variable 4-31
5. Simple and Compound Statements
Single-Row SELECT Statement 5-2
Using a Primary Key Value to Select Data 5-2
Selecting a Column With Date-Time or INTERVAL Data Type 5-3
INSERT Statement 5-4
Inserting Rows 5-5
Inserting Null 5-6
Inserting a Date-Time Value 5-7
Inserting an Interval Value 5-8
Searched UPDATE Statement 5-9
Updating a Single Row 5-10
Updating Multiple Rows
5-11
Updating Columns To Null 5-11
Searched DELETE Statement 5-12
Deleting a Single Row
5-12
Deleting Multiple Rows
5-12
Compound Statements 5-13
Assignment Statement
5-15
IF Statement
5-16
Using PROTOTYPE Host Variables as Table Names
5-17
6. Static SQL Cursors
DML Statements for Static SQL Cursors 6-1
Steps for Using a Static SQL Cursor
6-2