Browse Prior Art Database

Oracle and SAS-C Declare Field Generator

IP.com Disclosure Number: IPCOM000111934D
Original Publication Date: 1994-Apr-01
Included in the Prior Art Database: 2005-Mar-26
Document File: 2 page(s) / 48K

Publishing Venue

IBM

Related People

Kennedy, KW: AUTHOR [+2]

Abstract

A program is disclosed that creates C-language declarations of relational database variables. The declarations do not rely on the order of specification, are associated with the correct C datatype, are easily maintained, and have meaningful names. The variables are written to a partitioned dataset which may be included in a C program.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 65% of the total text.

Oracle and SAS-C Declare Field Generator

      A program is disclosed that creates C-language declarations of
relational database variables.  The declarations do not rely on the
order of specification, are associated with the correct C datatype,
are easily maintained, and have meaningful names.  The variables are
written to a partitioned dataset which may be included in a C
program.

      Four initial parameters are required by the program: the
ORACLE* table name, the path for the resulting file, a
three-character abbreviation of the table, and a two-character
abbreviation of the system or work area.

      The program then queries the SYSCATALOG table for all columns
and their attributes belonging to the specified table.  This query
retrieves the name of the column, its type (CHAR, NUMBER, etc.), the
length, width, precision, and whether it is required or not.

      Upon retrieval of all column data, the program creates a member
in the specified path following the convention
(system)GC(table-abbreviation).  For example, if the system is
defined as PR and the table abbreviation is LOC, the member name
would be PRGCLOC.  The GC is explicitly coded to identify this member
as (G)enerated (C)-language code.

      The program creates a defined name for each column in the
format (table_abbreviation)_column-name.  The program also defines a
name for a NULL indicator for those columns which allow NULL.  This
defined name is in the format (table_abbrevi...