home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
d3nt8708.zip
/
D3NT8708.TXT
Wrap
Text File
|
1987-08-31
|
13KB
|
440 lines
APPEND FROM DELIMITED
version: DP DP11
date: 18 Aug 1987
text:
APPEND FROM <Filename> DELIMITED WITH BLANK does not recognize blank fields
and left-justifies the APPENDed data. When a blank field is APPENDed, the
field is filled with data from the next field in the record. The data in
the fields following the blank field are shifted into preceding fields.
Leading blanks are removed from all APPENDed data. To illustrate,
.LIST
Record# Field1 Field2 Field3
1 March March March
2 April April
3 May May May
4 June June June
. COPY TO Test TYPE DELIMITED WITH BLANK
. ZAP
. APPEND FROM Test TYPE DELIMITED WITH BLANK
. LIST
Record# Field1 Field2 Field3
1 March March March
2 April April
3 May May May
4 June June June
In record 2, the data from Field3 shifted to Field2.
CHR()
version: DP DP11
date: 18 Aug 1987
text:
CHR(138) and CHR(141) produce unexpected results when displayed on the
screen and cause .PRG files containing these characters to appear corrupted
when edited with MODIFY COMMAND. Displaying CHR(138) causes the rest of
the characters on that line to be suppressed. CHR(141) displays following
characters on the next line. This occurs because dBASE III PLUS interprets
CHR(138) and CHR(141) as a linefeed and a carriage return, respectively.
The dBASE III PLUS MODIFY COMMAND editor strips off the eighth data bit of
all characters except CHR(141) when files are loaded. When CHR(138) is
loaded into MODIFY COMMAND, it is transformed into CHR(10). Because
CHR(10) is the MODIFY COMMAND end-of-line marker, data after the CHR(138)
is not displayed. Executing a program file that formerly contained
CHR(138) produces various errors when executed, depending on the command
affected. When CHR(141) is loaded into the editor, characters following
are displayed on the next line and the line status, on the right side of
the screen, reveals that the line is continued. The CHR(141) remains in
the file unless it is deleted or overwritten.
COLUMNAR LISTINGS
version: DP DP11
date: 18 Aug 1987
text:
Here is a method you can use for listing a name and phone number file in
the format:
Smith, Joe phone number
Jones, Sally phone number
The following code fragment demonstrates how to do this using the TRIM
function.
(The value of the variable "col" determines the starting column of the
phone number.)
USE clients
col = 20
SET HEADING OFF
LIST OFF LEFT(TRIM(Lastname) + ", " + Firstname + SPACE(col),
col) + Phone
Using the Clients.DBF database file on the Sample Programs and Utilities
disk, the printout of the first three records would look like:
Buckman, Claire 456-9059
Lisbonn, Rick 555-3344
Bicksby, Hank 966-1278
DBCODE
version: DP DP11
date: 18 Aug 1987
text:
dBCODE does not trap illegal characters in filenames when encoding command
files. Executing a dBCODEd command file that references an illegal
filename produces the error message "Unrecognized phrase/keyword in
command." [36] or "File does not exist." [1].
EXCLUSIVE .OR.
version: DP DP11
date: 18 Aug 1987
text:
dBASE's .OR. is nonexclusive. In other words, it returns true (.T.) in any
case except when both conditions you are comparing are false (.F.).
Exclusive .OR. (normally called XOR) returns true (.T.) only if the two
conditions you are comparing are different.
To XOR two conditions, you can use the following formula (where term_a and
term_b represent two logical values):
? (term_a .AND. .NOT. term_b) .OR. (.NOT. term_a .AND. term_b)
The following code fragment prints out all the possible values for XOR:
x = "(term_a .AND. .NOT. term_b) .OR. (.NOT. term_a .AND.
term_b)"
term_a = .T.
term_b = .T.
? ".T. XOR .T. = " + IIF(&x,".T.",".F.")
term_a = .T.
term_b = .F.
? ".T. XOR .F. = " + IIF(&x,".T.",".F.")
term_a = .F.
term_b = .T.
? ".F. XOR .T. = " + IIF(&x,".T.",".F.")
term_a = .F.
term_b = .F.
? ".F. XOR .F. = " + IIF(&x,".T.",".F.")
The printout shows:
.T. XOR .T. = .F.
.T. XOR .F. = .T.
.F. XOR .T. = .T.
.F. XOR .F. = .F.
FILES TO ERASE WHEN REINSTALLING THE DBASE ADMINISTRATOR
version: DL DL11
date: 18 Aug 1987
text:
The following is a list of files and directories that must be deleted
before attempting to reinstall the dBASE Administrator:
1. DBA.COM in the dBASE subdirectory.
2. The \DBNETCTL.300\XXXXXXXX.SUB\VDF0300.HUM file, where XXXXXXXX is
variable.
3. All files in the \DBNETCTL.300 subdirectory.
4. The \DBNETCTL.300\XXXXXXXX.SUB subdirectory.
5. The \DBNETCTL.300 subdirectory.
INSTALL.BAT
version: DP DP11
date: 18 Aug 1987
text:
The files required to run dBASE III PLUS version 1.1 are not documented.
They are:
DBASE.EXE
DBASE.OVL
DBASEINL.OVL
DBASE.MSG
CONFIG.SYS (In the root directory of the boot disk.)
Additional files needed by dBASE III PLUS (version 1.1) to function fully
but not required to load are:
HELP.DBS
ASSIST.HLP
CONFIG.DB
title:
DIRECTORY
version:
DP DP11
date:
18 Aug 1987
text:
DIRECTORY is an undocumented dBASE III PLUS command that performs
identically to the dBASE DIR command.
NUMERIC FORMATTING WITH "$"
version: DP DP11
date: 18 Aug 1987
text:
The next two functions are designed to be used with REPORT FORM. If they
were to be used in a program, some operations would be performed on a
separate line to eliminate duplicate evaluation. In each case, "number"
represents a numeric field in your file. The semicolons and carriage
returns are included only for typographical clarity. Do not type them into
your REPORT FORMs.
To place a single "$" character to the left side of a right-aligned
number, place the following formula in the FIELD CONTENTS area of your
report:
STUFF(TRANSFORM(number, "9,999,999.99"),;
LEN(TRANSFORM(number, "9,999,999.99")) -;
LEN(LTRIM(TRANSFORM(number, "9,999,999.99"))), 1, "$")
In a program, you could accomplish the same goal with the statements:
m = "TRANSFORM(number, '9,999,999.99')"
LIST STUFF(&m, LEN(&m) - LEN(TRIM(&m)), 1, "$")
Using this formula, the number -333.21 would be output as
$-333.21
while the number 333.21 would be output as
$333.21
To place a single "$" character to the left side of a number with
parentheses around negative numbers, place the following formula in the
CREATE REPORT COLUMN:CONTENTS area of your report. Because this formula is
so long and the length of the expression is limited to 254 characters,
leave out any extra spaces as you type. If you run up against the
254-character limit, you might consider changing the variable names to
include fewer characters. You could also abbreviate the dBASE function
names by typing in only the first four characters of each.
IIF(Number < 0,
SPACE(13 - LEN(LTRIM(TRANSFORM(-number, "9,999,999.99"))))
+ "$(" +;
LTRIM(TRANSFORM(-number, "9,999,999.99")) +
")",;
SPACE(14 - LEN(LTRIM(TRANSFORM( number, "9,999,999.99"))))
+ "$" +;
LTRIM(TRANSFORM( number, "9,999,999.99")))
In a program, you could accomplish the same goal with the statements:
m = "LTRIM(TRANSFORM(ABS(num),'9,999,999.99'))"
? IIF(num < 0, SPACE(13 - LEN(m)) + "$(" + m + ")", ;
SPACE(14 - LEN(m)) + "$" + m)
Using this formula, the number -333.21 would be output as
$(333.21)
while the number 333.21 would be output as
$333.21
SEARCH A FIELD FOR ONE STRING AND REPLACE IT WITH ANOTHER
version: DP DP11
date: 18 Aug 1987
text:
Using the formula:
REPLACE ALL fieldname WITH ;
STUFF(fieldname, AT(str1, fieldname), LEN(str1), str2);
FOR str1 $ fieldname
you can replace any occurrence of str1 within the field "fieldname" with
str2.
The following code fragment uses the first three records of Clients.DBF, a
sample database file found on the dBASE III PLUS Sample Programs and
Utilities Diskette.
USE Clients
str1 = "Rick"
str2 = "Sally"
field = "Firstname"
REPLACE ALL &field WITH STUFF(&field, AT(str1, &field), ;
LEN(str1), str2) FOR str1 $ &field
str1 = "ck"
str2 = "x"
field = "Lastname"
REPLACE ALL &field WITH STUFF(&field, AT(str1, &field), ;
LEN(str1), str2) FOR str1 $ &field
This is the database file as it originally appeared:
1 Claire Buckman 8307 Santa Anita Oxnard 456-9059
2 Rick Lisbonn 1550 Keystone St. Glendale 555-3344
3 Hank Bicksby 4101 Peonia Rd Flagstaff 966-1278
This is the resulting file:
1 Claire Buxman 8307 Santa Anita Oxnard 456-9059
2 Sally Lisbonn 1550 Keystone St. Glendale 555-3344
3 Hank Bixsby 4101 Peonia Rd Flagstaff 966-1278
SET CATALOG TO ?
version: DP DP11
date: 18 Aug 1987
text:
Attempting to open a catalog file that has the same name as an open
database file or assigned alias name produces the error message "ALIAS name
already in use." [24]. To avoid the error message, assign a different
alias to the database file or close the database file before executing SET
CATALOG TO. For example,
USE Test
SET CATALOG TO Test
produces the error message.
USING THE NOVELL MAP COMMAND
version: DL DL11
date: 18 Aug 1987
text:
The powerful Novell MAP command can assist you in customizing your network
to take full advantage of dBASE III PLUS. The syntax for the MAP command
is outlined below, as well as some examples of how to interface the command
with dBASE.
Syntax:
MAP -- Displays the current drive mappings for your workstation.
MAP drive: -- Displays the current mappings for the specified drive.
MAP drive:=directory -- Maps the specified directory to the specified drive
letter. This command may also be nested: MAP drive:=directory;
drive:=directory
MAP directory -- Maps the specified directory to the default drive.
MAP drive:= -- Maps the default directory to the specified drive.
MAP INSERT search drive:=directory -- Inserts a new search drive that is
mapped to the specified directory. It positions this search drive into the
correct sequence in the search mappings.
MAP DEL drive: -- Removes a drive mapping.
The MAP command is very similar to the DOS SUBST command. The purpose of
the MAP command is to establish logical and search drives. A logical drive
is a subdirectory that can be accessed by specifying the drive designation
instead of the path. A search drive is similar to a logical drive except
that any directory specified as a search drive is added to the path that
DOS searches when executing a command that is not found in the current
directory. A search drive is also assigned a logical drive designation.
The maximum number of logical drives that can be MAPPED is 26. The maximum
number of search drives is 16.
Note that NetWare security will not allow you to access any files in
directories to which you have not been assigned rights. Therefore, mapping
a drive to a directory that you do not have rights to is a waste of a drive
designation.
When mapping search drives, the logical drive designations that are
automatically assigned start at Z: and work backward in the alphabet.
Therefore, when assigning logical drives, you should start at A: and work
down.
dBASE Examples:
You have installed dBASE ADMINISTRATOR onto a file server in a subdirectory
called SYS:DBA. When you installed, the DBNETCTL.300 subdirectory was
created, as SYS:DBNETCTL.300. You also created a sub-directory called
SYS:\DBA\APPS that contains all your applications and data files. If there
were no other drive mappings, the following mappings would be suggested:
MAP F:=SYS:DBA
MAP G:=SYS:DBA\APPS
MAP SEARCH1:=SYS:DBNETCTL.300
With these mappings, you could log into drive F: and start DBA. You could
then use the SET DEFAULT TO G: command to change directories to your
applications. Note also that it would not be necessary to use the #DF=
option on the DBA command line, because the DBNETCTL.300 directory will be
located by dBASE since its files are a part of a search drive. (You can
abbreviate a search mapping by replacing SEARCH1 with S1.)
When you log out from a file server, the logical drive mappings are
cleared, and your path is restored to the way it was before you logged in.