Conetic Software Systems, Inc.

FreeBSD 2.05 Systems

C/Base 4GL

Version 3.8

September 1995

INSTALLATION GUIDE


This demonstration version is provided for evaluation purposes. It is NOT freeware and may not be resold. This demonstration set has a limit of 1000 records per datafile and allows for 2 concurrent users.

The information in this document is subject to change without notice and should not be construed as a commitment by Conetic Software Systems, Inc.. Changes may be made periodically to the information herein. Such changes will be incorporated in future editions of this document. Conetic Software Systems, Inc. assumes no responsibilities for any errors that may appear in this document.

The Software described in this document is furnished under a license and may only be used in accordance with the terms of such license.

Copyright (c) 1981 - 1995 Conetic Software Systems, Inc.
FreeBSD 2.05 Demonstration C/Base 4GL Development System

Printed in the United States of America

All rights reserved. No part of this document may be reproduced in any form including photostat, microfilm, xerography, and not in information storage and retrieval system, without the permission in writing from Conetic Software Systems, Inc., except by a reviewer who may quote brief passages in a review or as provided in the Copyright Act of 1976.

C/BASE is a trademark of Conetic Software Systems, Inc.
C/BOOKS is a trademark of Conetic Software Systems, Inc.

All names, products, and services mentioned are the trademarks or registered trademarks of their respective organizations.

Conetic Software Systems, Inc.
1012 Navarro
San Antonio, Texas 78205
(210) 225-5185
(800) 541-4580

Release 3.8
FreeBSD Edition


Contents


[Previous] |[Table of Contents] |[Next]


IMPORTANT REQUIRED NOTES

INTRODUCTION

Chapter 1 - Before You Begin

Chapter 2 - Installation Procedure

Chapter 3 - Getting Started

Chapter 4 - Printing

Chapter 5 - Compiling User_Edits

Appendix A

Appendix B

Appendix C

Appendix D

Appendix E


IMPORTANT REQUIRED NOTES



[Previous] |[Table of Contents] |[Next]

IMPORTANT: The FreeBSD KERNEL ***MUST*** have System V Interface communication support. The options below must be included in your KERNEL for CONETIC products to run.

# These three options provide support for System V Interface
# Definition-style interprocess communication, in the form of shared
# memory, semaphores, and message queues, respectively.
#


INTRODUCTION



[Previous] |[Table of Contents] |[Next]

Welcome to Conetic Software Systems C/BASE and C/BOOKS family of information management products. C/BASE and C/BOOKS applications allow the user to transcend computer hardware and operating systems boundaries by providing tools and solutions that offer portability and platform independence.

These instructions describe how to install C/BASE and C/BOOKS using either the diskette distribution or the FTP download file. You should be familiar with the basic administration of the computer, including logging in, starting and stopping the system, and adding new users, as described in the Operations/System Administration Guide and the User/System Administrator’s Reference Manual.

This demonstration set includes the C/BASE 4GL database, the C/BASE Utilities and C/BASE International Utilities. This demo database system has a limit of 1000 records per datafile.

The C/BOOKS software consists of nine fully integrated accounting software modules. The core consists of the General Ledger , Accounts Payable and Accounts Receivable modules. The optional accounting modules are: Fixed Assets , Inventory Control , Job Costing , Order Entry , Purchase Order and Payroll. C/BOOKS also has two supplemental modules: C/BOOKS Utilities and a Demonstration Module which includes demo data for the C/BOOKS data files.

C/BOOKS is not a part of this demo set. Please contact Conetic Software Systems, Inc. for more information on C/BOOKS.

NOTE:Be sure to pay close attention to the Notes and Warnings given throughout these instructions. They will give information we think is vital to successful installation of Conetic’s software.

DISK SPACE REQUIREMENTS

Before installing this software, you should verify that you have enough free disk space which will contain C/BASE. Free disk space can be displayed using the df(1) command. Compare the output of this command with the space requirement table for your platform in Appendix B.

Note: You will initially need twice the amount of space shown in Appendix B for both the installation and the tar file. After installation is complete, the tar file may be removed.

