Universal
Files
To
set index files to be universal for all platforms set the following
environment variables...
- PREALLOCATE
= 8192
- ISAMSEC
=8
Existing
files must be re-created and data transferred from old to new.
This replaces the old upper case file name with a lower case name
with .idx appended.
top
of page
passport.log
The following
log file never purges. Everytime someone starts UniBasic, another
record is created in this file.
It can be
purged by cat /dev/null >/etc/DCI/passport.log
A cron script
should be created that automatically purges this file on a weekly
or monthly frequency.
top
of page
Printer
Script - HP Laser or Inkjet attached to PC
The following
is a sample printer script that can be used to print to a HP Laser
or InkJet attached to a PC.
The "\012"
"\015\012" translates the unix newline to carriage
return + newline.
The environment
variables $ON and $OFF should be set to the escape sequence to
turn the aux port on and off based on your terminal type.
#HP Printer
BX="\033(0U\033(s13.9v10hb11T"
EX="\033(0U\033(s12h10vbs8T"
SA="\033(0U\033(sp10h12vbs3T"
SB="\033(0U\033(sp12h10vbs8T"
SC="\033(0U\033(sp16.99h10vbs0T"
temp=/tmp/aux$$
cat - >$temp
if [ -r $temp ]
then
if [ -s $temp ]
then
echo -e "$ON"
cat $temp | lptfilter FF "\014" SA "$SA" SB "$SB" SC "$SC" "\012" "\015\012"
echo -e "$OFF"
fi
rm $temp
fi
top
of page
Converting
Text Files
When converting
text files from Unix to Windows or Windows to Unix you need to
convert the carriage return and line feed characters at the end
of each line.
Unix
text files have a new line character (octal 12) at the
end of each line.
Windows
text files have a carriage return + new line character
(octal 15 and 12) at the end of each line.
The unibasic
command lptfilter can be used to translate the values.
To convert
from Unix format to Windows...
cat
sourcefilename | lptfilter "\012" "\015\012"
>newfilename
To convert
from Windows format to Unix...
cat
sourcefilename | lptfilter "\015\012" "\012"
>newfilename
top
of page
Installing
Dynamic Concept Products
The product
installation files are available at dynamic.com
- Put the
downloaded compressed file(s) in /tmp
- uncompress
ProductVersionName.Z
- mkdir
/tmp/ub
(/tmp/iq, /tmp/passport)
- cd
/tmp/ub (/tmp/iq,
/tmp/passport)
- cpio
-imcduv <../ProductVersionName
- If
error on above step, try
cpio -imduv <../ProductVersionName
- Run the
install script(s) ./ubinstall (/ppinstall,
./iqinstall)
top
of page
Message
Queue Limit
If you get
an error when several users attempt to access uniBasic and the
number of total users is within the uniBasic license limits, you
need to increase the number of message queues. On
Linux, the default limit for message queues is 16 which supports
only 16 users.
To increase
the limit...
The current
limit can be increased by using the command /sbin/sysctl
-w kernel.msgmni=72, but the
new value will be lost after the next reboot unless the /etc/sysctl.conf
file is modified.
ipcs
-lq
- Displays the current message queue limits.
top
of page
ODBC Install
Passport version 4.1 or greater must be installed.
Server Install
- Create a new user account - odbcdl4
- Login as odbcdl4
- Copy the install file to /tmp
- Follow the instructions above for install DCI software.
- Login as root
- Modify /etc/services
- add the following...
- odbcdl4 9635/tcp # odbcdl4 TCP/IP port 9635
- Modify /etc/inetd.conf or /etc/xinetd.conf
- For inted.conf - add the following...
- odbcdl4 stream tcp nowait odbcdl4 /home/odbcdl4/odbcdl4 odbcdl4 /home/odbcdl4/db
- If you need to set debug mode - before the last entry above starting with /home entering the following...
- -l /var/log/odbc
- Make sure /var/log/odbc is writable by the odbcdl4 user
- For xinetd.conf - add the following
- # default on - ODBCDL server connections
- service odbcdl4
- {
- flags = REUSE
- socket_type = stream
- wait = no
- user = odbcdl4
- server = /home/odbcdl4/odbcdl4
- server_args = /home/odbcdl4/db
- disable = no
- }
- Restart networking - kill -HUP pid# - for inetd or xinetd
- Remove the install files in /tmp
Dictionary Set-up
Create a new directory in /home/odbcdl4/db with a name that represents the company. In this new directory you have to create text files that contain information on the file/field specifications.The file name should represent the file contents and must be all lowercase.
Sample File: customers
[FullISAMView]
File=/usr/acct/2/arf.cust01
[Record]
Field=STRINGFIELD1,000,0030
Field=STRINGFIELD2, 30,0025
Field=STRINGFIELD3, 55,0021
Field=NumericField1,212,3%
Field=NumericField2,218,3%
Field=NumericField3,224,3%
[Index1]
Name=ByDir1
KeyPart=CUSTNUM,0,0006,"","",keyonly
Guidelines
- FILE
- First entry must be [FullISAMView]
- File = full path to actual unibasic file. Make sure you don't symbolic or linked paths
- FIELDS
- Must start with [Record]
- Starts with Field= Each parameter is separated by a comma.
- Name of field (Only use characters, numbers and underline. No spaces. First char must be a letter)
- Starting Byte position of field in actual file
- For strings, character length. For numeric = #% or #.d% where d=# of decimals
- Align (optional) = L for left or R for right
- Fill (optional) = character to use if string field is less than defined. Default = space
- Options (optional)
- strip - remove trailing spaces
- is({len,} values) - ignore any record where field is equal to specified value. Values is a comma separated list of one or more quoted string values.
- not({len,} values) - ignore any record where the field is not equal to a specified value.
- DTOC(mask) - For date conversion, can use the following masks in quotes...
- YYYY or YY
- MM
- DD
- HH
- NN (minute)
- SS
- DTON(mask) - Convert date from a decimal number - same options as above
- LTRIM - delete leading spaces
- RTRIM - delete trailing spaces
- TRIM - delete both leading and trainling spaces
- KEYS
- Starts with [Index#] where # = the key number
- Name of entire key=<key name> (Must be unique, can't use existing field name)
- Key Part - Can have multiple entries where key is made up of several fields
- Syntax: KeyPart=<fieldname>,<starting byte position>,<format>,<prefix>,<charset>,<options>
- Eample: (Where key contains a customer code and state code)
- [Index1]
- Name=BYSTATE
- KeyPart=Name,0,25,"","',keyonly
- KeyPart=State,26,2,"","",keyonly
To verify file specs...
- CD to /home/odbcdl4/db/<databasename>
- Enter ../../checkdb ../
- This will display files that have syntax or invalid entries
For more options refer to the README document from Dynamic Concepts that is available on ftp.dynamic.com
Windows Set-up
There are two steps to this procedure.
- Install the ODBC driver
- Configure the ODBC connection
Install ODBC Driver
- Run the odbcdl4.exe to install the driver.
Configure Connection
- Open Control Panel
- Select Administration Tools
- Select ODBC configuration
- Select SYSTEM tab
- Click on New
- Connection name = company name
- Database name = company name (must match directory created above)
- Host = Can either be the IP address of the server or server name
- Port = Leave as default of 9635
Create an Access database and link to unibasic files.
top
of page |