Table of Contents Previous Next PDF


RECORD Features

RECORD Features
This topic includes the following sections:
RECORD Features
The RECORD facility is particularly useful when the data is transferred between COBOL language and C language. Under such condition, RECORD buffer type can be used in C language, and copybook is used in COBOL language.
The RECORD facility has the following features:
The cpy2record tool is used to generate record descriptions (stored in binary format) that are interpreted by your application programs at run time. For more information, see cpy2record in Oracle Tuxedo Command Reference.
A source record file is an ordinary text file that contains one or more source record descriptions, and often the existing COBOL copybook file is used. Source record files are used as input to cpy2record, which generates the record description files.
Following table lists cpy2record supported clauses in COBOL copybook file.
 
OCCURS specifies tables whose elements can be referred to by indexing or subscripting. Fixed-length tables are supported; the following phrases are not supported: ASCENDING KEY and DESCENDING KEY phrases, INDEXED BY phrase, and OCCURS DEPENDING ON phrases (variable-length tables).
PICTURE specifies the general characteristics and editing requirements of an elementary item. The supported symbols in PICTURE clause are A, B, E, G, N, P, S, V, X, Z, 9, 0, /, ,, ., +, -, *, C, and D.
SIGN specifies the position and mode of representation of the operational sign for the signed numeric item to which it applies.
USAGE specifies the format in which data is represented in storage. The supported phrases are: BINARY, COMP, COMP-1, COMP-2, COMP-3, COMP-4, COMP-5, COMPUTATIONAL, COMPUTATIONAL-1, COMPUTATIONAL-2, COMPUTATIONAL-3, COMPUTATIONAL-4, COMPUTATIONAL-5, DISPLAY, DISPLAY-1, NATIONAL, and PACKED-DECIMAL. Unsupported phrases are: NATIVE, INDEX, POINTER, PROCEDURE-POINTER, FUNCTION-POINTER, and OBJECT REFERENCE.
Note:
The following clauses in COBOL copybook file are not supported by cpy2record: BLANK WHEN ZERO, EXTERNAL, GLOBAL, JUSTIFIED, GROUP-USAGE, REDEFINES, RENAMES, SYNCHRONIZED, and VALUE.
The RECORD functions are Rinit(), Rget(), Rset(), and Frneeded(). Upon calling any record function, the named record description file, if found, is loaded into the record file cache automatically. Each file specified in the environment variable RECORDFILES is searched in order. The first record description file with the specified name is loaded. Subsequent record description files with the same name, if any, are ignored. For more information, see RECORD Functions in Programming An Oracle Tuxedo ATMI Application Using FML.
Setting up Your Environment for RECORD
The following variables are used throughout FML to access record files:
RECORDFILES - this variable should contain a comma-separated list of record description files for the application. Files given as full path names are used as is; files listed as relative path names are searched for through the list of directories specified by RECORDDIR variable. If RECORDFILES is not set, the single file name record.R is used (RECORDDIR still applies; see below).
RECORDDIR - this variable specifies a colon-separated list of directories to be used to find record files with relative filenames. Its usage is similar to the PATH environment variable. If RECORDDIR is not set or is NULL, then its value is taken to be the current directory.
 

Copyright © 1994, 2017, Oracle and/or its affiliates. All rights reserved.