|
More dL4 FAQs:
Programs | Terminal/Printers
Programs
How do I convert uniBasic programs to dL4?
How can I set the
Environment Variables for dL4 on a Linux system?
How do I append to
a text file without having to read every line
of the file?
How do I configure dL4 for
Unix to support 132 columns?
How do I configure dL4
for Windows to support 132 columns?
How do I configure dL4
for Unix to support 50 rows?
How do I configure dL4 for
Windows to support 50 rows?
What is program cache?
How do I configure a Unix
system for program cache?
Is program cache available
for dL4 for Windows?
How can I read the Registry
variables in dL4 for Windows?
Why am I getting a security
violation error on a system that has been running
properly in the past?
Why does the statement,
"SYSTEM dir" not work in dL4 for Windows?
Why does a new window open
and quickly close when I execute a DOS command
from scope for Windows?
How do I prevent a new window
from quickly closing when I execute a DOS command
from scope?
How does dL4 locate programs?
What is LIBSTRING?
Why do I need a structure
template in each dL4 external program?
How can I launch a dL4 program
from the operating system command line interface
in the SCOPE environment?
Do I need to LOAD and re-SAVE
dL4 programs when moving them from a UNIX system
to a Windows system?
How do I change the color
of the border of a dL4 window?
How do I use the FONTCOLOR
and BACKCOLOR mnemonics in dL4?
How do I print bright colors
in a protected field?
How do I have dL4 for UNIX
clear the screen when a user exits?
Is dL4 year 2000 compliant?
How can I retain program
line numbers while dumping it to a text file?
How do I open a table in
Microsoft SQL Server or MySQL?
How can I create a new SQL
table?
How do I get c-tree error
in dL4?
What is BASIC error 97?
Why do I get an "Internal
error in driver" or BASIC error 84 while
attempting to open an Indexed file?
Why do I get an "Driver
resource exhausted" while attempting to
open an Indexed file?
How do I set the ISAMFILES
runtime parameter for dL4 for Windows?
How do I determine the hot-key
character used to start a SWAP program?
How do I find the name of
the program running on a port?
How do I resize the Windows
debugger?
How do I move the Windows
debugger?
Why do I get "Subprogram
file is not a BASIC program"?
How do I PSAVE a program?
How do I open a file in
exclusive mode?
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
http://wwww.unibasic.com or from the /dist/pub/FF/ub2dl4
directory on ftp.dynamic.com (check the directory
for the latest version).
Back to dL4 FAQ's

How
can I set the Environment Variables for dL4
on a Linux system?
Linux normally
uses the BASH shell and environment variables
should be set in the .bash_profile file in the
user HOME directory instead of .profile.
Back to dL4 FAQ's

How
do I append to a text file without having to
read every line of the file?
The special
record number -4 can be used to output to the
end of the file. For example, the statement
Print
#5,-4;"Append this text"
would add the line "Append this text" to the end
of the text file open on channel 5.
Back to dL4 FAQ's
How
do I configure dL4 for Unix to support 132 columns?
There
are two solutions to this issue. The first solution
is to set and export the COLS environment variable.
The COLS environment variable always overrides
any default setting in the Terminal Definition
File.
The second
solution is to change {80}%SC to {132}%SC in
the Init line in the OutputMacros section in
the Terminal Definition File.
Back to dL4 FAQ's
How
do I configure dL4 for Windows to support 132
columns?
This
can be achieved by changing the Windows Columns
to the appropriate value in the Preferences
» Initial Values setting for scopew and
then restarting dL4.
Back to dL4 FAQ's
How
do I configure dL4 for Unix to support 50 rows?
There
are two solutions to this issue. The first solution
is to set and export the LINES environment variable.
The LINES environment variable always overrides
any default setting in the Terminal Definition
File.
The second
solution is to change {24}%SR to {50}%SR in
the Init line in the OutputMacros section in
the Terminal Definition File.
Back to dL4 FAQ's
How
do I configure dL4 for Windows to support 50
rows?
This
can be achieved by changing the Windows Rows
to the appropriate value in the Preferences
» Initial Values setting for scopew and
then restarting dL4.
Back to dL4 FAQ's