PRE-INSTALLATION CONSIDERATIONS

If C/BASE software already exists on the target CPU then do the following:


1. Before You Begin



[Previous] |[Table of Contents] |[Next]

This section describes the preliminary setup up of your machine before the actual install program is run.

Be sure to pay close attention to Notes and Warnings given throughout these instructions. They give information that is vital to successful installation of the software.

In order to install correctly you must login on the console terminal as root.

1.1 CREATING THE GROUP ID CONETIC


Create a new group ID account named conetic. To create a new group account, follow the procedure outlined in your Operations/System Administration Guide.

1.2 CREATING THE "CBASE" LOGIN ID


Create a new login ID called cbase. When creating the login ID cbase, the group ID entry for the user "cbase" must correspond to the conetic group ID number created in step 1.1. To create the "cbase" login ID, follow the procedure given in your Operations/System Administration Guide.

1.3 CREATING THE "CBASE" HOME DIRECTORY


Make a home directory for the cbase login ID, changing the owner and group ID of the directory to cbase and conetic.

NOTE: If you created the new user following the procedure outlined in your Administrator’s Guide, the home directory for the user cbase may have already been created. It is the responsibility of the system administrator to ensure a directory has been created for the user cbase with the correct ownership ID’s.

1.4 SHELL ENVIRONMENT


C/Base will run under either the bash or sh shell environments. The menu and report programs use the environment variable SHELL to execute other programs. If the SHELL environment variable is not set, the default is set to /bin/sh. The SHELL variable can be set as follows:

1.5 SETTING THE TERMINAL ENVIRONMENT


You must set the TERM environment variables before running the install program.

Partial Supported Terminal Listing:

NOTE: The typical FreeBSD terminal is automatically set.


2. Install and Setup Procedure



[Previous] |[Table of Contents] |[Next]

2.1 DISTRIBUTION MEDIA


The following instructions describe how to install from either a diskette distribution or from a FTP download file. The unzip of the files is the same for both types of distribution (step 2.4). If you are using the diskette distribution please proceed to Section 2.2. If you are using the FTP distribution skip to Section 2.3.

2.2 DISK MEDIA INSTALL


Insert distribution disk #1 into the disk drive and enter the following:

The tar command will prompt you for each disk in order and will build a gzipped tar file.

NOTE: The directory you install to may be different than the above, this is for example only.

NOTE: The floppy drive device name may differ on your machine. Please make the appropriate changes to the instructions. See Appendix C for example device names.

Please proceed to Section 2.4 for setup instructions.

2.3 FTP FILE INSTALL


Download the files README (this file) and CBASE_fbsd_r004.tar.gz. Place these files in the directory that you will install C/BASE. Please proceed to Section 2.4 for setup instructions.

2.4 UNCOMPRESS THE CONETIC C/BASE DEMONSTRATION SOFTWARE


From the directory where C/BASE will be installed, please enter the following commands:

2.5 C/BASE CATALOG SETUP


The C/BASE database catalog must be setup to look to the directory you installed to. The following command will handle all necessary setups and build a start-up file called cbase_env (see section 2.6). Please enter the following from the C/BASE directory:

2.6 C/BASE QUICK START


With C/BASE now installed you may logout of root and login as a C/BASE user. The install.me script will create a file called cbase_env in the C/BASE home directory. The cbase_env script will set the mandatory environment variables required for C/BASE (see section 3.1). The script must be run as follows:

You may now begin the magazine demo with the command:

You can modify the magazine demo with the command:

or create your own application with the command:

You can examine and modify C/BASE system parameters with the command:

Please see the C/Base Reference Manual for more details.


3. Getting Started



[Previous] |[Table of Contents] |[Next]

This section describes the environment variables that must be set for C/BASE to operate correctly and also explains how to start the demo applications.

3.1 MANDATORY ENVIRONMENT VARIABLES


You must set the TERM, CBASE, PATH, TMPDIR and PRINTER environment variables before running any C/BASE or C/BOOKS programs. The next steps describe the commands to set these variables. You should add the commands to the /home/cbase/.profile and the .profile in the home directory of each C/BASE user so these steps need not be repeated each time you log in.

