HPlogo ALLBASE/SQL C Application Programming Guide: HP 3000 MPE/iX Computer Systems > Chapter 10 Programming with LONG Columns

Defining Input and Output with the LONG Column I/O String

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Both the INSERT and the UPDATE commands allow you to define various input and output parameters for any LONG column. Parameters are specified with a LONG column I/O string. You'll need to understand this string in order to input, change, or retrieve LONG column data. This section offers an overview. See the ALLBASE/SQL Reference Manual for complete syntax.

Using the INSERT or UPDATE command, you pass the string to ALLBASE/SQL as either a host variable or a literal. Host variables are covered in detail in the "Host Variables" chapter.

NOTE: The input and output portions of the I/O string are not positional. In the following examples, < indicates input, and > indicates output. See the ALLBASE/SQL Reference Manual for a full description of I/O operations with LONG columns.

The input portion of the LONG column I/O string specifies the location of data that you want written to the database. It is also referred to as an input device specification. You can indicate a file name or a random heap address.

Use the output portion of the I/O string (output device specification) to indicate where you want LONG column data to be placed when you use the SELECT or FETCH command. You have the option of specifying a file name, part of a file name, or having ALLBASE/SQL specify a file name. You also can direct output to a random heap address. Additional output parameters allow you to append to or overwrite an existing file. Information in the output device specification is stored in the database table and is available to you when a LONG column is selected or fetched (via a LONG column descriptor, discussed later in the section, "Using the LONG Column Descriptor").

It's important to note that files used for LONG column input and output are opened and closed by ALLBASE/SQL for its purposes. You need not open or close such files in your program unless you use them for additional purposes. ALLBASE/SQL does not control input or output device files once they are on the operating system. So, any operation on the file is valid, whether by your application or another application or user of the system. Such files are your responsibility, even before the transaction is complete.

The syntax for the INSERT and UPDATE commands is identical except that the input device is required for the INSERT command.

Feedback to webmaster