What
is program cache?
Program
cache is used to share a single memory image
of a program or library between different processes.
It is available only on dL4 for Unix, version
3.1 or later. The environment variable "DL4CACHE"
must be set in order to use program caching.
The value of DL4CACHE is a file specification
of the form " [blocks:blocksize]
name". The following example specifies a global
cache of 8 megabytes:
DL4CACHE="<666>
[8192:1024] 0xdddc0500" export DL4CACH
The operating system must be configured to support
both shared memory and semaphores.
Related Article:
Program Cache
Back to dL4 FAQ's
How
do I configure a Unix system for program cache?
Program
cache uses Unix semaphores and shared memory.
The Unix system must be configured to support
one semaphore per cache and to support shared
memory of the desired size. Please refer to
your Unix manual for semaphore and shared memory
configuration.
Related Article: Program
Cache
Back to dL4 FAQ's
Is
program cache available for dL4 for Windows?
Program
cache is intended for multi-user systems and
so it is available only on dL4 for Unix. A local,
non-shared cache can be created for each dL4
for Windows process by setting the DL4LOCALCACHE
runtime parameter to the desired cache size
in bytes. This local cache is not aware of program
changes made by other dL4 processes and should
not be used during program development.
Back to dL4 FAQ's
How
can I read the Registry variables in dL4 for
Windows?
The
intrinsic CALLs GetRegistry and SetRegistry
can be used to read or write registry values.
Back to dL4 FAQ's
Why
am I getting a security violation error on a
system that has been running properly in the
past?
A file system restore, or a cpio -a option may
invalidate Software license. In addition, passport
daemon prior to release 3.5 on SCO OpenServer
5 can invalidate Software license.
A new license and a new SSN are required to
recover from this problem. Another solution
is to use a hardware passport which does not
suffer from any of the above problems.
Back to dL4 FAQ's
Why
does the statement, "SYSTEM dir" not
work in dL4 for Windows?
The
dir command is not a separate program, it is
part of cmd.exe (or command.com on older systems).
The proper syntax to execute a dir command would
be "SYSTEM command.com /c dir". The
directory driver should be used instead of the
"dir" command for maximum portability.
The following program displays all filenames
in current directory.
|
10
|
Dim r$[100] |
|
20
|
Open #0,"." As
"directory" |
|
30
|
Do |
| 40 |
Read #0;r$ |
| 50 |
If r$ = ""
End |
| 60 |
Print r$ |
| 70 |
Loop |
| 80 |
End |
Back to dL4 FAQ's
Why
does a new window open and quickly close when
I execute a DOS command from scope for Windows?
There are two types of programs under Windows,
namely, console programs and graphical programs.
dL4 for Windows (scopew) is a graphical program
and hence a separate console windows must be
opened for console programs. That console window
is closed as soon as the command is completed.
The SYSTEM 30 statement can be used to execute
a command in a hidden window.
Back to dL4 FAQ's
How
do I prevent a new window from quickly closing
when I execute a DOS command from scope?
The
output of a DOS command will remain on your
screen if you start command.com from scope and
then initiate the DOS command. For example,
the following will cause the output of dir to
remain on the screen.
#cmd.exe
C:>dir
Back to dL4 FAQ's
How
does dL4 locate programs?
An
attempt is first made using the LUMAP runtime
parameter which maps relative file paths to
absolute file paths. If the program path cannot
be translated by LUMAP, then dL4 uses the LIBSTRING
runtime parameter to locate programs and libraries.
Finally, dL4 uses the DL4LUST runtime parameter.
LIBSTRING contains a space separated list of
directories to search when linking, CALLing,
or CHAINing to program files. This value is
returned by the debugger's STATUS UNIT command
and by the Msc$(6) function. DL4LUST is similar
to LIBSTRING, but it is used for both program
and data files. The OPEN statement does not
use LIBSTRING to find data files.
Please refer to the appropriate
Installation and Configuration manual for
a discussion on configuring LIBSTRING.
Related Articles:
June, 1997 Technical News , September,
1997 Technical News
Back to dL4 FAQ's