Set the TERM environment variable to the correct terminal type. See the /home/cbase/lib/cbase/escape directory for all available terminal types.

NOTE: The C/BASE package includes definitions for several popular terminals. If your terminal is not on the list, you must define it with the C/BASE program termset or, it must be defined with the terminfo utilities.

Set the CBASE environment variable.

Set the PATH environment variable to search the cbase program directory.

Set the TMPDIR environment variable.

Each user must have a unique TMPDIR work area. This can be achieved by setting

Set the PRINTER environment variable to the command or filename where printed output is to be redirected. The default print spooler for the C/BASE software is lpr. To override the default print spooler, enter:

For example, if you want printed output to go to the lpr print spooler without displaying the spooler ID messages, enter:

If you have finished installing Conetic C/BASE software onto your computer system and you have installed the C/BASE Development System, there is a demonstration application called demo that you (logged in as cbase) can run as follows:

You can examine and modify the "DEMO" application with the following command:

3.2 C/BASE MANUAL PAGES (CSSMAN)


C/BASE now supports on-line manual pages. The man pages are initiated by the command:

If the command is omitted, then cssman will display a table of contents of all commands. An information bar at the bottom of the manual screen displays paging options and exit commands. See Appendix D and E for a list of Commands and Functions.


4: Printing



[Previous] |[Table of Contents] |[Next]

This section describes how to setup printers and print C/BASE reports with the grace program. The grace program is used to run C/BASE reports and will give options on where to send the output of the reports.

4.1 PRINTER SETUP


An unlimited number of printers may be setup in C/BASE. The printer setup utility can be run from the C/BASE catalog menu.

The printer setup utility can also be accessed from the toolkit menu.

NOTE: All applications use the same printer file. You do not need to setup printers for each application.

4.1.1 NAMING THE PRINTER


The printer setup utility form will not allow you to select a unique id for each printer (27, 1150, etc.), a name for that printer (Apple1, MyPrinter, etc.), a device or spooler for that printer, and a reset escape sequence. The reset escape sequence is used to restore the printer back to its original printing mode. If you print a report in compressed mode without resetting the printer, all documents printed afterwards will be in compressed mode.

4.1.2 SETTING PAGE DIMENSIONS


After the printer has been named press F5 to store it. Each named printer can have up to 5 different printing attributes. For each of the 5 attributes you can set page dimensions and printing modes (compressed, landscape, etc.)

4.1.2.1 SETTING PAGE DIMENSIONS


There are 4 dimensions for a page:

The defaults are automatically set in the printer setup form and may be manually overridden.

4.1.2.2 SETTING PRINTER MODES


Printing modes are controlled through the use of escape sequences which can be found in your printer manual. Enter a meaningful name for the sequence and then enter the escape sequence itself. The escape sequence can be entered in two ways:

Before entering this form you will be asked which method to use. The escape sequences are translated through the form. Therefore, if you enter the escape sequences as characters the first time through and decide to later update them as decimal numbers, just select the appropriate method and your previous entries are displayed accordingly.

NOTE: It is not mandatory that escape sequences be set up. You may print to a printer by just completing the first half of this setup.

4.2 PRINTING WITH GRACE


The C/BASE program grace is used to print reports. After grace processes the report (and ONPRINTER is not set or is set to "no") it will display an output destination screen.

The first field of the output destination screen is the output device. Pressing the F3 key will scroll forward through the options and the F2 key will scroll backwards. There are three output destination options:

4.3 PRINTER ENVIRONMENT VARIABLES


The following environment variables are used to control printing.


5: Compiling User_Edits



[Previous] |[Table of Contents] |[Next]

This section describes how to compile a demonstration program which will interact with a C/BASE form. The cssman pages describe the functions available in the C/BASE library. For a more detailed description of the functions see the C/Base Utilities manual.

5.1 ENVIRONMENT VARIABLES


The following environment variables must be set for the C/BASE makefiles

NOTE: The directory "/home/cbase" is used as an example of the C/BASE home directory and may be different on your system. Please make changes to these directions accordingly.

