|
How do I
install UniBasic?
How do I
convert UniBasic programs to dL4?
How do I make UniBasic
use the new daylight savings time rules on
SCO OpenServer 5?
How do I auto-login
and start UniBasic on SCO OpenServer 5?
How can I set the Environment
Variables for UniBasic on a Linux system?
How do I configure message queue parameters on SCO OpenServer
5?
How do I append to a text
file without having to read every line of the
file?
Why does a second or subsequent
call to Call $TRXCO intermittently return a
failure status?
Why am I getting a security violation error
on a system that has been running properly in
the past?
Where can I find makeosn?
Which version of UniBasic
do I need for SCO OpenServer 5?
How are phantom ports counted
in the scheme of UniBasic licensing?
Do I need a new SSN to upgrade
to a later version of UniBasic?
How can I generate a new
UniBasic software license number?
Why does my UniBasic license
file get invalidated on a regular basis?
Which environment variable
cannot be set or modified from UniBasic?
How do I automatically run
a UniBasic program at a specified time?
How can I use UniBasic to
communicate with a modem?
Why can I no longer save
a program file in my current directory?
How can I save a program
file in my present working directory when it
already appears in my LUST?
How can I convert a UniBasic
text file into a Windows file?
How can I convert a Windows
text file into a UniBasic text file?
Why can the Unix file
command no longer properly identify UniBasic
files?
How can I properly identify
UniBasic files using the Unix file command?
Which UniBasic CALLs are
supported?
Why is CALL $MONITOR not
supported?
How do I determine which
port has a specified record locked?
Is UniBasic supported in
a network environment?
Can I use Samba with UniBasic?
Are UniBasic programs cross-platform
binary compatible?
How do I move UniBasic programs
to a different platform?
How can I dump all my programs
to text files?
What are Universal Data files?
What product versions support
Universal Data files?
Can earlier releases access
Universal Data files?
How do I create Universal
Data files?
How can I convert existing
data files to Universal Data files?
Can UniBasic access dL4 Portable
files?
What is the maximum UniBasic
data file size?
Is UniBasic year 2000 compliant?
How do I install
UniBasic?
The UniBasic installation file is a
compressed CPIO file archive. To install
UniBasic, you must unpack the installation
file into a temporary directory as "root" and
then run the "ubinstall" script from the
package. The installation procedure is
described in more detail in the UniBasic
manual and in the current
readme.txt file. The separate Passport
software product must be installed before
using UniBasic.
Back to UniBasic FAQ's
How do I make
UniBasic use the new daylight savings time
rules on SCO OpenServer 5?
The TZ environment variable should
be set to include the new daylight savings
time starting and end dates. In the United
States, this requires adding the string
",M3.2.0,M11.1.0" to the end of the normal
TZ value. For example, a Pacific timezone
setting of "PST8PDT" must be changed to
"PST8PDT,M3.2.0,M11.1.0". The TZ value can
be changed in the user profile or in the
file /etc/TIMEZONE. If the value is
changed in /etc/TIMEZONE, the system must
be rebooted to use the new value.
Back to UniBasic FAQ's
How do I convert UniBasic
programs to dL4?
The ub2dl4 utility package provides
a simple way to convert UniBasic programs to
dL4. Installation and use of the current release
are described in the
readme.txt file. The ub2dl4 package can
be downloaded from the download center on
www.unibasic.com or from the /dist/pub/FF/ub2dl4
directory on ftp.dynamic.com(check the ftp site
for the latest version).
Back to UniBasic FAQ's
How
do I auto-login and start UniBasic on SCO OpenServer
5?
To auto-login and start UniBasic, make an entry
in the '/etc/inittab' file similar to:
su- unibasic </dev/ttyxx >/dev/ttyxx 2>&1
where xx is the system tty name.
Back to
UniBasic FAQ's
Linux uses BASH shell and
executes .bash_profile file in users HOME
directory, instead of .profile.
Therefore, set all environment variables in
.bash_profile in users HOME directory.
Back to UniBasic FAQ's
Some of the message queue parameters can be set
in the "scoadmin" Hardware/Kernel Manager, but
others can only be configured by using the idtune
utility. For example, the command "/etc/conf/bin/idtune
MSGMNI 100" would set the maximum number of message
queues to 100. Since each user and phantom port
requires each own message queue, a maximum of
100 would be adequate for approximately 100 users
(more may be needed by the operating system and
other software products). After changing a message
queue parameter, the kernel must relinked using
"scoadmin" and the system must be rebooted. Other
message queue parameters may need to be changed
as described in the UniBasic Reference Manual
or the dL4 Installation and Configuration Guide
for Unix. If a message queue parameter has been
changed from the default value, its current value
can be found in the /etc/conf/cf.d/stune file.
Please refer to your SCO manual for a detailed
description for idtune.
Back to
UniBasic FAQ's
The following IRIS program
appends to a text file.
10 Dim R$[512]
20 Open #1, "textfile"
30 Setfp #1, Chf(1) - 1; ! position to last
block in file
40 Read #1,-2;R$; ! position to end of file
50 Print #1; "EOF"
60 Close
Back to UniBasic FAQ's
A two (2) seconds delay
is recommended in between calling $TRXCO for
the port to initialize itself.
Back to UniBasic FAQ's
On most Unix systems,
using the "-a" option with cpio alters the "change
time" on each file processed. Do not use the
"-a" option when backing up files in the /etc/DCI
directory or skip the /etc/DCI directory when
performing backups.
This problem can be avoided by using a hardware
passport device.
Back to UniBasic FAQ's
The makeosn utility is
included with Passport For Unix version 3.6
or later and Passport For Windows 1.4 or later,
both available from our
Download Center.
Back to UniBasic FAQ's
Although any version
5 or later of UniBasic will run on SCO OpenServer
5, it is, however, recommended that you use
the latest version. You must use Passport version
3.5.1 or later.
Related Article:
Technical News, April 22, 1996: Passport 3.5.1
Back to UniBasic FAQ's
A phantom port is not
checked against UniBasic licenses when it is
started. However, it is counted as another UniBasic
user when an interactive user attempts to login.
An interactive user may not be able to start
UniBasic if the total number of phantom ports
and interactive ports exceed the maximum number
of licensed users.
Back to UniBasic FAQ's
A new SSN is not needed
to upgrade to a later release of the same major
revision. Thus, a new SSN is unnecessary when
upgrading from UniBasic revision 7.1 to revision
7.2.
A new SSN is, however, necessary while upgrading
to a new major revision. Thus, a new SSN is
needed while upgrading from UniBasic revision
6 to revision 7.
Back to UniBasic FAQ's
Before proceeding, please
be certain that there are no UniBasic users
on your system before removing current license.
If you are using UniBasic version 5 or greater,
then kill the running passport daemon and remove
the /etc/DCI/license file. Restart the passport
daemon by running /etc/DCI/passport.cmd after
removing the /etc/DCI/license file. Remember
to acquire and enter a new SSN prior to using
UniBasic.
If you are using UniBasic revision 4, you can
generate a new license number by typing
"unibasic -ddeactivate" from the root
account and then by rerunning UniBasic.
Back to UniBasic FAQ's
On most Unix systems,
using the "-a" option with cpio alters the "change
time" on each file processed. Do not use the
"-a" option when backing up files in the /etc/DCI
directory or skip the /etc/DCI directory when
performing backups.
This problem can be avoided
by using a hardware passport device.
Back to UniBasic FAQ's
Some environment variables
are read by UniBasic only during startup and
so any changes will have no affect on the current
UniBasic process. The following environment
variables cannot be set nor modified from UniBasic
for the running UniBasic process:
ALTCALL, BCDVARS, FORNEXTNEST, GOSUBNEST, INPUTSIZE,
ISAMBUFS, ISAMSECT, ISAMFILES, LUST, NUMLINES,
PORT, PORTS, PROGSIZE, TERM, VARSIZE and WINDOWS.
Back to UniBasic FAQ's
Setup a Unix cron job
to run "/usr/bin/unibasic -f program",
where program is the name of your UniBasic program.
Please refer to your UNIX man pages if you are
unfamiliar with cron.
If you need to run a program once at a later
time, then you can use the Unix "at"
command to run "/usr/bin/unibasic -f program",
where program is the name of your UniBasic program.
Please refer to your Unix man pages if you are
unfamiliar with the "at" command.
You may also consider
setting cron to run a shell script which sets
appropriate environment variables prior to executing
UniBasic.
Back to UniBasic FAQ's
The "port as a device"
feature, included as a standard component as
of UniBasic release 6, can access serial devices
and modems attached to serial devices.
Related Material:
UniBasic Port as Device Driver .
Back to UniBasic FAQ's
Effective UniBasic release
5, this option was removed as many customers
accidentally overwrote another program by the
same name that appeared in the LUST.
Back to UniBasic FAQ's
You can save a program
file that already appears in the LUST by specifying
an absolute PATH name. Alternatively, you can
save it by a different name and using the Unix
mv (move) command to rename the file in your
present working directory.
Back to UniBasic FAQ's
The sample shell script below converts
a UniBasic text file into a Windows text file.
Make sure that the script is executable and
you pass the name of file you want to convert.
The UniBasic text file should not contain any
mnemonic characters.
Note: ^M in the script below is the carriage
return character which may be entered in vi
as control-v followed by carriage return.
MakeWindowsTextFile()
{ |
sed 's/$/^M/' $1 >dos$$.txt
rm -f $1
mv dos$$.txt $1
|
}
while [ "$#" -gt 0 ]
do |
MakeWindowsTextFile $1
shift
|
| done |
Back
to UniBasic FAQ's
The sample shell script
below converts a Windows text file into a UniBasic
text file. Make sure that the script is executable
and you pass the name of file you want to convert.
The DOS text file should not contain any non-ASCII
characters.
Note: ^M in the script below is the carriage
return character which may be entered in vi
as control-v followed by carriage return.
MakeUBTextFile()
{
|
sed 's/^M$//' $1 >ub$$.txt
rm -f $1
mv ub$$.txt $1
|
}
while [ "$#" -gt 0 ]
do |
|
|
done
|
Back
to UniBasic FAQ's
Due to incompatibilities
on some systems, ubinstall no longer updates
the file /etc/magic. This feature was removed
from ubinstall effective UniBasic release 5.4.
Back to UniBasic FAQ's
The Unix file
command can properly identify UniBasic file
by adding lines such as these to the /etc/magic
file:
| 0 |
string |
SAVE |
uniBasic saved BASIC program |
| 0 |
string |
SYST |
uniBasic system BASIC program |
| 0 |
string |
INDX |
uniBasic indexed data file |
| >20 |
short |
>0 |
- record length = %d |
| 0 |
string |
DATA |
uniBasic data file |
| >20 |
short |
>0 |
- record length = %d |
| 0 |
string |
ITEM |
uniBasic formatted item file |
| >20 |
short |
>0 |
- record length = %d |
| 0 |
string |
CONT |
uniBasic contiguous file |
| >20 |
short |
>0 |
- record length = %d |
| 0 |
byte |
0x61 |
c-tree key file |
| 0 |
long |
0x1919ba2e |
Portable or Universal Contiguous file |
| 0 |
long |
0x2eba1919 |
Portable or Universal Contiguous file |
| 0 |
long |
0x1919ba2c |
Portable or Universal Formatted file |
| 0 |
long |
0x2cba1919 |
Portable or Universal Formatted file |
The above lines will
have to be modified on some Unix systems due
to differences in the magic file format. On
some systems, such as Linux, the magic file
will reside in /usr/share or /usr/share/file
and the command "file -C -m /usr/share/magic"
must be executed before the file command will
use the new definitions. If the "file -C" command
produces a magic.mgc file in the local directory,
then that file should be copied over the existing
magic.mgc file in /usr/share or /usr/share/file.
Back to UniBasic FAQ's
Those calls that are
documented in the UniBasic Reference Guide are
supported.
Back to UniBasic FAQ's
CALL $MONITOR uses Unix
signals which interfere with the execution of
the monitored application and, in addition,
cause undesirable side-effects on some platforms.
Its usage in an application program is highly
discouraged.
Back to UniBasic FAQ's
There is an unsupported
UniBasic CALL, $WHOLOCK, that returns the port
number. The syntax for $WHOLOCK is:
CALL $WHOLOCK, C, R,
P
C - the opened channel
number
R - the locked record number
P - returns port number that has the record
locked, or -1 if record is no longer locked
In a networked environment,
CALL $WHOLOCK can only identify ports on the
host system. Due to this limitation and other
system dependencies, we recommend that CALL
$WHOLOCK should only be used for administrative
purposes and not made an essential part of an
application.
Back to UniBasic FAQ's
Although UniBasic is
not specifically tested in a network environment,
it should work in a properly configured NFS
system which can properly handle record locking.
The product itself does not use any system calls
specific to networking.
Back to UniBasic FAQ's
Yes, but if files on
the Unix/Linux server are to be accessed concurrently
by both Windows and Unix applications, it may
be necessary to set Samba configuration options
so that Window and Unix/Linux record locking
are handled identically. Please check your Samba
documentation for any references to record or
file locking configuration.
Back
to UniBasic FAQ's
Unlike dL4 programs,
which are cross-platform binary compatible,
UniBasic programs are not cross-platform binary
compatible.
Back to UniBasic FAQ's
UniBasic programs first
need to be decoded to a text file using the
DUMP command on the source platform and then
LOADed on the destination platform.
A large group of programs can be moved using
the DIR and MAKECMND supplied utilities. Please
refer to the UniBasic Reference Guide for details.
Back to UniBasic FAQ's
A large group of programs
can be dumped to text files using the DIR and
MAKECMND supplied utilities. Please refer to
the UniBasic Reference Guide for details.
Back to UniBasic FAQ's
Universal Data files
are hardware and product independent data files
that contain UniBasic BCD data. They may be
shared or moved among different Unix platforms
without conversion. In addition, they may be
used concurrently in UniBasic, dL4 for Unix
and Windows, and IQ for Unix and Windows.
Back to UniBasic FAQ's
The minimum revision
level for Universal Data files are UniBasic
6, dL4 3, IQ for Unix version 4 and IQ for Windows
version 5.
Back to UniBasic FAQ's
Universal Data files
require minimum product revisions and cannot
be accessed by older releases.
Back to UniBasic FAQ's
All new files are created
as Universal Data files if the PREALLOCATE environment
variable is set to 8192. Alternatively, Universal
Data files can also be created by specifying
the "<U>" attribute when building
the file, e.g. BUILD #1, "<U>[5:40]contig".
Back to UniBasic FAQ's
UniBasic BCD Contiguous,
Formatted and Indexed files can be converted
to Universal Data files using the ubconvert
utility.
Back to UniBasic FAQ's
Portable files created
as Universal Data files under dL4 are platform
and product independent and are fully accessible
to UniBasic.
Back to UniBasic FAQ's
By default, UniBasic
files are restricted to a maximum of 2 GB, which
is the maximum file size supported by most Unix
operating systems. On some platforms such as
Linux or AIX, Universal files can be created
as "huge" files with the "" attribute. Such
files can grow much larger than 2 GB. It may
be necessary to configure special operating
system or file system options in order to use
huge files.
Users can restrict Index file dynamic expansion
by setting the PREALLOCATE environment variable
to 128.
Back to UniBasic FAQ's
All date and time related
functions are year 2000 compliant effective
UniBasic version 6.
Back to UniBasic FAQ's
|