What is LIBSTRING?
In
addition to LUMAP and DL4LUST, dL4 uses the
LIBSTRING runtime parameter to locate programs
and libraries. It is a runtime parameter which
contains a space separated list of directories
to search when linking, CALLing, or CHAINing
to program files. This value is returned by
the debugger's STATUS UNIT command and by the
Msc$(6) function. The OPEN statement does not
use LIBSTRING to find data files.
Please refer to the appropriate
Installation and Configuration manual for
a discussion on configuring LIBSTRING.
Related Article:
September, 1997 Technical News
Back to dL4 FAQ's
Why do I need a structure
template in each dL4 external program?
A
dL4 structure variable consists of a collection
of one or many different data types which are
defined in a structure template. The BASIC interpreter
must know about these data types when a structure
variable is defined or referenced. This information
must be available when a program is saved so
that errors can be detected at SAVE time, which
is much faster than at run time.
Back to dL4 FAQ's

How
can I launch a dL4 program from the operating
system command line interface in the SCOPE environment?
SCOPE treats its command line arguments as an
initial command. Thus, a dL4 program can be initiated
by executing the following commands from a user's
.profile file in the UNIX environment or from
autoexec.bat file in the Windows environment,
respectively.
exec scope "program to start"
start scopew "program to start"
|
Back
to dL4 FAQ's

Do I need to LOAD
and re-SAVE dL4 programs when moving them from
a UNIX system to a Windows system?
No,
dL4 programs binaries are fully compatible.
In other words, programs SAVEd under a UNIX
system will run on a Windows system, and vice
versa. However, if the programs use system specific
operations, then the programs will not be portable
and errors may occur during execution. For example,
the following would make a program specific
to the UNIX operating system:
system("ls")
Back to dL4 FAQ's

How do I change the
color of the border of a dL4 window?
The
following program sets the background and foreground
borders and default colors to blue and yellow,
respectively.
| Open #1,{"","titl,hide",40,10}
As "Window" |
! Hidden Window |
| Print #1;'255Backcolor
cs ye'; |
! set border
and default colors |
| Channel 11,#1; |
! make window visible |
After
the Channel statement, the current foreground
and background colors may be changed to desired
colors without affecting the border colors.
Back to dL4 FAQ's

How do I use the FONTCOLOR
and BACKCOLOR mnemonics in dL4?
The
FONTCOLOR and the BACKCOLOR mnemonics set the
foreground text and background colors, respectively.
They take RGB color values to set appropriate
color. The following statements provide examples
for both FONTCOLOR and BACKCOLOR.
| Print '0 BACKCOLOR 255FONTCOLOR' |
! black background, blue foreground |
| Print '65280 FONTCOLOR 255 BACKCOLOR'
|
! green foreground, blue background |
Back to dL4 FAQ's

How
do I print bright colors in a protected field?
Protected
fields are printed in dimmed mode. If, however,
the characters are already in a dark color,
the driver will display the field in a bright
color to contrast protected with unprotected
characters. Therefore, a protected field appears
in a bright color if a dark color is used in
the protected field. The following sample program
demonstrates how to display a protected field
in bright blue in dL4 for Windows.
10 Print '255FONTCOLOR BP';"Protected Field";'EP
FM', ! dimmed bright blue
20 Print '128FONTCOLOR BP';"Protected Field";'EP
FM'; ! dimmed dark blue
Back to dL4 FAQ's

How
do I have dL4 for UNIX clear the screen when
a user exits?
The
CLOSE macro in the user?s Terminal Definition
File (TDF) can be defined to output any string
of characters when dL4 exits.
Back to dL4 FAQ's

Is dL4 year 2000 compliant?
All
date and time related functions are year 2000
compliant in dL4.
Back to dL4 FAQ's

