home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / tech86.zip / TECH86.TXT
Text File  |  1987-04-27  |  59KB  |  1,459 lines

  1. *** HANDLES.ASM
  2. Handles.ASM         (December p. 26, dBASE III PLUS)
  3.  
  4. Handles.ASM is an assembly language program that you LOAD and CALL
  5. allowing you to check the number of DOS file handles available at any
  6. given time from within dBASE III PLUS.  It assumes your FILES setting in
  7. CONFIG.SYS is 20.  If your "Too many files are open" error condition is
  8. caused by a problem with CONFIG.SYS, this utility is not useful.
  9. Additionally, if you have LOADed and CALLed ADDFILES.BIN from the dBASE
  10. Programmer's Utilities to extend the total number of file handles
  11. available under DOS 3.0 and above to over 20, you need to add five to the
  12. result of Handles.
  13.  
  14. Files Needed:  Handles.ASM or Handles.BIN
  15.  
  16. Handles.BIN is an assembled and linked version of Handles.ASM.  You can
  17. LOAD and CALL this file from within dBASE III PLUS.  Handles.ASM is the
  18. assembler code that you can study and change if you like.
  19. *** SETPRINT.ASM
  20. Setprint.ASM        (December p. 17, dBASE III, dBASE III PLUS)
  21.  
  22. This program allows you to store up to ten sets of printer control codes
  23. in a data table and send these codes to your printer from dBASE III, dBASE
  24. III PLUS, or DOS.  There are three files: Setprint.BIN, Setprint.ASM, and
  25. Patchprt.PRG.  Setprint.ASM is the assembly language program that stores
  26. the printer codes in a data table and sends them to your printer.  If you
  27. want to execute this program from DOS or RUN it from dBASE, assemble it to
  28. a .COM file format.  Setprint.BIN is the same program assembled as a .BIN
  29. file so that you can LOAD and CALL it from within dBASE III PLUS.
  30. Patchprt.PRG is a dBASE III PLUS program that provides a way for you to
  31. add, edit, and change codes stored in the data table without having to
  32. reassemble and link Setprint.ASM.
  33.  
  34. Setprint (.COM or .BIN)
  35.  
  36. Setprint accepts one parameter, either a ? or a number between 0 and 9
  37. inclusive.  The number you enter (0 - 9) sends the control codes
  38. corresponding to that table position to the printer.  If you are executing
  39. it as a .BIN file, the parameter is a character string.  If you are
  40. executing it as a .COM file from DOS or dBASE, the parameter is a literal.
  41. For example,
  42.  
  43.      LOAD Setprint
  44.      CALL Setprint WITH "3"
  45. or
  46.      RUN Setprint 3
  47.  
  48. You can use the ? symbol as a parameter to display a list of the
  49. codes stored in the table.
  50.  
  51. Patchprt.PRG
  52.  
  53. When using Patchprt, enter the printer control codes as literal characters
  54. or as ASCII decimal values.  ASCII decimal values must be entered as
  55. three-digit numbers delimited with braces, such as {027} for Esc.  Enter
  56. each code from left to right without separating them with spaces or
  57. commas.  For non-printable characters, such as Esc, always use the ASCII
  58. decimal value.  For example, on an Epson printer, the code sequence for
  59. double-strike is Esc G.  You can enter this in either of the following
  60. ways:
  61.  
  62.      {027}G     or     {027}{071}
  63.  
  64. Each sequence is limited to 26 codes.  This limitation refers to the
  65. actual number of ASCII codes sent, not to the number of characters used to
  66. send the control codes.  For example, the letter "A" and its ASCII decimal
  67. equivalent {065} are both considered a single code.
  68.  
  69. Files Needed:  Patchprt.PRG, Setprint.ASM or Setprint.BIN
  70.  
  71. -- SetPrint.ASM
  72.  
  73. To use Setprint.ASM from within dBASE III or dBASE III PLUS, your computer
  74. must have at least 320K of RAM.  To assemble Setprint.ASM as a .COM file,
  75. the following files must be available, either in the same subdirectory as
  76. SetPrint.ASM or through the DOS PATH command: MASM.EXE (the IBM Micorsoft
  77. Macro Assembler, version 2.0 or higher), LINK.EXE and EXE2BIN.EXE
  78. (included on the DOS Supplemental Programs disk with verison 2.0 and
  79. higher).  From the DOS prompt, type:
  80.  
  81.          MASM Setprint.ASM;
  82.          LINK Setprint;
  83.          EXE2BIN Setprint.EXE Setprint.COM
  84.  
  85.  
  86. -- Patchprt.PRG
  87.  
  88. When using Patchprt, Setprint (.BIN or .COM) must be in the same
  89. subdirectory.  The DOS file DEBUG.COM must also be available.  To execute
  90. the program, type DO Patchprt from within dBASE III PLUS.
  91. *** MEDIT.BAT
  92. Medit.BAT           (November p. 18, dBASE III PLUS)
  93.  
  94. This program is a DOS batch file that allows you to use MultiMate
  95. Advantage as the dBASE III PLUS text editor.  The program makes three
  96. assumptions:
  97.  
  98. 1. MultiMate Advantage is not in the dBASE III PLUS directory.
  99.  
  100. 2. The conversion program, UTIL, is installed correctly and is in the same
  101.    directory as MultiMate Advantage.
  102.  
  103. 3. Your computer has enough RAM (320K) to run MultiMate Advantage within
  104.    dBASE III PLUS.
  105.  
  106. Files Needed:  Medit.BAT
  107.  
  108. To set up the program, copy Medit.BAT to the dBASE III PLUS directory.
  109. Then add one or both of the following command lines to your CONFIG.DB file:
  110.  
  111.      TEDIT = MEDIT
  112.      WP = MEDIT
  113. and
  114.      MEMOWIDTH = 65
  115.  
  116. In addition, install the MultiMate conversion utility, UTIL, with the
  117. following parameters:
  118.  
  119.               Edit ASCII Defaults
  120.  
  121. To ASCII:
  122.  
  123.    Use Document Summary Screen for Page One ?   NO
  124.    Accept Extended Characters ?                 NO
  125.    Line End Sequence ?                          CR/LF
  126.    Page End Sequence ?                          No Page End
  127.    Replace Tabs with Spaces                     No
  128.    Remove Underlining ?                         Yes
  129.  
  130. From ASCII:
  131.  
  132.    Remove Page One ?                            NO
  133.    Remove Extended Characters ?                 YES
  134.    Line End Sequence ?                          CR/LF
  135.    Remove Returns Where Possible ?              YES
  136.    Lines per Page (1-150) ?  055
  137.    F9 to Edit Format Line
  138. *** MENU.BAT
  139. Menu.BAT            (March p. 29, dBASE III PLUS)
  140.  
  141. This program allows you to set up a front-end menu system using DOS batch
  142. files.  The following three files are used: Menu.BAT, Menu.DAT, and
  143. Choose.COM.  Menu.BAT is the controlling program that calls Menu.DAT and
  144. Choose.COM.  Menu.DAT contains the menu screen and is TYPEd to the screen
  145. by Menu.BAT.  Choose.COM waits for keyboard input before returning a DOS
  146. ERRORLEVEL back to Menu.BAT.
  147.  
  148. Files Needed:  Menu.BAT, Menu.DAT, Choose.COM
  149.  
  150. To set up this program, modify Menu.DAT to reflect the menu options that
  151. you want.  In addition, modify Menu.BAT to change the messages that
  152. display and the program paths stated.
  153.  
  154. To use the program, copy Menu.BAT, Menu.DAT, and Choose.COM to the root
  155. directory of your hard disk.  Then, either type MENU from the DOS prompt
  156. or include MENU as the last line in your AUTOEXEC.BAT file.
  157. *** FW.DEF
  158. FW.DEF              (December p. 7, Framework II)
  159.  
  160. This program allows you to interface the Microsoft Mouse with Framework II.
  161. You can, for example, navigate and select options through the Framework II
  162. pull-down menus, execute macros, and redefine the function of each mouse
  163. button.  Fw.DEF is the driver program written in the Microsoft
  164. Mouse language, and Mouse.BAT is a batch file that installs the
  165. mouse driver each time you execute Framework II.
  166.  
  167. Files Needed:  FW.DEF, MOUSE.BAT
  168.  
  169. Before using the Microsoft Mouse with Framework II, install a text mode
  170. driver (such as the IBM Color Text driver).  The mouse does not work wll
  171. with a graphics screen driver.
  172.  
  173. To install the Microsoft Mouse driver, follow these steps:
  174.  
  175. 1. Copy the following files from the Microsoft Mouse disk to
  176.    your Framework II subdirectory: MOUSE.COM, MENU.COM, and
  177.    MAKEMENU.EXE.
  178.  
  179. 2. Copy FW.DEF and Mouse.BAT to your Framework II subdirectory.
  180.  
  181. 3. From the DOS prompt, execute MAKEMENU and convert FW.DEF to
  182.    FW.MNU.
  183. *** HELP.COM
  184. Help.COM
  185.  
  186. Files Needed: Help.COM, Help.REC
  187.  
  188. This menu-driven help facility includes information on all the files on
  189. the TechNotes Disk.  The arrow keys can be used to navigate through the
  190. menu on-screen, and pressing the RETURN key chooses a help file to
  191. display.  The Home key takes the highlight to the first file, and the End
  192. key takes it to the last.  The PgUp and PgDn keys take the cursor to the
  193. top and bottom of the current column.
  194.  
  195. All the help files can be printed at once from the main menu, and a single
  196. file can be printed once its contents are displayed.  In either case, the
  197. printing is started by pressing 'P'.  Printing can be halted by pressing
  198. the F10 key.
  199.  
  200. The help facility can also be started by typing HELP FILENAME from the DOS
  201. prompt.  If the file is found, its help will be displayed.  If not, the
  202. main menu will be displayed.
  203.  
  204.                     Press F10 twice to return to DOS.
  205. *** PROTEAN.FW 
  206. Protean.FW          (February p. 38, Framework)
  207.  
  208. Protean 1: This routine allows you to validate a filename and to prompt
  209. the user if the filename selected is not valid.
  210.  
  211. Protean 2: This routine ensures that an existing file is not
  212. overwritten without verification.
  213.  
  214. Protean 3: This routine can be used to test for the boundary of a
  215. frame (end-of-file).  Any attempt to advance to a nonexistent character,
  216. frame, spreadsheet cell, or database record sets @isabend to #TRUE.
  217.  
  218. Files Needed:  Protean.FW
  219.  
  220. Protean.FW includes three separate @isabend routines.  Each routine can be
  221. incorporated in one of your programs.
  222. *** ADD.FW2
  223. Add.FW2             (November p. 34, Framework II)
  224.  
  225. This program automates the data-entry process by navigating the cursor
  226. through the fields and records for you.  Once you press Return in one
  227. field, the program automatically moves the cursor to the next field or
  228. record, (depending on which field the cursor is on at the time).  Esc
  229. terminates the program.
  230.  
  231. Files Needed:  Add.FW2
  232.  
  233. Set this up as a macro with @setmacro({Alt-A},Add.Getfields).  To execute
  234. this data-entry program, create a spreadsheet with the following column
  235. headings: Date, Check No, Payee, Amount.  Then, move the cursor to the
  236. first column of a blank record, press Alt-A, and follow the screen prompts
  237. to enter records.  Press Esc to exit the program.
  238. *** ADDLIB.FW2
  239. Addlib.FW2           (Framework II)
  240.  
  241. Addition to the Framework II Library.
  242.  
  243. To setup this addition to your Framework II Library, load ADDLIB.FW2 on
  244. the desktop, and COPY it into the Library frame.  Make sure that the Alt
  245. keys defined are not already used in the Library frame.
  246.  
  247. --Bold (Alt-A)
  248. Label Style: Bold 
  249.  
  250. Highlight a frame label and press Alt-A to style it in bold text.  This
  251. macro can be used with the Ctrl-<n> repeat key.
  252.  
  253. -- Box (Alt-B)
  254. Box-drawing macro.
  255.  
  256. Press Alt-B from inside a word frame.  The word frame must be alligned left
  257. in order to use this macro.  You'll be prompted for the width and height
  258. of the box to be drawn.  Be sure to create the box before entering the
  259. text. Otherwise, the box will overwrite any text in its path.  If the width
  260. chosen is greater than the right margin, the right side of the box is not
  261. drawn.
  262.  
  263. -- @LString
  264. Extracts the left portion of a character string.
  265.  
  266. @LString( ref , chr , logical )
  267.  
  268.    ref is the character string.
  269.    chr is the specified character.
  270.    logical, when #TRUE, retains chr in the extracted substring and
  271.      omits it when #FALSE.
  272.  
  273. See also, Alt-L.
  274.  
  275. -- @MString
  276. Extracts the middle portion of a character string.
  277.  
  278.      @MString( Ref , chr1 , chr2 , logical1 , logical2 )
  279.  
  280.    ref is the full-length character string.
  281.    chr1 is the character where the extraction begins.
  282.    chr2 is the character where the extractions ends.
  283.    logical1 and logical2 are parameters that determine whether chr1
  284.       and chr2 are retained (#TRUE) or ignored (#FALSE) in the extracted 
  285.       string.
  286.  
  287.    If "312/555-1212" resides in a Framework II database field named
  288.    Phone, the line
  289.  
  290.       @MString( Phone , "/" , "-" , #TRUE , #FALSE )
  291.  
  292.    extracts "/555" (retains chr1, ignores chr2) and the line
  293.    
  294.       @MString( Phone , "/" , "-" , #FALSE , #TRUE )
  295.  
  296.    extracts "555-" (ignores chr1, retains chr2).
  297.  
  298. See also, Alt-M.
  299.  
  300. -- Normal (Alt-F)
  301. Label Style: Normal.
  302.  
  303. Highlight a frame label and press Alt-? to style it in normal text.  This
  304. macro can be used with the Ctrl-<n> repeat key.
  305.  
  306. -- @RString
  307. Extracts the right portion of a character string.
  308.  
  309.      @RString( ref , chr , logical )
  310.  
  311.    ref is the character string.
  312.    chr is the specified character.
  313.    logical, when #TRUE, retains chr in the extracted substring and
  314.       omits it when #FALSE.
  315.  
  316. See also, Alt-R.
  317.  
  318. -- Italic (Alt-I)
  319. Label Style: Italic.
  320.  
  321. Highlight a frame label and press Alt-? to style it in italic text.  This
  322. macro can be used with the Ctrl-<n> repeat key.
  323.  
  324. -- Autotype.FW2 (Alt-K)
  325. Automates the typing of keynames when using @performkeys.
  326.  
  327. When programming, press Alt-K to enter a keyname.  When prompted, press the
  328. key to be named and then Ctrl-Break.  The macro will type the keyname for
  329. you.
  330.  
  331. --Alt-L
  332. Extracts left portion of a character string in a word frame.
  333.  
  334. Highlight the character string and press Alt-L.  You'll be prompted to
  335. specify the rightmost character (that is, where the macro should end in
  336. selecting characters for the new string) for use in the substring and
  337. whether you want this character included in the new string.  The old string
  338. will be deleted and the new string will replace it.
  339.  
  340. See also, @LString.
  341.  
  342. -- Alt-M
  343. Macro to extract middle portion of a character string in a word frame.
  344.  
  345. Highlight the character string and press Alt-M.  You'll be prompted for the
  346. rightmost character (seg2) and the leftmost character (seg1).  The
  347. resulting character string will be the characters between seg1 and seg2.
  348. You'll also be prompted on whether you wish to retain the characters
  349. selected as seg1 and seg2.
  350.  
  351. See also, @MString.
  352.  
  353. -- Alt-N
  354. Converts a text number into a numeric value.
  355.  
  356. Highlight the offending text number and press Alt-N.
  357.  
  358. -- Alt-R
  359. Extracts right portion of a character string in a word frame.
  360.  
  361. Highlight the character string and press Alt-R.  You'll be prompted for the
  362. leftmost character (that is, where the macro should start in selecting
  363. characters for the new string) for use in the substring and whether you
  364. want this character included in the new string.  The old string will be
  365. deleted and the new string will replace it.
  366.  
  367. See also, @RString.
  368.  
  369. -- Alt-T
  370. Converts numeric value to text.
  371.  
  372. Highlight the offending numeric data and press Alt-T.
  373.  
  374. See also, Alt-N.
  375.  
  376. -- Underline (Alt-U)
  377. Label Style: Underline.
  378.  
  379. Highlight a frame label and press Alt-U to style it in underlined text.
  380. This macro can be used with the Ctrl-<n> repeat key.
  381.  
  382. -- Alt-W
  383. Macro to widen a  c h a r a c t e r  s t r i n g.
  384.  
  385. Highlight the character string and press Alt-W.  The old string will be
  386. deleted and the new  w i d e  string will replace it.
  387.  
  388. -- Trace.FW2 (Alt-Y)
  389. Automates the selection of @trace.
  390.  
  391. Press Alt-Y from the desktop.  From the menu, select ON or OFF.  If you
  392. select ON, a frame called "trace" is created, which will hold the results
  393. of the trace operation, and trace is turned on.  If such a trace frame
  394. already exists, the trace operation will use it.  Press Alt-S again to
  395. select OFF.
  396. *** BACKUP.FW2
  397. Backup.FW2 (Alt-V)        (September p. 40, Framework II)
  398.  
  399. Macro to back up a frame as a text file or frame file.
  400.  
  401. Highlight the frame to be backed up.  Press Alt-V and you'll be prompted
  402. for the new file type (T for text file, F for frame file) and the file
  403. extension.  When the back-up file is written, you'll be returned to your
  404. work.
  405. *** CALCSIZE.FW2
  406. Calcsize.FW2 (Alt-O)      (July p. 47, Framework II)
  407.  
  408. Macro to calculate the width of a spreadsheet for printing.
  409.  
  410. Load the spreadsheet frame to be sized to the desktop.  Press Alt-O and
  411. supply beginning and ending columns at the prompts.  The width will be
  412. displayed at the bottom of the screen.
  413. *** COPYPROG.FW2
  414. Copyprog.FW2 (Alt-C)    (August p. 53,Framework II)
  415.  
  416. Macro to copy highlighted frames to floppy disk from hard disk.
  417. Press Alt-C from anywhere on the desktop.  You'll be prompted to highlight
  418. the frames to be copied.  You can highlight a whole subdirectory.  Press
  419. Return and the highlighted files will be copied to drive A:.
  420. *** ELAPSED.FW2
  421. Elapsed.FW2 (@Elapsed_Time)      (July p. 46, Framework II)
  422.  
  423. Determines the elapsed time between start/end dates.
  424.  
  425.      @Elapsed_Time( starttime , endtime )
  426.  
  427. starttime and endtime must be date-type values created with @datetime, and
  428. can be located in a spreadsheet cell or a database record.
  429.  
  430. The returned value is a character string consisting of the elapsed hours,
  431. minutes, seconds, milliseconds in the format HH:MM:SS.mm 
  432. *** ENGLDATE.FW2
  433. Engldate.FW2 (@Engldate)     (August p. 52, Framework II)
  434.  
  435. Compares English dates.
  436.  
  437.     @Engldate( ref ) 
  438.  
  439. where ref is the English-type date field (created with @date1 or @date4).
  440. *** ENGSCI.FW2
  441. Engsci.FW2 (@Engsci)       (October p. 39, Framework II)
  442.  
  443. Formats in scientific notation with a mantissa less than one.
  444.  
  445.      @Engsci( <numeric expression>, <decimal places>)
  446.  
  447. Because Engsci (like @scientific) returns a character-type data, use
  448. @value to convert the formatted string to a numeric value.
  449. *** FILLCHAR.FW2
  450. Fillchar.FW2 (@Fillchar)     (December p. 31, Framework II)
  451.  
  452. Program to fill a region with a range of ASCII characters.
  453.  
  454. To call Fillchar, use the following general syntax:
  455.  
  456.      @Fillchar(asc_code, inc, region)
  457.  
  458. The parameter asc_code is the ASCII decimal code that you want to start
  459. with, inc (increment) is numeric, and region is standard region reference.
  460. For example,
  461.  
  462.      @Fillchar(65, 1, Test.Cabinet)
  463.                ^------- ASCII code for letter A
  464.  
  465. See also, Filldate.
  466.  
  467. *** FILLDATE.FW2
  468. Filldate.FW2 (@Filldate)     (December p. 29, Framework II)
  469.  
  470. Program to fill a region with a range of dates.
  471.  
  472. To call Filldate, use the following general syntax:
  473.  
  474.      @Filldate(month, day, year, inc, region)
  475.  
  476. Pass the parameters month, day, year, and inc (increment) as numerics.
  477. Pass the region parameter as a standard region reference.  For example,
  478.  
  479.      @Filldate(12, 1, 1986, 1, Test.A1:Test.A31)
  480.  
  481. See also, @Fillchar.
  482. *** FW_2_DIF.FW2
  483. Fw_2_dif.FW2        (September p. 16, Framework II)
  484.  
  485. This program converts a Framework II spreadsheet into a DIF file format.
  486. It is to be included as an Add-in to the Disk:Export submenu.
  487.  
  488. Files Needed:  Fw_2_dif.FW2
  489.  
  490. Through the Framework II Setup program, add this routine to the
  491. Dis:Export:Add-in submenu.  For instructions on how to do this, refer to
  492. "Add-ins for Converting Other Formats," on page 10-19 of the Using
  493. Framework II manual.  Once the program is included as an Export Add-in,
  494. highlight the spreadsheet frame to export, and execute the program from
  495. the Disk:Export submenu.  The resultant file will have a .DIF extension.
  496. *** GO_RECNO.FW2
  497. Go_recno.FW2 (Alt-G)      (October p. 40, Framework II)
  498.  
  499. Simulates a "GOTO Record Number" command.
  500.  
  501. From inside a database frame, press Alt-G.  You'll be prompted for the
  502. record number/row number.  The macro will calculate the shortest route to
  503. the specified row and will move the cursor to that position.
  504. *** HEX.FW2
  505. Hex.FW2  (@Hex)          (April p. 37, Framework II)
  506.  
  507. Calculates the hexadecimal value of a decimal number.
  508.  
  509.      @Hex( n )  where n is a decimal number.
  510.  
  511. The formula will return the hexadecimal value of n.
  512. *** KEYSET.FW2
  513. Keyset.FW2 (Alt-J)        (October p. 38, Framework II)
  514.  
  515. This macro allows you to define the length of an input string and a set of
  516. acceptable keys.  Keyset uses two variables:
  517.  
  518.    key_count ::= length of input string
  519.    key_mask  ::= acceptable characters
  520.  
  521. From within a frame, press Alt-J to execute and Esc to exit.
  522. *** LABELPGM.FW2
  523. Labelpgm.FW2        (March p. 14, Framework II)
  524.  
  525. This program automates the process of selecting a label-printing template
  526. and of printing mailing labels.
  527.  
  528. Files Needed:  Labelpgm.FW2
  529.  
  530. Load Labelpgm and your database frame to the desktop.  Highlight Labelpgm
  531. and press RECALC (F5) to initialize the macros.  Press Alt-L to begin.  You
  532. will be asked to supply:
  533.  
  534.      * Height of label in lines (# should be at least 1 more than
  535.        the actual # of lines you wish to print)
  536.      * Width of label in characters
  537.      * Number of labels across
  538.      * Name of database frame
  539.  
  540. After the label frame is created, the cursor is placed in the frame so
  541. that you can enter the field names within <>.  When you finish, press
  542. Alt-C.  The frame will be copied across, all the print attributes set, and
  543. the labels printed.
  544. *** NAMED_RA.FW2
  545. Named_Ra.FW2 (Alt-P)      (July p. 45, Framework II)
  546.  
  547. Macro to name of range of cells in a spreadsheet for referencing.
  548.  
  549. Within a spreadsheet frame, press Alt-P.  Use cursor pointing to select the
  550. range of cells to be named.  Supply the name for this range when prompted.
  551. Use the name in place of a region reference in formulas in your
  552. spreadsheet.
  553. *** PFS2FW2.FW2
  554. Pfs2fw2.FW2         (March p. 36, Framework II)
  555.  
  556. This program transfers data from a pfs:file to Framework II.  However,
  557. because Framework II cannot import a pfs:file directly, you need to create
  558. a pfs print file.  And, a pfs print file places all blank fields at the end
  559. of the file; so, you'll need to place data in all the blank fields so that
  560. they are placed correctly in the print file.
  561.  
  562. From pfs:file: Make sure each field is no longer than one line.  Add a
  563. dummy value to all blank fields (a lowercase x, for example).  Select print
  564. from the pfs:file main menu, enter a "NO" for printing item names, and
  565. enter a filename for the print file.  Make the number of lines per page
  566. equal to the number of fields in the file and set the number of copies to
  567. one.  On the print spec menu, enter an x for every field.
  568.  
  569. From Framework II: Import the pfs print file as an ASCII text file.
  570. Create a database frame with the same number of fields and records (or
  571. more).  Label the database frame Db, name the first field First and the
  572. last field Last.  Load Pfs to the desktop and press RECALC (F5).  When
  573. prompted, highlight the ASCII text file, press Dnlevel, and then Alt-T.
  574. Make any changes and save the new database file.
  575. *** PICTURE.FW2
  576. Picture.FW2 (@Picture)       (October p. 21, Framework II)
  577.  
  578. Simulates the dBASE PICTURE clause.
  579.  
  580.      @Picture( <format>, <lower limit>, <upper limit> )
  581.  
  582. The format parameter defines the maximum length and data type of the
  583. spreadsheet or database cell input.  The number of characters in the format
  584. determines the number of input digits accepted.  Use "9" for numeric data
  585. amd "X" for character data.  Any other character you use in the format
  586. parameter displays as a literal and is considered part of the data.  The
  587. lower limit and upper limit parameters are used with numeric data to
  588. define a continuous range.
  589.  
  590. Picture is called by your data-entry program.  It assumes that the cursor
  591. is in a cell into which you wish to enter data. (If it is numeric data, it
  592. assumes you are in EDIT FORMULA.) Execute Picture to accept and format the
  593. data.  Navigate to the next cell and call Picture again.  The sample
  594. programs, Database.FW2 and Sheet.FW2, demonstrate how to use Picture with
  595. databases and spreadsheets.
  596. *** PROMPTCE.FW2
  597. Promptce.FW2 (@Promptcenter)      (September p. 39, Framework II)
  598.  
  599. Erases the prompt area and places centered message.
  600.  
  601.      @Promptcenter( "Message goes here..." )
  602.  
  603. When executed, the prompt area erases and the specified character string
  604. is placed as a centered message.  It includes an error-checking routine so
  605. that you'll see an error message if you fail to include the parameter
  606. ("message"), if the message is not a character string, or if the message
  607. is longer than 80 characters.  You can style the message with bold or
  608. italics if it is a literal string.
  609. *** REPLACE.FW2
  610. Replace.FW2         (November p. 43, Framework II)
  611.  
  612. This macro was developed because sometimes you may want to search and
  613. replace data only within highlighted text in a word frame.  Framework II
  614. supports search and replace of selected regions in spreadsheets and
  615. databases frames but not in word frames.  When you execute Replace, it
  616. prompts you for the search string and the replacement string.
  617.  
  618. Files Needed:  Replace.FW2
  619.  
  620. To set up the program move Replace.FW2 to the Macros section of your
  621. Library and name it with the appropriate Alt-<key> combination.  To
  622. execute Replace, highlight the block of text you want to search and
  623. replace within and press Alt-<key>.
  624. *** RUNDBASE.FW2
  625. Rundbase.FW2        (March p. 27, Framework II)
  626.  
  627. This program allows Framework II users with hard-disk systems to run dBASE
  628. from the APPS menu even though dBASE resides in a subdirectory.  It also
  629. eliminates the need for the output frame, which is created by the Rundbase
  630. provided with Framework II.  Instead, a local variable is created for use
  631. with the @run command.
  632.  
  633. Note: If you wish to run dBASE from within Framework II, we recommend that
  634. you have at least 640K of RAM in your machine.
  635.  
  636. Files Needed:  Rundbase.FW2
  637.  
  638. Copy this program to your Framework II subdirectory.  This program assumes
  639. that your copy of dBASE resides in a \DBASE subdirectory of your root
  640. directory on the C: drive.  If it resides elsewhere or the directory has a
  641. different name or drive specifier, modify this program appropriately.  When
  642. you exit dBASE, you will be returned to your desktop and current
  643. directory.
  644. *** SPACING.FW2
  645. Spacing.FW2 (Alt-S)       (October p. 43, Framework II)
  646.  
  647. Allows user-defined variable line spacing within a document.
  648.  
  649. The program uses a spacing flag within your document so you'll need to set
  650. up your word frame with spacing flags before you invoke the macro.  The
  651. spacing flag used by the program is .SP followed by the number of the
  652. desired lined spacing (that is, .SP 1, .SP 2, or .SP 3).  This flag should
  653. be placed in the left margin before each line where you wish the spacing
  654. to change.
  655.  
  656. Press Alt-S to reformat the document.  You can reformat the frame manually
  657. or reset the spacing flags and re-invoke the macro.
  658. *** SYM2FW2.FW2
  659. Sym2fw2.FW2         (July p. 26, Framework II)
  660.  
  661. This program allows you to transfer data from Symphony to Framework II.
  662. You'll need to be familiar with the differences between FRED and Symphony
  663. formulas.  You'll have to edit some of the formulas after the data is
  664. transferred because some of the functions are different and some work
  665. differently.  And, all formatting, column widths, and label alignment will
  666. be lost in the translation process and will have to be set up again in
  667. Framework II.  Any repeat key cells (\) in Symphony will not repeat in
  668. Framework II; use @rept or type in the repeated information.
  669.  
  670. Files Needed:  Sym2fw2.FW2
  671.  
  672. From Symphony: Create a print file from your Symphony spreadsheet with
  673. these settings:
  674.  
  675. F10 Range Name Reset Yes
  676. F10 Range Name Create Translate <Return>
  677. (highlight range to be transferred) <Return>
  678. F10 Range Label-Alignment Left Translate <Return>
  679. F10 Format Reset Translate <Return>
  680. F9 Print Settings
  681. Source Range Translate <Return>
  682. Destination File Tempfile <Return>
  683. Other Attributes No
  684. Page Breaks No
  685. Margins No-margins
  686. Other Format Cell-formulas
  687. Quit
  688. Align
  689. Go
  690.  
  691. From Framework II: Load Sym2fw2 to the desktop.  Load Tempfile to the
  692. desktop and rename it Symphony.  Create a spreadsheet frame with as many
  693. rows and columns as in the Symphony (Tempfile) file and name it Frame.
  694. SIZE (F4) and DRAG (F3) both frames, Symphony and Frame, so that they are
  695. visible on the desktop.  Highlight the Sym_to_F frame and press RECALC
  696. (F5).  Press Alt-G.  Check the data and formulas and edit them if necessary.
  697. *** TABSTOP.FW2
  698. Tabstop.FW2         (March p. 18, Framework II)
  699.  
  700. This program allows you to create variable tab stops in a word frame by
  701. redefining the Tab key with @keyfilter.
  702.  
  703. Files Needed:  Tabstop.FW2
  704.  
  705. Load Tabstop onto the desktop and press RECALC (F5).  Press Alt-S and enter
  706. your new tab stop values (up to ten different tabs) by specifying the
  707. column numbers.  To redefine your tab stops, press Alt-S.  To return to
  708. normal Framework II tab operation, press Alt-Q.
  709. Note: Resetting the line width may require manual reformatting.
  710. *** TABSTRIP.FW2
  711. Tabstrip.FW2        (January p. 34, Framework II)
  712.  
  713. This program removes tab characters from word frames by retrieving the
  714. current tab size and replacing the tab characters with the same number of
  715. spaces.
  716.  
  717. Files Needed:  Tabstrip.FW2
  718.  
  719. Load Tabstrip onto the desktop and press RECALC (F5).  You are prompted to
  720. highlight a word frame (you can load one onto the desktop at this time).
  721. Then, press Alt-S.  When the tabs are stripped, you'll be returned to the
  722. desktop.
  723. *** TCMBUILD.FW2
  724. Tcmbuild.FW2        (November p. 28, Framework II)
  725.  
  726. This program creates and formats a spreadsheet called TCM Report that
  727. contains your .TCM file definitions.  This program allows to view your
  728. .TCM file settings without having to navigate through the various
  729. Telecommunications menus.  Once this TCM Report spreadsheet is built, you
  730. can print it with a simple print macro called Prtrepo.FW2.
  731.  
  732. Files Needed:  Tcmbuild.FW2, Prtrepo.FW2
  733.  
  734. To set up this program, move the file Prtrepo.FW2 to the Library, naming
  735. it with an Alt-<key> combination.  Then, load Tcmbuild.FW2 to the desktop.
  736. To build the TCM Report spreadsheet, highlight Tcmbuild.FW2 and press F5.
  737. To print the report, press Alt-<key>.
  738. *** TCM_DIAL.FW2
  739. Tcm_dial.FW2        (December p. 32, Framework II)
  740.  
  741. This program can help you keep track of all your bulletin board listings
  742. and provide you with the same kind of fast-and-easy access available
  743. through Framework II's Telecommunications menu.  There are two programs:
  744. Tcm_dial.FW2 and Update.FW2.  Tcm_dial.FW2 automates the dialup process
  745. and Update.FW2 records the access date and time.  It uses a macro already
  746. furnished by Framework II, Alt-F4 (time).  Use this macro after you have
  747. logged off a bulletin board.
  748.  
  749. Files Needed:  Tcm_dial.FW2, Update.FW2
  750.  
  751. To use this program, first create a Framework II database named RBBS with
  752. the following fields:
  753.  
  754. Field              Description
  755. Bulletin Board     RBBS/Information service
  756. City               City where RBBS is located
  757. State              State where RBBS is located
  758. Phone              Access phone number
  759. Sysop              System operator's name
  760. Board              RBBS Software
  761. TCM File           .TCM filename
  762. Last Access        Date of last logoff
  763. Log Off            Time of logoff
  764. Days Since         Number of days since last logoff
  765.  
  766. In the formula area of Days Since, enter the following code:
  767.  
  768.      @set(Days Since,
  769.       @list(
  770.          @if(@iserr(@sumdate(Last Access,1)),
  771.              "No access",
  772.              @diffdate(@datetime(@date,@time),Last Access)
  773.          )
  774.        )
  775.       )
  776.  
  777. To use this program, assign the Tcm_dial.FW2 and Update.FW2 any Alt-<key>
  778. you want.  Then, position the cursor on the row (in the database) that
  779. corresponds to the name of the service you want to access and press
  780. Alt-<key>.  Once you have logged off the bulletin board, press Alt-<key>
  781. to initiate the Update macro.
  782. *** WORDCHEC.FW2
  783. Wordchec.FW2 (Alt-X)      (July p. 48, Framework II)
  784.  
  785. Macro to check spelling of single or phrase from edit line.
  786.  
  787. From the desktop, press Alt-X.  You'll be prompted to type a word or phrase
  788. on the edit line.  The program will execute Ctrl-A S B to begin the normal
  789. Framework II spelling check.  You can use all the Framework II spelling
  790. check features to get suggestions or to edit the text.  After the spelling
  791. check, press a key to return to your work.
  792. *** WORDTRAP.FW2
  793. Wordtrap.FW2 (Alt-Z)      (December p. 45, Framework II)
  794.  
  795. This macro was developed to work around the limitations of the @t command,
  796. which only traps for one character.  It can be called from your telecomm
  797. macro to wait for a given string before proceeding, such as "tion:".
  798.  
  799. To use the macro, change the value of target to equal the string you want
  800. to trap.  Currently, trap := "tion".
  801. *** WRAPCELL.FW2
  802. Wrapcell.FW2        (November p. 44, Framework II)
  803.  
  804. This macro word wraps long spreadsheet labels within the column width.  It
  805. works much like 1-2-3's /Range Justify command, which word wraps long
  806. spreadsheet cell labels.
  807.  
  808. To set up Wrap_cell.FW2, move it to the Macros section of your Library and
  809. name it with the appropriate Alt-<key> combination.
  810.  
  811. Before executing Wrap_cell, follow these guidelines:
  812.  
  813. 1. Select Locate:Allow Editing from the frame border of the spreadsheet to
  814.    make sure that there are no protected cells in the spreadsheet.
  815. 2. Construct your spreadsheet from the left to right and top to bottom.
  816.    This will prevent overwriting existing labels and formulas.
  817. 3. As you work on each column for the first time, size it appropriately so
  818.    that when you wrap long labels you will get the correct wrapping margin.
  819.  
  820. To execute the macro, highlight the spreadsheet cell that has the long
  821. label and press the Alt-<key> for Wrap_cell.
  822. *** AGE.PRG
  823. Age.PRG             (November p. 8, dBASE III PLUS)
  824.  
  825. Age.PRG accepts a date passed to it and calculates and displays the
  826. person's age from the current date in the format: "x years old" where x is
  827. the calculated age.
  828.  
  829. Files Needed:  Age.PRG
  830.  
  831. To execute the program, use the following general syntax:
  832.  
  833.      DO Age WITH <birth date>
  834. *** AMORTIZE.PRG
  835. Amortize.PRG        (December p. 36, dBASE III PLUS)
  836.  
  837. This program (Amortize.PRG and Schedule.PRG) uses dBASE Tools for C to
  838. calculate and print an amortization schedule based on the following input
  839. values:
  840.  
  841.    * principal (initial amount of loan)
  842.    * rate of interest per year
  843.    * periods (number of payments per year)
  844.    * payment made already
  845.    * years of loan (from start)
  846.  
  847. Files Needed: Amortize.PRG, Schedule.PRG
  848.  
  849. Before running these programs, be sure to read your dBASE Tools for C
  850. documention.  To execute the program, type DO Amortize.
  851. *** AMPM.PRG
  852. Ampm.PRG            (November p. 6, dBASE III PLUS)
  853.  
  854. The program displays the time in the more familiar twelve-hour format.
  855. Ampm.PRG uses the SUBSTR() function to separate the hours and minutes from
  856. the time string you pass.  These elements are then converted to the
  857. twelve-hour format.
  858.  
  859. Files Needed:  Ampm.PRG
  860.  
  861. To execute Ampm, use the following general syntax after initializing a
  862. return variable.
  863.  
  864.      ret_val = ""
  865.      DO Ampm WITH <time string>, ret_val
  866. *** AUTOLOCK.PRG
  867. Autolock.PRG        (August p. 25, dBASE III PLUS Administrator)
  868.  
  869. This program provides a mechanism for automatic record locking when
  870. EDITing records.  It uses two command files: Autolock.PRG and Autoerr.PRG.
  871. When invoked, it places the record pointer at the beginning-of-file or the
  872. first record matching the search key, and then allows you to EDIT it.
  873. When in the EDIT mode, you can page between screen pages and records as
  874. you would normally.  If a record is locked, Autoerr displays an
  875. appropriate message.
  876.  
  877. Files Needed:  Autolock.PRG, Autoerr.PRG
  878.  
  879. To run the program, use the following syntax:
  880.  
  881.      DO Autolock WITH "<database file>", "<index file list>",;
  882.                       "[<format file>]", "[<filter condition>]",;
  883.                       "[<search key>]"
  884.  
  885. All PARAMETERS except for the database and index files are optional as
  886. indicate by the square brackets, [].  If you omit a PARAMETER, send a null
  887. string in its place.  For example, the following syntax is typical for a
  888. database and format file:
  889.  
  890.      DO Autolock WITH "Clients", "Cl-1", "Invoice","",""
  891.  
  892. Additionally, Autolock assumes that index keys are character type.  To
  893. exit the program, press Esc or Ctrl-End.
  894. *** CLONER.PRG
  895. Cloner.PRG          (December p. 41, dBASE III PLUS)
  896.  
  897. Cloner.PRG is a program that speeds up the process of COPYing REPORT FORM
  898. files several times.  Each new REPORT FORM is given a unique filename.
  899. Once the file is copied, you are placed in MODIFY REPORT so that you can
  900. make changes to the copy.
  901.  
  902. Files Needed: Cloner.PRG
  903.  
  904. To use the program, type DO Cloner.
  905. *** COLOR.PRG
  906. Color.PRG           (March p. 12, dBASE III PLUS)
  907.  
  908. Color.PRG is a menu-driven program that allows you to define color for
  909. the screen border, SAYs, and GETs.  You can use Color.PRG as a stand-alone
  910. program or you can integrate it into applications, either for interactive
  911. color definitions or installations.  When you run it, a menu of color
  912. choices displays followed by three input boxes that define the colors for
  913. SAYs, GETs and the screen border.
  914.  
  915. Files Needed:  Color.PRG
  916.  
  917. From the dot prompt or from a command file type, DO Color.
  918. *** CPDELIM.PRG
  919. Cpdelim.PRG         (May p. 28, dBASE III PLUS)
  920.  
  921. This program creates a comma separated file without delimiters.  The
  922. resultant text file is in the following form:
  923.  
  924. Field1,Field2,12,.T.
  925.  
  926. Cpdelim.PRG accepts four parameters: a database filename ("dbf"), an index
  927. filename ("ndx"), a filter condition ("condition"), and an output filename
  928. ("txtfile").
  929.  
  930. Files Needed:  Cpdelim.PRG
  931.  
  932. To run this program, type the following command line in a program file or
  933. at the dot prompt:
  934.  
  935. DO Cpdelim WITH "<database filename>", "<index filename>", ;
  936.                 "<filter condition>", "<output filename>"
  937.  
  938. The output file will have a .TXT extension.
  939. *** DATEAVG.PRG
  940. Dateavg.PRG         (November p. 7, dBASE III PLUS)
  941.  
  942. This program returns the average date from a specified date field that you
  943. pass as a parameter.
  944.  
  945. Files Needed:  Dateavg.PRG
  946.  
  947. To execute the program, use the following syntax:
  948.  
  949.      ret_val = CTOD("01/01/01")
  950.      DO Dateavg WITH "<date field to average>", ret_val
  951. *** DAY.PRG
  952. Day.PRG             (November p. 7, dBASE III PLUS)
  953.  
  954. This program converts a date variable to a character string in the
  955. following format: "Friday, November 1st, 1986."
  956.  
  957. Files Needed:  Day.PRG
  958.  
  959. To execute the program, use the following general syntax after initializing
  960. a return variable.
  961.  
  962.      ret_val = ""
  963.      DO Day WITH <date>, ret_val
  964. *** ENCRYPT.PRG
  965. Encrypt.PRG         (February p. 31, dBASE III)
  966.  
  967. Encrypt.PRG encrypts either character or numeric data in a database by
  968. adding the ASCII value of the first character to the ASCII values of the
  969. second and succeeding characters.  Once the encryption process is done,
  970. you can REPLACE the original field with its new encrypted value.  The
  971. program accepts four parameters: "mvar," "width," "decimal," and "outvar."
  972. "mvar" is the data to encrypt, "width" is the length of "mvar," "decimals"
  973. is the number of decimals (0 decimals for character data), and "outvar" is
  974. the variable that will receive the encrypted data.
  975.  
  976. To interpret the encrypted data, use the companion program, Decrypt.PRG.
  977. Decrypt subtracts the ASCII value of the first character from the second
  978. and succeeding characters.  The program accepts three parameters: "mvar,"
  979. "mtype," and  "outvar."  "mvar" is the character string to decrypt,
  980. "mtype" defines whether the "mvar" is character or numeric, and "outvar"
  981. contains the decrypted data string.
  982.  
  983. Files Needed:  Encrypt.PRG, Decrypt.PRG
  984.  
  985. To use Encrypt.PRG, first store the field contents to "mvar" and define
  986. the two variables "width" and "decimals."  When the program is finished,
  987. "outvar" contains the encrypted data.
  988.  
  989. Similarly, to use Decrypt.PRG, first store the encrypted data to "mvar"
  990. and the data type (N for numeric and C for character) to "mtype." 
  991. *** FDATE.PRG
  992. Fdate.PRG           (November p. 3, dBASE III PLUS)
  993.  
  994. This program is a general date-formatting procedure.  It accepts two
  995. parameters: a date variable to format and a numeric code designating the
  996. format desired.  Fdate returns a character variable containing the
  997. formatted date string.  The following is a list of format options.  Use
  998. the position in the list as the format-code parameter when you DO Fdate.
  999.  
  1000.    1. Mon DD, YYY
  1001.    2. Mon YYYY
  1002.    3. Mon DD, YYYY
  1003.    4. Month DD, YYYY
  1004.    5. DD-Mon-YYYY
  1005.  
  1006. Files Needed:  Fdate.PRG
  1007.  
  1008. To run the program, use the following syntax:
  1009.  
  1010.      <return variable> = ""
  1011.      DO Fdate WITH <date variable>, <format code>, <return variable>
  1012. *** LIST.PRG
  1013. List.PRG            (May p. 24, dBASE III PLUS)
  1014.  
  1015. List.PRG is a sample program that demonstrates how you can use the
  1016. assembly language program, Screen.BIN, to execute a Shift-PrtSc.  It does
  1017. not disable the normal use of Shift-PrtSc, but rather allows you to
  1018. include the function of Shift-PrtSc as a menu option within your dBASE III
  1019. PLUS application.
  1020.  
  1021. Files Needed:  List.PRG, Screen.BIN
  1022.  
  1023. To use Screen.BIN as a stand-alone program, first LOAD it into dBASE III
  1024. PLUS, then CALL it as necessary.  To run List.PRG, copy Tours.DBF and
  1025. Tours.DBT from the Sample Programs and Utilities Disk to the directory
  1026. that contains Screen.BIN and List.PRG.  Then, from the dot prompt type,
  1027.  
  1028.      DO List
  1029. *** LISTFORM.PRG
  1030. Listform.PRG        (April p. 22, dBASE III PLUS)
  1031.  
  1032. Listform prints a vertical list of a database file; that is, fields print
  1033. underneath one another.  The program keeps track of the line count and
  1034. ejects to a new page when appropriate.  The default page length is 64,
  1035. though you can change this value by changing the variable, pglength.  It
  1036. also prints a heading at the top of each page.  Listform calls two other
  1037. programs: Wrap.PRG which performs word-wrapping for long character fields
  1038. and Newpage.PRG which prints a heading at the top of each page.
  1039.  
  1040. If you use the SET FIELDS command or use a view, Listform still prints all
  1041. the fields from the current database file because the FIELDS() function
  1042. (which is used in Listform.PRG) does not support the fields list specified
  1043. by SET FIELDS or SET VIEW TO.
  1044.  
  1045. Files Needed:  Listform.PRG, Wrap.PRG, Newpage.PRG
  1046.  
  1047. Open a database file and type,
  1048.  
  1049.      DO Listform
  1050. *** LISTHIST.PRG
  1051. Listhist.PRG        (February p. 8, dBASE III PLUS)
  1052.  
  1053. Listhist.PRG will LIST HISTORY to a .PRG file that can be edited into a
  1054. workable command file.  This allows you to use LIST HISTORY as a
  1055. prototyping tool to develop and test dBASE III PLUS commands.  Once the
  1056. commands are working from the dot prompt, you can send them to a command
  1057. file using Listhist.
  1058.  
  1059. Files Needed:  Listhist.PRG
  1060.  
  1061. From the dot prompt type, DO Listhist.  Listhist will prompt you to enter
  1062. a name for the HISTORY file.
  1063. *** MAILMERG.PRG
  1064. Mailmerg.PRG        (September p. 6, dBASE III PLUS)
  1065.  
  1066. This program merges data from a database file into a one-page form letter.
  1067. Multi-paged form letters are not supported.  You embed the field names
  1068. within the form letter and the mailmerge program inserts the data into the
  1069. letter, trimming trailing blanks and formatting the text according to the
  1070. margins specified.  Mailmerg.PRG is the main program and it calls a
  1071. procedure file that contains three procedures:  Merge.PRG, Wordwrap.PRG,
  1072. and Checker.PRG.  Merge merges one record from the database file with the
  1073. text of the form letter.  Wordwrap does word-wrapping on long character
  1074. strings, and Checker verifies that the field names cited in your form
  1075. letter are spelled and delimited correctly.
  1076.  
  1077. Files Needed:  Mailmerg.PRG, Mergproc.PRG
  1078.  
  1079. To use the program, modify Mailmerg.PRG and replace <YourDatabase> with
  1080. the name of your database file and <YourLetter> with the name of the form
  1081. letter.  The form letter is a standard ASCII text file with the field
  1082. names embedded within the text.  To create this form letter, use the
  1083. following parameters:
  1084.  
  1085. 1. Use the backslash symbol (\) in column 1 of each line in a list of
  1086.    items, such as an address.  The backslash symbol tells the program to
  1087.    print on a new line, thus, preventing word-wrap.  For example:
  1088.  
  1089.      \John Doe
  1090.      \123 Anywhere Dr.
  1091.      \Culver City, CA  90230
  1092.  
  1093. 2. Field names must be delimited with either of the accepted field
  1094.    delimiters: angle <> or square [] brackets.  Use the angle brackets to
  1095.    delimit field names that always print, such as the city or state in an
  1096.    address.  Use the square brackets to indicate the field is optional; 
  1097.    that is, the field may or may not have data in it.  If an optional
  1098.    field contains no data, a blank line does not print.  For example:
  1099.  
  1100.      \<Company>
  1101.      \<Address1>
  1102.      \[Address2]  <----------this field is optional
  1103.      \<City>, <State>  <Zip>
  1104.  
  1105. These symbols, [] and <>, are reserved as field delimiters only and cannot
  1106. be used within the text of your letter.
  1107.  
  1108. 3. If you want blank spaces to follow a field marked as optional, embed
  1109.    the blank spaces within the brackets instead of outside of the 
  1110.    brackets:
  1111.  
  1112.      [Name   ]xxx  instead of
  1113.      [Name]   xxx
  1114.  
  1115. For fields delimited with angle brackets, place the blank spaces outside
  1116. the delimiters:
  1117.  
  1118.      <Name>   xxx  instead of
  1119.      <Name   >xxx
  1120. *** MAINRANG.PRG
  1121. Mainrang.PRG        (August p. 30, dBASE III PLUS)
  1122.  
  1123. Datefind moves the record pointer to the first date in a range (specified
  1124. by the starting and ending dates provided by Mainrang.PRG), if the date
  1125. exists.  If the date range is outside the boundaries of the dates stored in
  1126. the database file, the program stops.
  1127.  
  1128. Files Needed:  Datefind.PRG, Mainrang.PRG
  1129.  
  1130. To use Mainrang.PRG and Datefind.PRG, first create an index file by
  1131. INDEXing ON the character conversion of the date field in the format
  1132. "YYYYMMDD." For example,
  1133.  
  1134. INDEX ON STR(YEAR(<Date_field>),4) + SUBSTR(DTOC(<Date_field>),1,2) +;
  1135.          SUBSTR(DTOC(<Date_field>),4,2) TO <Yourindx>
  1136.  
  1137. where <Date_field> is the name of the date field in your database file.
  1138.  
  1139. Edit Mainrang.PRG and replace Yourfile with the filename of the database
  1140. file to be searched, Yourindx with the index filename, and Date_field with
  1141. the name of the date field to be searched.  To start the program, type DO
  1142. Mainrang.
  1143. *** MEMOSLIM.PRG
  1144. Memoslim.PRG        (September p. 32, dBASE III PLUS)
  1145. This program reduces the size of memo files (.DBT).  It uses two command
  1146. files: Memoslim.PRG and Memotrim.PRG.  Memoslim is a front-end program
  1147. that prompts you for the name of your database, checks for the existence
  1148. of the .DBF and .DBT file, and then executes Memotrim, which actually
  1149. reduces the size of the memo file.  When the program is finished, it
  1150. displays the total number of bytes recovered and prompts you for the name
  1151. of another database file.
  1152.  
  1153. Files Needed:  Memoslim.PRG, Memotrim.PRG, Getfile.DBF
  1154.  
  1155. To set up the program, first CREATE a database file called Getfile.DBF with
  1156. the following structure:
  1157.  
  1158. Structure of Getfile.DBF
  1159. Field   Field Name     Type        Width   Dec
  1160.          1   Line           Character      80
  1161.  
  1162. To run, type DO Memoslim.
  1163.  
  1164. You can run the reduction routine, Memotrim.PRG, as a stand-alone program
  1165. or procedure.  To do this, use the following command line in your command
  1166. files or from the dot prompt:
  1167.  
  1168.      DO Memotrim WITH "< database filename>"
  1169. *** MODSTRUC.PRG
  1170. Modstruc.PRG        (January p. 10, dBASE II)
  1171.  
  1172. Modstruc.PRG uses the  COPY STRUCTURE EXTENDED and CREATE FROM commands
  1173. with the COPY TO <filename> DELIMITED and APPEND FROM <filename> DELIMITED
  1174. commands to allow you to modify the structure of your database file
  1175. without losing the data stored there.
  1176.  
  1177. Files Needed:  Modstruc.PRG
  1178.  
  1179. To use Modstruc.PRG you need approximately as much free space on your disk
  1180. as the size of the file your are modifying.  To execute the program, type
  1181. DO Modstruc.
  1182. *** MULTIRPT.PRG
  1183. Multirpt.PRG        (August p. 27, dBASE III PLUS)
  1184.  
  1185. This custom report form uses the LABEL FORM command to print multiple
  1186. records in columns across the page.  Before DOing this program, replace all
  1187. items delimited with <> with the appropriate filename or value.  When you
  1188. create the LABEL FORM, be sure to include the number of labels across
  1189. because that value determines the number of columns in the report.
  1190.  
  1191. Files Needed:  Multirpt.PRG
  1192.  
  1193. Edit Multirpt.PRG to supply the filenames of your database and LABEL FORM.
  1194. Replace "This is a header" with the text of your header.  You also need to
  1195. supply <number per page> which selects the number of records to be printed
  1196. on each page.  To start the program, type DO Multirpt.
  1197. *** PRGPRINT.PRG
  1198. Prgprint.PRG        (March p. 22, dBASE III)
  1199.  
  1200. This program prints program listings of all the command files in the
  1201. current subdirectory.  There are three basic parts: Prgprint, which is a
  1202. front-end menu and Fileproc, which is a procedure file that contains two
  1203. procedures: Makefile and Fileprt.  Makefile creates a new database file
  1204. from an existing one (Shape.DBF) and then APPENDs the command filenames
  1205. (.PRG) into this new database.  Fileproc is a procedure that extracts the
  1206. filenames from the database and prints the command files to the screen or
  1207. printer.
  1208.  
  1209. Files Needed:  Prgprint.PRG, Fileproc.PRG, Shape.DBF
  1210.  
  1211. To set up Prgprint.PRG, first CREATE a database file called Shape.DBF with
  1212. the following structure:
  1213.  
  1214. Structure of Shape.DBF
  1215. Field   Field Name     Type        Width   Dec
  1216.          1   File           Character       8
  1217.  
  1218. To begin the program, from dBASE III type:  DO Prgprint
  1219. *** RANDOM2.PRG
  1220. Random2.PRG         (January p. 18, dBASE II)
  1221.  
  1222. Random2.PRG generates a random number from the seed value returned by
  1223. Cseed2.PRG.  It accepts two parameters: "seed" and "limit."  "seed" is the
  1224. value generated by Cseed.PRG; and "limit" is the highest random number
  1225. possibility.  Two variables are returned: "random," which contains the
  1226. random number and "seed," which contains a new seed value that can be used
  1227. again.
  1228.  
  1229. In addition to these two main programs, you can also use Winners.PRG to
  1230. select a specified number of winners from a database file, and Eval2.PRG
  1231. to evaluate how reasonable the results from Random2.PRG are.  The program
  1232. Winners.PRG executes the programs Cseed.PRG and Random2.PRG.  Once a
  1233. random number is chosen, it copies the record that corresponds to that
  1234. number to a new file, Winners.DBF.  The evaluation program, Eval2.PRG,
  1235. calls Cseed.PRG once and Random2.PRG 48 times.  For the set of 48 random
  1236. numbers, it calculates the mean and standard deviation.  This process is
  1237. repeated 15 times.  The expected values are displayed; then, the average
  1238. value and the corresponding standard deviation are displayed for each
  1239. cycle.
  1240.  
  1241.  
  1242. Files Needed:  Cseed2.PRG, Random2.PRG
  1243.                 Eval2.PRG     (optional), Winners.PRG   (optional)
  1244.  
  1245. Before running Random2.PRG, first store the upper limit of random number
  1246. possibilities to a numeric memory variable called "limit" and execute the
  1247. program Cseed2.PRG to create a seed value.  You only need to run Cseed.PRG
  1248. once because Random2 returns a new seed value at the end of the program
  1249. that can be used again.
  1250.  
  1251. To use Eval2.PRG, make sure that Random2.PRG and Cseed2.PRG are available.
  1252.  
  1253. Before using Winners.PRG, COPY the STRUCTURE of your database file to
  1254. Test.DBF.  Add one logical field called Used to Test.DBF, then APPEND the
  1255. data FROM your database file.  The winners are stored to a database called
  1256. Winner.DBF.
  1257. *** RANDOM3.PRG
  1258. Random3.PRG         (January p. 20, dBASE III)
  1259.  
  1260. Random3.PRG uses the seed value returned by Cseed3.PRG to generate a
  1261. random number.  It accepts two parameters: "seed" and "limit."  "seed" is
  1262. the value generated by Cseed3.PRG; and "limit" is the highest value
  1263. required.  Two variables are returned: "random," which contains the random
  1264. number and "seed," which contains a new seed value that can be used again.
  1265.  
  1266. In addition to the these two main programs, you can also use Eval3.PRG to
  1267. evaluate the results from Random3.PRG.  Eval3.PRG calls Cseed3.PRG once
  1268. and Random3.PRG 48 times.  For the set of 48 random numbers, it calculates
  1269. the mean and standard deviation.  This process is repeated 15 times.  The
  1270. expected values are displayed; then, the average value and the
  1271. corresponding standard deviation are displayed for each cycle.
  1272.  
  1273. Files Needed:  Cseed3.PRG, Random3.PRG
  1274.                 Eval3.PRG     (optional)
  1275.  
  1276. Before running Random3.PRG, first store the upper limit of random number
  1277. possibilities to the numeric memory variable "limit" and execute
  1278. Cseed3.PRG to create the variable "seed."  You only need to run Cseed3.PRG
  1279. once because Random3 returns a new seed value at the end of the program.
  1280. This value can be used again in Random3.
  1281.  
  1282. To use Eval3.PRG, make sure that Random3 and Cseed3 are available.
  1283. *** REMOVE.PRG
  1284. Remove.PRG          (June p. 34, dBASE III PLUS)
  1285.  
  1286. Use Remove.PRG to eliminate specific characters from a field or memory
  1287. variable.  One of the most useful ways you can apply this program is to
  1288. remove a set of characters from a series of records in a database file.
  1289. Remove.PRG accepts three parameters: the source string ("string"); the
  1290. characters to remove ("remove"); and the return memory variable
  1291. ("result"), which is a blank variable that will contain the new string.
  1292.  
  1293. To run the program, use the following syntax:
  1294.  
  1295.      DO Remove WITH <source string>, <characters to remove>, ;
  1296.                     <return memory variable>
  1297.  
  1298. For example,
  1299.  
  1300. return = ""
  1301. source = "***HELLO"
  1302. DO Remove WITH source, "*", return
  1303.  
  1304. ? return
  1305. Hello
  1306. *** SALES.PRG
  1307. Sales.PRG           (July p. 7, dBASE III PLUS)
  1308.  
  1309. This program demonstrates how to create a custom report to print a two-
  1310. leveled grouped report, with subtotals and a grand totals.  The report
  1311. includes a report heading, page heading, group headings, group footings,
  1312. page footings and report footings.  The supporting file, Pagetop.PRG,
  1313. prints the page and column headings.  You can expand this program to print
  1314. three or more levels, as well as to include statistical functions such as
  1315. means, averages, and standard deviations.
  1316.  
  1317. Files Needed:  Sales.PRG, Pagetop.PRG, Sales.DBF, Sales.NDX
  1318.  
  1319. To use Sales.PRG, first create a database file named Sales.DBF with the
  1320. following structure:
  1321.  
  1322. Structure of Sales.DBF
  1323. Field   Field Name     Type        Width   Dec
  1324.     1   Branch         Character       3
  1325.     2   Salesman       Character       4
  1326.     3   Customer       Character       4
  1327.     4   Product        Character      25
  1328.     5   Amount         Numeric         8    2
  1329.  
  1330. Then, execute the following command to index the file:
  1331.  
  1332.      INDEX ON Branch + Salesman + Customer TO Sales.NDX
  1333. *** SAVESTRU.PRG
  1334. Savestru.PRG        (June p. 23, dBASE III PLUS)
  1335.  
  1336. This program will save the structures of all the database files from the
  1337. current directory to a library file called, Strufile.DBF.  Like a
  1338. STRUCTURE EXTENDED file, Strufile.DBF contains the detailed information
  1339. about each field, such as Field_name, Field_type, Field_len, Field_dec,
  1340. and an extra field, File_name.  From this database you can create other
  1341. files with the same structure.  This program is especially useful if you
  1342. have problems with a file and need to create a new structure.
  1343.  
  1344. Files Needed:  Savestru.PRG, Strufile.DBF, Dbfile.DBF
  1345.  
  1346. To use the program, first create two database files with the following
  1347. names and structures:
  1348.  
  1349. Structure of Strufile.DBF
  1350. Field   Field Name     Type        Width   Dec
  1351.     1   Field_name     Character      10
  1352.     2   Field_type     Character       1
  1353.     3   Field_len      Numeric         3
  1354.     4   Field_dec      Numeric         3
  1355.     5   File_name      Character      12
  1356.  
  1357. Structure of Dbfile.DBF
  1358. Field   Field name     Type        Width   Dec
  1359.     1   Dbfilename     Character      12
  1360.  
  1361. Then, from the dot prompt type,
  1362.  
  1363.      DO Savestru
  1364. *** SCROLL1.PRG
  1365. Scroll1.PRG         (November p. 11, dBASE III PLUS)
  1366.  
  1367. Scroll1.PRG allows you to scroll through time periods beginning with the
  1368. closest period to the system date.  The period begins on the closest
  1369. Monday to the current date and ends on the Friday of the next week.  To
  1370. change the length and the last day of the period, change the initial
  1371. values of the memory variables "period" and "per_end."
  1372.  
  1373. Pressing Esc returns a blank date.  Pressing Return, returns the beginning
  1374. date of the time period you have selected.
  1375.  
  1376. Files Needed:  Scroll1.PRG
  1377.  
  1378. To execute Scroll1.PRG, use the following commands:
  1379.  
  1380.      ret_val = CTOD("  /  /  ")
  1381.      DO Scroll WITH <row>, <col>, ret_val
  1382. *** SCROLL2.PRG
  1383. Scroll2.PRG         (November p. 12, dBASE III PLUS)
  1384.  
  1385. This program allows you to scroll through consecutive days beginning with
  1386. the date you pass in the memory variable, "ret_val."  Pressing Return
  1387. returns the date you selected in the variable "ret_val." Pressing Esc
  1388. returns the seed date.  Subsequent runs of the program uses the last value
  1389. stored in "ret_val" for the seed date.  This allows you to carry forward
  1390. selected dates.
  1391.  
  1392. Files Needed:  Scroll2.PRG
  1393.  
  1394. To execute the program, use the following syntax:
  1395.  
  1396.      ret_val = DATE()
  1397.      DO Scroll2 WITH <row>, <col>, ret_val
  1398. *** VIEW.PRG
  1399. View.PRG            (February p. 12, dBASE III PLUS)
  1400.  
  1401. View.PRG is a program that allows you to press F9 to toggle between the
  1402. BROWSE and EDIT modes.  When you are in EDIT, you can use PgUp and PgDn to
  1403. move within or between records.  In addition, if you have SET FORMAT TO a
  1404. format file, your format screen will appear in place of the standard
  1405. screen.  From either mode, press Esc to exit.
  1406.  
  1407. View.PRG accepts a view filename (.VUE) as its PARAMETER.
  1408.  
  1409. Files Needed:  View.PRG
  1410.  
  1411. To setup View.PRG, first CREATE a VIEW file.  The view can contain a
  1412. number of database and index files, a format file, and a filter.  To
  1413. execute the program, use the following syntax:
  1414.  
  1415.      DO View WITH <filename.VUE>
  1416. *** WEEKDAY1.PRG
  1417. Weekday1.PRG        (November p. 4, dBASE III PLUS)
  1418.  
  1419. This program allows you to select a start date and a number of days and
  1420. will provide the number of working days inclusive.
  1421.  
  1422. To setup the program, first CREATE Holiday.DBF with the following
  1423. structure:
  1424.  
  1425. Structure for database: Holiday.DBF
  1426. Field     Field name    Type        Width
  1427.     1     Holiday       Date           8
  1428.  
  1429. Then, APPEND all the holidays that span the range of dates in which you
  1430. will be working.  This means that if you are working with a span of two
  1431. years, you must APPEND two records for each holiday, one for each year.
  1432.  
  1433. To execute Weekday1, use the following general syntax after initializing a
  1434. return variable for the number of weekdays:
  1435.  
  1436.     ret_val = 0
  1437.     DO Weekday1 WITH <start date>, <number of days>, ret_val
  1438. *** WEEKDAY2.PRG
  1439. Weekday2.PRG        (November p. 5, dBASE III PLUS)
  1440.  
  1441. Weekday2 allows you to specify a starting and ending date and returns the
  1442. number of working days between them.
  1443.  
  1444. To setup Weekday2, first CREATE Holiday.DBF with the following structure:
  1445. Structure for database: Holiday.DBF
  1446. Field     Field name    Type        Width
  1447.     1     Holiday       Date           8
  1448.  
  1449. Then, APPEND all the holidays that span the range of dates in which you
  1450. will be working.  This means that if you are working with a span of two
  1451. years, you must APPEND two records for each holiday, one for each year.
  1452.  
  1453. To execute the program, use the following general syntax after
  1454. initializing a return variable that will store the number of working days
  1455. returned from the routine.
  1456.  
  1457.      ret_val = 0
  1458.      DO Weekday2 WITH <start date>, <end date>, ret_val
  1459.