|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: @ T i
Length: 13224 (0x33a8)
Types: TextFile
Notes: @(#)isam.h 13.2 (RC International) 12/12/90 */
Names: »isam.h«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦c6f24efe5⟧ »0007«
└─⟦this⟧ »comp3.0/bsd/usr/include/isam.h«
/* @(#)isam.h 13.2 (RC International) 12/12/90 */
/***************************************************************************
*
* RELATIONAL DATABASE SYSTEMS, INC.
*
* PROPRIETARY DATA
*
* THIS WORK CONTAINS PROPRIETARY INFORMATION AND TRADE SECRETS WHICH ARE
* THE PROPERTY OF RELATIONAL DATABASE SYSTEMS, INC. (RDS). THIS DOCUMENT
* IS SUBMITTED TO RECIPIENT IN CONFIDENCE. THE INFORMATION CONTAINED
* HEREIN MAY NOT BE USED, COPIED OR DISCLOSED IN WHOLE OR IN PART EXCEPT
* AS PERMITTED BY WRITTEN AGREEMENT SIGNED BY AN OFFICER OF RDS.
*
* COPYRIGHT (c) 1981, 1986 RELATIONAL DATABASE SYSTEMS, INC., MENLO PARK,
* CALIFORNIA. All rights reserved. No part of this work covered by the
* copyright hereon may be reproduced or used in any form or by any means
* -- graphic, electronic, or mechanical, including photocopying,
* recording, taping, or information storage and retrieval systems --
* without permission of RDS.
*
* Title: isam.h
* Sccsid: @(#)isam.h 4.12 5/23/86 18:16:45
* Description:
* Header file for programs using C-ISAM.
*
***************************************************************************
*/
/*
* C-ISAM version 3.00
* Indexed Sequential Access Method
* Relational Database Systems, Inc.
*/
/***********************************************************************
/*
/* Edit history:
/*
/* 12-Sep-87 MAN (012)
/* Added EBIGRECN for COBOL85, used when the relative record number
/* read, no longer fits into the COBOL data-item that is to hold it.
/* 24-Aug-87 RPL 011
/* Add error code 166 for bad PL/I F format (PER 6060).
/* Remove tabs from some comments.
/* 10-Aug-87 IAG 010
/* This version is to be used with rev. 3 of ISAM.
/* 4-Jun-87 RPL 009
/* Move extern data and structure declarations outside of #ifdef.
/* 11-May-87 WKD 008
/* Add new file status codes for variable length records.
/* 04-Apr-87 WKD 007
/* Add cobol85 new file status codes.
/* 12-Mar-87 TLF 006
/* Added comment stating that COLLATE3 code is now used by LPI-RPG
/* to support indexed files in EBCDIC collating sequence.
/* 6-Mar-87 ABC 005
/* Comment out extraneous tokens on 'endif' line (non-portable)
/* 21-Jan-87 PLB 004
/* Undo macro defs for ldint/stint for STORAGE_RIGHT_TO_LEFT case
/* (these guys are portable as is)
/* 30-Jul-86 RCG 003
/* Corrected a #end to #endif (causing cc problems)
/* 10-Jul-86 PLB
/* Handle macro defs for ldint/stint for 386 portability
/* Add Error defs 142-149 to match with RTLERRORS_IN
/* Reverse edit history
/* 30-Jan-86 nlb
/* Add error code for not open for read
/* 21-Aug-85 RPL
/* Add definitions to support RPG packed keys.
/*
/**********************************************************************/
#ifndef _ISAM_H /* avoid multiple include problems */
#define _ISAM_H
#define CHARTYPE 0
#define DECIMALTYPE 0
#define CHARSIZE 1
#define INTTYPE 1
#define INTSIZE 2
#define LONGTYPE 2
#define LONGSIZE 4
#define DOUBLETYPE 3
#define DOUBLESIZE (sizeof(double))
#define FLOATTYPE 4
#define FLOATSIZE (sizeof(float))
/* the following 2 defines are to support RPG Packed keys: */
#define PACKTYPE 100
#define PACKSIZE 0
#define USERCOLL(x) ((x))
#define COLLATE1 0x10
#define COLLATE2 0x20
/* COLLATE3 is used by LPI_RPG to support indexed files in EBCDIC collating sequence */
#define COLLATE3 0x30
#define COLLATE4 0x40
#define COLLATE5 0x50
#define COLLATE6 0x60
#define COLLATE7 0x70
#define MAXTYPE 5
#define ISDESC 0x80 /* add to make descending type */
#define TYPEMASK 0x7F /* type mask */
#ifdef BBN /* BBN Machine has 10 bits/byte */
#define BYTEMASK 0x3FF /* mask for one byte */
#define BYTESHFT 10 /* shift for one byte */
#else
#define BYTEMASK 0xFF /* mask for one byte */
#define BYTESHFT 8 /* shift for one byte */
#endif
#ifndef ldint
#define ldint(p) ((short)(((p)[0]<<BYTESHFT)+((p)[1]&BYTEMASK)))
#define stint(i,p) ((p)[0]=(i)>>BYTESHFT,(p)[1]=(i))
#endif ldint
#define ISFIRST 0 /* position to first record */
#define ISLAST 1 /* position to last record */
#define ISNEXT 2 /* position to next record */
#define ISPREV 3 /* position to previous record */
#define ISCURR 4 /* position to current record */
#define ISEQUAL 5 /* position to equal value */
#define ISGREAT 6 /* position to greater value */
#define ISGTEQ 7 /* position to >= value */
/* isread lock modes */
#define ISLOCK 0x100 /* record lock */
#define ISWAIT 0x400 /* wait for record lock */
#define ISLCKW 0x500 /* ISLOCK + ISWAIT */
#define ISSLEEPLOCK 0x1000 /* IAG */
/* isopen, isbuild lock modes */
#define ISAUTOLOCK 0x200 /* automatic record lock */
#define ISMANULOCK 0x400 /* manual record lock */
#define ISEXCLLOCK 0x800 /* exclusive isam file lock */
#define ISINPUT 0 /* open for input only */
#define ISOUTPUT 1 /* open for output only */
#define ISINOUT 2 /* open for input and output */
#define ISTRANS 4 /* open for transaction proc */
#define ISNOLOG 8 /* no loggin for this file */
/* audit trail mode parameters */
#define AUDSETNAME 0 /* set new audit trail name */
#define AUDGETNAME 1 /* get audit trail name */
#define AUDSTART 2 /* start audit trail */
#define AUDSTOP 3 /* stop audit trail */
#define AUDINFO 4 /* audit trail running ? */
#define MAXKEYSIZE 120 /* max number of bytes in key */
#define NPARTS 8 /* max number of key parts */
#define k_start k_part[0].kp_start
#define k_leng k_part[0].kp_leng
#define k_type k_part[0].kp_type
#define ISNODUPS 000 /* no duplicates allowed */
#define ISDUPS 001 /* duplicates allowed */
#define DCOMPRESS 002 /* duplicate compression */
#define LCOMPRESS 004 /* leading compression */
#define TCOMPRESS 010 /* trailing compression */
#define COMPRESS 016 /* all compression */
#define ISCLUSTER 020 /* index is a cluster one */
#define EDUPL 100 /* Duplicate record */
#define ENOTOPEN 101 /* File not open */
#define EBADARG 102 /* Illegal argument */
#define EBADKEY 103 /* Illegal key desc */
#define ETOOMANY 104 /* Too many files open */
#define EBADFILE 105 /* Bad isam file format */
#define ENOTEXCL 106 /* Non-exclusive access */
#define ELOCKED 107 /* Record locked */
#define EKEXISTS 108 /* Key already exists */
#define EPRIMKEY 109 /* Is primary key */
#define EENDFILE 110 /* End/begin of file */
#define ENOREC 111 /* No record found */
#define ENOCURR 112 /* No current record */
#define EFLOCKED 113 /* File locked */
#define EFNAME 114 /* File name too long */
#define ENOLOK 115 /* Can't create lock file */
#define EDUPWARN 116 /* Duplicate record (warning) */
#define ENOCRP 117 /* Current record pointer undefined */
#define EBADMEM 118 /* Can't alloc memory */
#define EBADCOLL 119 /* Bad custom collating */
#define EINVOP 120 /* Invalid operation */
#define EBOUNDARY 121 /* Boundary violation on write */
#define EBOUNDSQ 122 /* Boundary violation on sq file */
#define EFNOTAVL 123 /* Not available, closed w/ lock */
#define EINVOPN 124 /* Inconsistent attributes */
#define EOPKYAPP 125 /* Open -APPEND on KEYED file */
#define EOPILDAM 126 /* Open -DAM on non-IDRECT file */
#define EOPKYSAM 127 /* Open -SAM on KEYED file */
#define EILLREAD 128 /* Read on output file */
#define EILLWRITE 129 /* Write on input file */
#define ENOTCLOS 130 /* Open on file not yet closed */
#define EKEYSEQ 131 /* KEY specified on sequential file */
#define EKEYSTR 132 /* KEY specified on stream file */
#define ENKYKEY 133 /* No KEY specified on KEYED file */
#define ENPRINT 134 /* Not a PRINT file */
#define ENSTREAM 135 /* Not a STREAM file */
#define ECALLNF 136 /* CALL dataname name not found */
#define EBFORMAT 137 /* B-format error (35) */
#define EBIFORMAT 138 /* BI format error (36) */
#define ECFORMAT 139 /* C format error (32) */
#define EEFORMAT 140 /* E format error (34) */
#define EIOSTACK 141 /* I/O stack overflow */
#define ECONVERT 142 /* Conversion error */
#define ELISTOVF 143 /* LIST input item too long */
#define EIMPOPEN 144 /* Implicit open failed */
#define EEOFFMT 145 /* EOF found while parsing edited input */
#define EENDSTR 146 /* End of string on GET/PUT STRING */
#define EINVSFMT 147 /* Invalid format item for GET/PUT STRING */
#define EINVIFMT 148 /* Invalid format for GET */
#define ERPGSCR 149 /* Cannot initialize RPG screens */
#define ENOTOPRD 150 /* Not open for read */
#define EILLREW 151 /* REWRITE on input file */
#define ENOPOPEN 152 /* File not OPEN on NON-OPTIONAL */
#define EOPOPEN 153 /* File OPEN on OPTIONAL */
#define ESEQERR 154 /* Sequential error on REW or DELE COBOL85 */
#define ESEQERNR 155 /* Sequential error no next record COBOL85 */
#define EBADSIZE 156 /* Bad record size on variable length record */
#define ELOGREAD 157 /* Cannot read log rec */
#define EBADLOG 158 /* Bad log record */
#define ELOGOPEN 159 /* Cannot open log file */
#define ELOGWRIT 160 /* Cannot write log rec */
#define ENOTRANS 161 /* No transaction */
#define ENOSHMEM 162 /* No shared memory */
#define ENOBEGIN 163 /* No begin work yet */
#define ENONFS 164 /* Can't use nfs */
#define EAUDIT 165 /* Audit trail exists */
#define EFFORMAT 166 /* F format error */
#define EBIGRECN 167 /* Record number tobig for data item */
/* NOTE: Any error codes added to the end of the list above MUST be */
/* duplicated in errmap.h for COBOL error mapping and in */
/* rtlerrs.in for use by PL/I runtimes. Corresponding changes */
/* should be recorded in the language User's Guides. */
/*
* For system call errors
* iserrno = errno (system error code 1-99)
* iserrio = IO_call + IO_file
* IO_call = what system call
* IO_file = which file caused error
*/
#define IO_OPEN 0x10 /* open() */
#define IO_CREA 0x20 /* creat() */
#define IO_SEEK 0x30 /* lseek() */
#define IO_READ 0x40 /* read() */
#define IO_WRIT 0x50 /* write() */
#define IO_LOCK 0x60 /* locking() */
#define IO_IOCTL 0x70 /* ioctl() */
#define IO_IDX 0x01 /* index file */
#define IO_DAT 0x02 /* data file */
#define IO_AUD 0x03 /* audit file */
#define IO_LOK 0x04 /* lock file */
#define IO_SEM 0x05 /* semaphore file */
#define AUDHEADSIZE 14 /* num of bytes in audit header */
#ifndef ldlong
long ldlong();
#endif ldlong
#ifndef NOFLOAT
#ifndef ldfloat
double ldfloat();
#endif ldfloat
#ifndef lddbl
double lddbl();
#endif lddbl
double ldfltnull();
double lddblnull();
#endif
struct keypart
{
short kp_start; /* starting byte of key part */
short kp_leng; /* length in bytes */
short kp_type; /* type of key part */
};
struct keydesc
{
short k_flags; /* flags */
short k_nparts; /* number of parts in key */
struct keypart
k_part[NPARTS]; /* each key part */
/* the following is for internal use only */
short k_len; /* length of whole key */
long k_rootnode; /* pointer to rootnode */
};
struct dictinfo
{
short di_nkeys; /* number of keys defined */
short di_recsize; /* data record size */
short di_idxsize; /* index record size */
long di_nrecords; /* number of records in file */
};
extern int iserrno; /* isam error return code */
extern int iserrio; /* system call error code */
extern long isrecnum; /* record number of last call */
extern char isstat1; /* cobol status characters */
extern char isstat2;
extern char *isversnumber; /* C-ISAM version number */
extern char *iscopyright; /* RDS copyright */
extern char *isserial; /* C-ISAM software serial number */
extern int issingleuser; /* set for single user access */
extern int is_nerr; /* highest C-ISAM error code */
extern char *is_errlist[]; /* C-ISAM error messages */
/* error message usage:
* if (iserrno >= 100 && iserrno < is_nerr)
* printf("ISAM error %d: %s\n", iserrno, is_errlist[iserrno-100]);
*/
struct audhead
{
char au_type[2]; /* audit record type aa,dd,rr,ww*/
char au_time[4]; /* audit date-time */
char au_procid[2]; /* process id number */
char au_userid[2]; /* user id number */
char au_recnum[4]; /* record number */
};
#endif