NOTE: These variables were placed in the script file "cbase_env" in the C/BASE home directory when the demo was installed.

5.2 COMPILER


The binaries and library was compiled using the GNU project C compiler Ver 2.4.

5.3 DEMO CODE


An example of a C/BASE user edit is in the directory /home/cbase/demo/src. The file is named sform.c and is part of the magazine subscription applications. With the above environment variables set, the code can be compiled by the command:

The resulting binary is placed in /home/cbase/demo/bin and is run from the "Magizine Demo Menu" when option "2. Enter Subscriptions" is selected.

5.4 EXAMPLE COMPILE LINE


The demo user_edit /home/cbase/demo/src/sform.c and all other C/BASE programs can be compiled manually with the following lines:


APPENDIX A



[Previous] |[Table of Contents] |[Next]

A.1 STANDARD CONETIC ENVIRONMENT VARIABLES


Variable Name - Function

CBASE - The location for the C/BASE catalog files, i.e. CBASE=/home/cbase/lib/cbase.

COUNTRY - The variable which contains the name of a country, used to change Conetic language resource files, i.e. COUNTRY=39. This will set the language resources to Italian.

DBASE - The name of the database being presently utilized, i.e. DBASE=demo.

DBHOME - The home directory of database.

NCOPIES - The number of copies of a report to be printed usually set by GRACE.EXE , i.e. NCOPIES=1.

ONPRINTER - A boolean flag to determine whether reports go to the printer or not, usually set by GRACE.EXE, i.e. ONPRINTER=yes.

PATH - The path to the directories which contain the Conetics executable programs.

PRINTER - The name of a printer to send a report file.

RPATH - The path to the directory which contains the Conetic resource files, overrides the CBASE variable, i.e. RPATH=/home/cbase/lib/cbase/resource.

TERM - The name of a terminal type used by Conetics programs running under FreeBSD, i.e. TERM=cons25, TERM=xterm, etc..

TMPDIR - The location of an existing directory which will hold temporary files. Each user must have a unique TMPDIR work area. This can be achieved by setting TMPDIR=$HOME.


Appendix B



[Previous] |[Table of Contents] |[Next]

B.1 SPACE REQUIREMENTS FOR FreeBSD 2.05


C/BASE 4GL Modules

Approximate Space Requirements


Appendix C



[Previous] |[Table of Contents] |[Next]

C.1 TYPICAL DEVICE NAMES


NOTE: The first number in the device name usually indicates the order of that device in your system configuration. For example, the 3.5" floppy diskette device name /dev/fd0 assumes that the 3.5" floppy drive is setup as device 0. If your system has that device setup in a different order, say device 1, you would access it with the name /dev/fd1.


Appendix D



[Previous] |[Table of Contents] |[Next]

D.1 C/BASE COMMANDS (C-1)


intro - introduction to commands

addlf - add a logical RMSfile to the database catalog

cdef - build a definition for a data file

cdict - build a data dictionary for an RMSfile

cform - build a formfile

clearlf - clear contents in an existing RMSfile

convertlf - convert an existing RMSfile

convform - reformat old style formfile

copies - produce multiple copies

createlf - create a logical RMSfile

creport - build a Visual Reportfile

crw - compile report writer program

csort - sort pull style text lines

cterm - build a terminal definition

dbadd - add a database definition

dbadmin - administer database catalog

dbcreate - create a new database

dbfile - print pathname of logical RMSfile

dbhome - print database home directory

dblist - list database catalog

dbremove - remove a database definition

dbrm - completely remove a database

dbupd - update the database catalog

dcopy - copy RMSfile

deletelf - remove an existing RMSfile

dprint - print the contents of an RMSfile

drestore - restore a database

dspace - compute space required for RMSfile

escape - generate terminal escape sequence

expandl - expand an RMSfile

filedef - create or maintain RMS definition files

form - display input form on terminal, accept input

formadmin - administer formfile catalog

formcopy - copy logical formfile

formdef - create and maintain formfiles used by form

formedit - create or maintain logical formfiles