How
can I retain program line numbers while dumping
it to a text file?
The
"-u" option can be used on the DUMP command
to display line numbers in any program ("dump
-u filename").
Back to dL4 FAQ's

How
do I open a table in Microsoft SQL Server or
MySQL?
The
Microsoft SQL Full-ISAM driver (included in
dL4 for Windows) and the MySQL Full-ISAM driver
use a special filename format, server:database.owner.table.
The server and owner fields are optional. The
driver also supports "user=" and "pswd=" options
to specify the server login and password values.
The following are examples of opening tables.
Open
#3,"bigsystem:accounting.payroll"
As "Microsoft SQL Server Full-ISAM"
Open #3, "(user=fred, pswd=secret)xyz:sales.customer"
As "Microsoft SQL Server Full-ISAM"
Open #3,"server:accounting.payroll" As "MySQL
Full-ISAM"
Back to dL4 FAQ's

How can I create a
new SQL table?
Tables
can be created using the normal Full-ISAM procedure
of BUILDing a "file", defining the record structure,
and adding indexes.
<>
Back to dL4 FAQ's

How do I get c-tree
error in dL4?
The
msc$(2) built-in function returns the full text
of the last error message. For some errors,
such as "ISAMFILES value too small",
the error message will include c-tree specific
error information.
Back to dL4 FAQ's

What is BASIC error
97?
A BASIC error 97 indicates an unexpected error
status returned by system call. The error message
returned by msc$(2) will display Unix or Windows
system error number when an error 97 occurs.
Back to dL4 FAQ's

Why do I get an "Internal
error in driver' or BASIC error 84 while attempting
to open an Indexed file?
This error is reported if the ISAMFILES runtime
parameter value is set too small.
Back to dL4 FAQ's

Why do I get a "Driver
resource exhausted" while attempting to
open an Indexed file?
This error is reported if the ISAMFILES runtime
parameter value is set too small.
Back to dL4 FAQ's

How
do I set the ISAMFILES runtime parameter for
dL4 for Windows?
The runtime parameters are set in the Windows
Registry setting keys HKEY_CURRENT_USER\Software\DynamicConcepts\dL4\Environment
or HKEY_LOCAL_MACHINES\Software\DynamicConcepts\dL4\Environment.
Please refer to dL4
Installation & Configuration Guide for Windows
95/NT for details.
Back to dL4 FAQ's

How do I determine
the hot-key character used to start a SWAP program?
The
msc$(7) returns the hot-key character used to
start a SWAP program.
Back to dL4 FAQ's
How
do I find the name of the program running on
a port?
PORT
mode 4 returns the name of the program running
on a port.
Back to dL4 FAQ's
How
do I resize the Windows debugger?
The
commands "WF", "WH", and
"WS" in the SCOPE debugger resize
the height of the debugger window. The commands
set the debugger window to the full ("WF")
height, one half ("WH") height, or
a quarter ("WS") height of the full
screen, The debugger WINDOW command accepts
a single numeric parameter to set the number
of lines in the window (the command "WINDOW
6" or "W6" would select a height
of 6 lines).
Back to dL4 FAQ's
How
do I move the Windows debugger?
The
commands "WB" and "WT" in
the SCOPE debugger move the debugger window
to the bottom ("WB") or the top ("WT")
of the screen. The "WINDOW" command
can also be used to move the debugger window.
Note that, in dL4 for Unix, a debugger window
is only used if dL4 windows are open.
Back to dL4 FAQ's
Why
do I get "Subprogram file is not a BASIC
program"?
This error can occur if the program was created
using a later version of dL4. Usually, this
will only happen if the program uses a feature
of that later dL4 version which is not supported
in the local copy of dL4.
Back to dL4 FAQ's
How
do I PSAVE a program?
The
commands PSAVE and OEM support program protection.
Back to dL4 FAQ's
How
do I open a file in exclusive mode?
Contiguous,
Formatted, Indexed-Contiguous, and text files
may be exclusively opened using the EOPEN statement
('EOPN #1,"filename"') or the "E"
open access mode ('OPEN #1, "filename"').
For compatibility with UniBasic, an exclusive
open of a text file or non-Universal UniBasic
file will succeed if another user has already
opened the file in shared mode as long as the
file has not been opened by another user in
exclusive mode. An error will occur if a Portable
or Universal file is opened in exclusive mode
and another user has the file open in either
shared or exclusive mode.
Back to dL4 FAQ's
|