SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)

Contents
HP NonStop SQL/MX Programming Manual for C and COBOL523627-004
iv
4. Host Variables in COBOL Programs (continued)
4. Host Variables in COBOL Programs (continued)
Using Host Variables in a COBOL Program 4-10
Character Set Data 4-10
Fixed-Length Character Data 4-11
Variable-Length Character Data 4-12
Numeric Data 4-12
Date-Time and Interval Data 4-13
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