formrm - remove a logical formfile

formupd - update the logical formfile catalog

grace - run a report writer program

lfadmin - administer RMSfile catalog

lfcopy - copy logical RMS data and definition file

lfedit - create or maintain logical RMSfile definitions

lfrm - remove a logical RMS data and definition file

lfupd - update the logical RMSfile catalog

makelf - make an RMSfile

makelog - make empty log file

menu - display menu on terminal

menudef - create or maintain menufiles used by menu

npull - a fast data record extraction utility (uses indexes)

pdef - print contents of RMS definition

pdict - print data dictionary for RMSfile

pform - print contents of formfile used by form

pindex - print contents of RMS index file

plog - print log file contents

preport - print contents of a visual reportfile

prtset - set up a printer to use with grace

pterm - print terminal characteristics

pull - pull records from an RMSfile

put - put text data into RMSfile

rbldidx - rebuild RMS index file

removelf - remove a logical RMSfile catalog entry

rmsck - check RMSfiles for consistency

rptadmin - administer reportfile catalog

rptcopy - copy logical reportfile

rptedit - create or maintain logical reportfiles

rptrm - remove a logical report

rptupd - update the logical reportfile catalog

shash - computer statistics about a hashed RMSfile

sindex - print summary of RMS index file usage

start - start an application system

table - load data into a row and column matrix

termset - set terminal characteristics

toolkit - create or maintain an application system

touch - creates a zero byte data file (used for transaction logging)

wtr - interpret a compiled reportfile

wtrdef - create and maintain visual reportfiles


Appendix E


[Previous] |[Table of Contents] |[Next]


E.1 C/BASE FUNCTIONS (C-3)


intro - introduction to library functions

abspath - return absolute pathname of a file

addmonth - add months to DATE value

align - align address to data boundary

ask - ask parameter from terminal

atobool - convert ASCII to BOOLEAN value

atodate - convert ASCII to date value

atolong - convert ASCII to LONG value

atomoney - convert ASCII to MONEY value

atoreal - convert ASCII to REAL value

atotime - convert ASCII to time value

atoval - convert ASCII string to value

booltoa - convert BOOLEAN value to ASCII

clrb - perform byte operations

cmpb - perform byte operations

movb - perform byte operations

filb - perform byte operations

cbasedir - return name of C/Base administrative directory

creattemp - create a temporary file

dalign - align address to data boundary

datetoa - convert DATE to ASCII

dbfind - get named database description

dbfindn - get nth database description

dblist - set up user record fields

dbopen - open default database

dbparse - parse logical name

dbpath - return full path of logical name

dclock - lock/unlock current data record for exclusive use

dclockw - lock/unlock current data record for exclusive use

dcunlock - lock/unlock current data record for exclusive use

dclose - close RMSfile

ddelete - delete current record

derror - describe last I/O error

derrmsg - describe last I/O error

dfind - find first active record in RMSfile

dfindfi - find first record in secondary index

dfindi - find first record using secondary index

dfindk - find record with given primary key

dfindl - find last active record in RMSfile

dfindli - find last record in secondary index

dfindlk - find last record with given primary key

dfindlm - find last matching record using secondary index

dfindm - find first matching record using secondary index

dfindn - find next active record

dfindni - find next record using secondary index

dfindnk - find next record with same key

dfindnm - find next matching record using secondary index

dfindp - find previous active record

dfindpi - find previous record using secondary index

dfindpk - find previous record with same key

dfindpm - find previous matching record using secondary index

dflock - lock/unlock an RMSfile for exclusive use

dflockw - lock/unlock an RMSfile for exclusive use

dfunlock - lock/unlock an RMSfile for exclusive use

dilock - lock/unlock RMSfile for inserting records

dilockw - lock/unlock RMSfile for inserting records

diunlock - lock/unlock RMSfile for inserting records

dinsert - insert keyed record

dlbegin - log beginning of transaction

dlcancel - log cancelled transaction

dlclear - log clearing of logical RMSfile

dlcommit - log committed transaction

dlconv - log conversion of logical RMSfile

dldelete - log deletion of logical RMSfile

