home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / d3nt8708.zip / D3NT8708.TXT
Text File  |  1987-08-31  |  13KB  |  440 lines

  1. APPEND FROM DELIMITED
  2.  
  3. version: DP DP11
  4. date:    18 Aug 1987
  5. text:
  6.  
  7. APPEND FROM <Filename> DELIMITED WITH BLANK does not recognize blank fields
  8. and left-justifies the APPENDed data.   When a blank field is APPENDed, the
  9. field is filled with data from the next field  in the record.   The data in
  10. the  fields  following the blank field are shifted  into  preceding fields.
  11. Leading blanks are removed from all APPENDed data.  To illustrate,
  12.  
  13.  
  14.      .LIST
  15.      Record#  Field1   Field2   Field3
  16.            1  March    March    March
  17.            2  April             April
  18.            3  May      May        May
  19.            4  June     June      June
  20.  
  21.     . COPY TO Test TYPE DELIMITED WITH BLANK
  22.     . ZAP
  23.     . APPEND FROM Test TYPE DELIMITED WITH BLANK
  24.     . LIST
  25.      Record#  Field1   Field2   Field3
  26.            1  March    March    March
  27.            2  April    April
  28.            3  May      May      May
  29.            4  June     June     June
  30.  
  31.  
  32. In record 2, the data from Field3 shifted to Field2.
  33.  
  34.  
  35. CHR()
  36.  
  37. version: DP DP11
  38. date:    18 Aug 1987
  39. text:
  40.  
  41. CHR(138)  and  CHR(141)  produce unexpected  results when  displayed on the
  42. screen and cause .PRG files containing these characters to appear corrupted
  43. when edited  with MODIFY COMMAND.   Displaying CHR(138)  causes the rest of
  44. the characters on that line to be suppressed.   CHR(141) displays following
  45. characters on the next line.  This occurs because dBASE III PLUS interprets
  46. CHR(138) and CHR(141) as a linefeed and a carriage return, respectively.
  47.  
  48. The dBASE III PLUS MODIFY COMMAND editor strips off the eighth data  bit of
  49. all  characters  except CHR(141)  when files are loaded.   When CHR(138) is
  50. loaded into  MODIFY  COMMAND,  it  is  transformed  into  CHR(10).  Because
  51. CHR(10)  is the MODIFY COMMAND end-of-line marker,  data after the CHR(138)
  52. is  not  displayed.   Executing  a  program  file  that  formerly contained
  53. CHR(138)  produces various errors  when executed,  depending on the command
  54. affected.   When CHR(141)  is loaded into the  editor, characters following
  55. are displayed on the next line and the line  status,  on the right  side of
  56. the screen,  reveals that the line is  continued.   The CHR(141) remains in
  57. the file unless it is deleted or overwritten.
  58.  
  59.  
  60. COLUMNAR LISTINGS
  61.  
  62. version: DP DP11
  63. date:    18 Aug 1987
  64. text:
  65.  
  66. Here is a method you can use for listing a name  and phone  number  file in
  67. the format:
  68.  
  69.     Smith, Joe          phone number
  70.     Jones, Sally        phone number
  71.  
  72.  
  73. The following code  fragment  demonstrates  how to  do this using  the TRIM
  74. function.
  75.  
  76. (The value of  the variable  "col"  determines the starting  column  of the
  77. phone number.)
  78.  
  79.  
  80. USE clients
  81. col = 20
  82. SET HEADING OFF
  83. LIST OFF LEFT(TRIM(Lastname) + ", " + Firstname + SPACE(col),
  84. col) + Phone
  85.  
  86.  
  87. Using the Clients.DBF database  file  on the Sample Programs  and Utilities
  88. disk,  the printout of the first three records would look like:
  89.  
  90.  
  91. Buckman, Claire      456-9059
  92. Lisbonn, Rick        555-3344
  93. Bicksby, Hank        966-1278
  94.  
  95.  
  96. DBCODE
  97.  
  98. version: DP DP11
  99. date:    18 Aug 1987
  100. text:
  101.  
  102. dBCODE does not trap illegal characters in filenames when  encoding command
  103. files.   Executing  a  dBCODEd  command  file  that  references  an illegal
  104. filename  produces  the  error  message   "Unrecognized  phrase/keyword  in
  105. command." [36] or "File does not exist." [1].
  106.  
  107.  
  108. EXCLUSIVE .OR.
  109.  
  110. version: DP DP11
  111. date:    18 Aug 1987
  112. text:
  113.  
  114. dBASE's .OR. is nonexclusive.  In other words, it returns true (.T.) in any
  115. case except when both conditions you are comparing are false (.F.).
  116.  
  117. Exclusive .OR.  (normally called  XOR)  returns true (.T.)  only if the two
  118. conditions you are comparing are different.
  119.  
  120. To XOR two conditions,  you can use the following formula (where term_a and
  121. term_b represent two logical values):
  122.  
  123.  
  124. ? (term_a .AND. .NOT. term_b) .OR. (.NOT. term_a .AND. term_b)
  125.  
  126. The following code fragment prints out all the possible values for XOR:
  127.  
  128.  
  129. x = "(term_a .AND. .NOT. term_b) .OR. (.NOT. term_a .AND.
  130. term_b)"
  131. term_a = .T.
  132. term_b = .T.
  133. ? ".T. XOR .T. = " + IIF(&x,".T.",".F.")
  134. term_a = .T.
  135. term_b = .F.
  136. ? ".T. XOR .F. = " + IIF(&x,".T.",".F.")
  137. term_a = .F.
  138. term_b = .T.
  139. ? ".F. XOR .T. = " + IIF(&x,".T.",".F.")
  140. term_a = .F.
  141. term_b = .F.
  142. ? ".F. XOR .F. = " + IIF(&x,".T.",".F.")
  143.  
  144.  
  145. The printout shows:
  146.  
  147.  
  148. .T. XOR .T. = .F.
  149. .T. XOR .F. = .T.
  150. .F. XOR .T. = .T.
  151. .F. XOR .F. = .F.
  152.  
  153.  
  154. FILES TO ERASE WHEN REINSTALLING THE DBASE ADMINISTRATOR
  155.  
  156. version: DL DL11
  157. date:    18 Aug 1987
  158. text:
  159.  
  160. The  following is  a list  of  files and directories that  must  be deleted
  161. before attempting to reinstall the dBASE Administrator:
  162.  
  163. 1.  DBA.COM in the dBASE subdirectory.
  164.  
  165. 2.  The \DBNETCTL.300\XXXXXXXX.SUB\VDF0300.HUM file, where XXXXXXXX is
  166.     variable.
  167.  
  168. 3.  All files in the \DBNETCTL.300 subdirectory.
  169.  
  170. 4.  The \DBNETCTL.300\XXXXXXXX.SUB subdirectory.
  171.  
  172. 5.  The \DBNETCTL.300 subdirectory.
  173.  
  174.  
  175. INSTALL.BAT
  176.  
  177. version: DP DP11
  178. date:    18 Aug 1987
  179. text:
  180.  
  181. The files required to  run dBASE III PLUS  version 1.1  are not documented.
  182. They are:
  183.  
  184.      DBASE.EXE
  185.      DBASE.OVL
  186.      DBASEINL.OVL
  187.      DBASE.MSG
  188.      CONFIG.SYS    (In the root directory of the boot disk.)
  189.  
  190. Additional files needed by dBASE III  PLUS (version 1.1)  to function fully
  191. but not required to load are:
  192.  
  193.      HELP.DBS
  194.      ASSIST.HLP
  195.      CONFIG.DB
  196.  
  197.  
  198. title:
  199. DIRECTORY
  200. version:
  201. DP DP11
  202. date:
  203. 18 Aug 1987
  204. text:
  205.  
  206. DIRECTORY  is  an  undocumented  dBASE  III  PLUS  command   that  performs
  207. identically to the dBASE DIR command.
  208.  
  209.  
  210. NUMERIC FORMATTING WITH "$"
  211.  
  212. version: DP DP11
  213. date:    18 Aug 1987
  214. text:
  215.  
  216. The next two functions are designed  to be used  with REPORT FORM.  If they
  217. were to  be  used  in  a program,  some operations would be  performed on a
  218. separate line  to eliminate  duplicate evaluation.   In each case, "number"
  219. represents a numeric field  in  your  file.   The  semicolons  and carriage
  220. returns are included only for typographical clarity.  Do not type them into
  221. your REPORT FORMs.
  222.  
  223. To place a single "$" character to the left side of a right-aligned
  224. number,  place  the following formula in  the FIELD CONTENTS  area  of your
  225. report:
  226.  
  227.     STUFF(TRANSFORM(number, "9,999,999.99"),;
  228.       LEN(TRANSFORM(number, "9,999,999.99")) -;
  229. LEN(LTRIM(TRANSFORM(number, "9,999,999.99"))), 1, "$")
  230.  
  231.  
  232. In a program, you could accomplish the same goal with the statements:
  233.  
  234.  
  235. m = "TRANSFORM(number, '9,999,999.99')"
  236. LIST STUFF(&m, LEN(&m) - LEN(TRIM(&m)), 1, "$")
  237.  
  238.  
  239. Using this formula, the number -333.21 would be output as
  240.  
  241.  
  242.      $-333.21
  243.  
  244.  
  245. while the number 333.21 would be output as
  246.  
  247.  
  248.       $333.21
  249.  
  250.  
  251.  
  252. To place a  single  "$"  character  to  the  left  side  of  a  number with
  253. parentheses around  negative  numbers,  place the following formula  in the
  254. CREATE REPORT COLUMN:CONTENTS area of your report.  Because this formula is
  255. so  long  and the length  of the  expression is limited to  254 characters,
  256. leave out any extra  spaces  as  you  type.   If  you  run  up  against the
  257. 254-character limit,  you might consider  changing  the  variable  names to
  258. include fewer characters.   You could also  abbreviate  the  dBASE function
  259. names by typing in only the first four characters of each.
  260.  
  261.  
  262. IIF(Number < 0,
  263.     SPACE(13 - LEN(LTRIM(TRANSFORM(-number, "9,999,999.99"))))
  264. + "$(" +;
  265.                    LTRIM(TRANSFORM(-number, "9,999,999.99")) +
  266. ")",;
  267.     SPACE(14 - LEN(LTRIM(TRANSFORM( number, "9,999,999.99"))))
  268. + "$" +;
  269.                    LTRIM(TRANSFORM( number, "9,999,999.99")))
  270.  
  271.  
  272. In a program, you could accomplish the same goal with the statements:
  273.  
  274.  
  275. m = "LTRIM(TRANSFORM(ABS(num),'9,999,999.99'))"
  276. ? IIF(num < 0, SPACE(13 - LEN(m)) + "$(" + m + ")", ;
  277.                SPACE(14 - LEN(m)) + "$" + m)
  278.  
  279.  
  280. Using this formula, the number -333.21 would be output as
  281.  
  282.  
  283.      $(333.21)
  284.  
  285.  
  286. while the number 333.21 would be output as
  287.  
  288.  
  289.       $333.21
  290.  
  291.  
  292. SEARCH A FIELD FOR ONE STRING AND REPLACE IT WITH ANOTHER
  293.  
  294. version: DP DP11
  295. date:    18 Aug 1987
  296. text:
  297.  
  298. Using the formula:
  299.  
  300.  
  301. REPLACE ALL fieldname WITH ;
  302.     STUFF(fieldname, AT(str1, fieldname), LEN(str1), str2);
  303.     FOR str1 $ fieldname
  304.  
  305.  
  306. you can replace any occurrence  of  str1  within the field "fieldname" with
  307. str2.
  308.  
  309. The following code fragment uses the first three records of  Clients.DBF, a
  310. sample database  file  found on  the dBASE  III  PLUS  Sample  Programs and
  311. Utilities Diskette.
  312.  
  313.  
  314. USE Clients
  315. str1 = "Rick"
  316. str2 = "Sally"
  317. field = "Firstname"
  318. REPLACE ALL &field WITH STUFF(&field, AT(str1, &field), ;
  319.         LEN(str1), str2) FOR str1 $ &field
  320. str1 = "ck"
  321. str2 = "x"
  322. field = "Lastname"
  323. REPLACE ALL &field WITH STUFF(&field, AT(str1, &field), ;
  324.         LEN(str1), str2) FOR str1 $ &field
  325.  
  326.  
  327. This is the database file as it originally appeared:
  328.  
  329.  
  330. 1  Claire   Buckman    8307 Santa Anita     Oxnard          456-9059
  331. 2  Rick     Lisbonn    1550 Keystone St.    Glendale        555-3344
  332. 3  Hank     Bicksby    4101 Peonia Rd       Flagstaff       966-1278
  333.  
  334.  
  335. This is the resulting file:
  336.  
  337.  
  338. 1  Claire   Buxman     8307 Santa Anita     Oxnard          456-9059
  339. 2  Sally    Lisbonn    1550 Keystone St.    Glendale        555-3344
  340. 3  Hank     Bixsby     4101 Peonia Rd       Flagstaff       966-1278
  341.  
  342.  
  343. SET CATALOG TO ?
  344.  
  345. version: DP DP11
  346. date:    18 Aug 1987
  347. text:
  348.  
  349. Attempting to  open  a catalog file  that  has the  same  name  as  an open
  350. database file or assigned alias name produces the error message "ALIAS name
  351. already  in  use."  [24].   To avoid the error message,  assign a different
  352. alias to the database file or close the database file  before executing SET
  353. CATALOG TO.  For example,
  354.  
  355.  
  356.      USE Test
  357.      SET CATALOG TO Test
  358.  
  359.  
  360. produces the error message.
  361.  
  362.  
  363. USING THE NOVELL MAP COMMAND
  364.  
  365. version: DL DL11
  366. date:    18 Aug 1987
  367. text:
  368.  
  369. The powerful Novell MAP command can assist you in  customizing your network
  370. to take full advantage of dBASE III PLUS.   The syntax for the  MAP command
  371. is outlined below, as well as some examples of how to interface the command
  372. with dBASE.
  373.  
  374.  
  375. Syntax:
  376.  
  377. MAP -- Displays the current drive mappings for your workstation.
  378.  
  379. MAP drive: -- Displays the current mappings for the specified drive.
  380.  
  381. MAP drive:=directory -- Maps the specified directory to the specified drive
  382. letter.  This command may also be nested: MAP drive:=directory;
  383. drive:=directory
  384.  
  385. MAP directory -- Maps the specified directory to the default drive.
  386.  
  387. MAP drive:= -- Maps the default directory to the specified drive.
  388.  
  389. MAP INSERT search  drive:=directory --  Inserts a new search drive  that is
  390. mapped to the specified directory.  It positions this search drive into the
  391. correct sequence in the search mappings.
  392.  
  393. MAP DEL drive: -- Removes a drive mapping.
  394.  
  395. The MAP command is very similar to the DOS SUBST command.   The  purpose of
  396. the MAP command is to establish logical and search drives.  A logical drive
  397. is a subdirectory that can be accessed by specifying the  drive designation
  398. instead of the path.   A search drive is similar to a  logical drive except
  399. that any directory specified as  a search drive  is added to the  path that
  400. DOS  searches  when executing  a command that  is not found  in the current
  401. directory.   A search drive is also  assigned a  logical drive designation.
  402. The maximum number of logical drives that can be MAPPED is 26.  The maximum
  403. number of search drives is 16.
  404.  
  405. Note  that  NetWare security  will  not allow you to  access  any  files in
  406. directories to which you have not been assigned rights.  Therefore, mapping
  407. a drive to a directory that you do not have rights to is a waste of a drive
  408. designation.
  409.  
  410. When  mapping  search  drives,  the  logical  drive  designations  that are
  411. automatically assigned  start at  Z:  and work  backward  in  the alphabet.
  412. Therefore,  when assigning logical drives,  you should start at A: and work
  413. down.
  414.  
  415. dBASE Examples:
  416.  
  417. You have installed dBASE ADMINISTRATOR onto a file server in a subdirectory
  418. called SYS:DBA.   When you  installed,  the  DBNETCTL.300  subdirectory was
  419. created,  as SYS:DBNETCTL.300.  You  also  created  a  sub-directory called
  420. SYS:\DBA\APPS that contains all your applications and data files.  If there
  421. were no other drive mappings, the following mappings would be suggested:
  422.  
  423.  
  424.             MAP F:=SYS:DBA
  425.  
  426.             MAP G:=SYS:DBA\APPS
  427.  
  428.             MAP SEARCH1:=SYS:DBNETCTL.300
  429.  
  430.  
  431. With these mappings,  you could log into drive F: and start DBA.  You could
  432. then use the SET DEFAULT  TO  G:  command  to  change  directories  to your
  433. applications.   Note also that it  would not be  necessary to  use the #DF=
  434. option on the DBA command line,  because the DBNETCTL.300 directory will be
  435. located by dBASE since its files are a part  of  a search  drive.  (You can
  436. abbreviate a search mapping by replacing SEARCH1 with S1.)
  437.  
  438. When you log out  from  a  file  server,  the  logical  drive  mappings are
  439. cleared, and your path is restored to the way it was before you logged in.
  440.