dlend - log end of transaction

dlexpand - log expansion of logical RMSfile

dlfind - get named logical RMSfile description

dlfindn - get nth logical RMSfile description

dlmake - log creation of logical RMSfile

dloff - turn off transaction logging

dlon - turn on transaction logging

dlopen - open a logical RMSfile

dnrec - return number of allocated records

dnumidx - set significant fields for index query

dopen - open RMSfile

dread - read record using record number

dreadc - read the current record

dresiz - return RMSfile record size

drlist - set up user record fields

drlock - lock/unlock a data record for exclusive use

drlockw - lock/unlock a data record for exclusive use

drunlock - lock/unlock a data record for exclusive use

dseti - set secondary index for RMSfile searching

dsetpos - set position in secondary index

dsizeof - return size of RMS data type

dtacces - return file access method

dtclose - close RMS dictionary file

dtdict - return RMSfile dictionary pointer

dtefld - find effective dictionary field number

dtefldn - find effective field number of nth field in dictionary

dtfind - find dictionary field

dtfindi - find field names in secondary index

dtfindk - find field numbers in secondary index

dtfindn - find nth field in dictionary

dtopen - open RMS dictionary file for I/O

dttogmt - convert DATE, TIME pair into operating system GMT time

dttomdy - convert DATE to month, day, and year

dupdate - update current record

dwrite - write record using record number

escape - send and receive terminal escape sequences

getkey - send and receive terminal escape sequences

escin - send and receive terminal escape sequences

escout - send and receive terminal escape sequences

fatobool - convert ASCII to BOOLEAN value

fatodate - convert ASCII to date value

fatolong - convert ASCII to LONG value

fatomoney - convert ASCII to MONEY value

fatoreal - convert ASCII to REAL value

fatotime - convert ASCII to time value

fbooltoa - format BOOLEAN value to ASCII

fcountry - establish Country format structure

fdatetoa - format DATE to ASCII

firstday - return first day of the month for any date

flongtoa - format LONG to ASCII

fmoneytoa - format MONEY to ASCII

form - display and collect data from data entry form

frealtoa - format REAL to ASCII

ftimetoa - format TIME value to ASCII equivalent

ftnirps - string formatter

getfaday - get abbreviated days of week names

getfamth - get abbreviated month names

getfbool - get format of BOOLEAN values

getfcurr - get currency symbol string

getfcycle - get time cycle names

getfdate - get format for DATE values

getfday - get days of week names

getfdec - get decimal separator character

getfint - get format for INT values

getfmoney - get format for MONEY values

getfmth - get month names

getforder - get input date order

getfplac - get number of decimal places in MONEY

getfreal - get format for REAL values

getfthou - get thousands separator character

getftime - get format for TIME values

gmttodt - convert operating system GMT time to RMS DATE and TIME

longtoa - convert LONG to ASCII

mdytodt - convert month, day, year to date value

moneytoa - convert MONEY to ASCII

realtoa - convert REAL to ASCII

round - round floating point value

sdatafile - return the RMSfile name

sdebug - display debugging information on the screen

seditname - return edit name of a field

sfldname - return field name of a field

sformname - return name of current form

sformno - return current form number

showtext - display help file text on terminal

smode - return the current form mode

snextfld - set next field to process

snextform - set next form for data entry

snextkey - insert a key into the input key queue

sputerr - put error message on screen

sread - read contents of data field

srecno - return current record number

srefresh - refresh the screen

strdup - return duplicate copy of string

strbcmp - perform string operations

strbcpy - perform string operations

strzcpy - perform string operations

strpbrk - return first (last) occurrence in string of character in set

strppbrk - return first (last) occurrence in string of character in set

subenv - substitute environment names in string

svalform - set next validation form for data

swrite - write string to screen field

termparm - return terminal characteristics

timetoa - convert TIME value to ASCII equivalent

ttyinit - initalize and restore terminal for I/O

ttyrestore - initalize and restore terminal for I/O

erasechar - initalize and restore terminal for I/O

killchar - initalize and restore terminal for I/O

valtoa - convert value to ASCII string