home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / pg / pgnode / node1 / datnod.100 < prev    next >
Text File  |  2006-10-19  |  3KB  |  65 lines

  1.           DATNOD.100 (c) 1990
  2.           Copyright by Paul Globman
  3.  
  4.  
  5. DATNOD.BA is BASIC version of DATFIL that only allows the display function,
  6. and accesses data files stored in the Node RAMPAC/Datapac.  This program
  7. requires N-READ.CO to be RAM.
  8.  
  9. The program runs like DATFIL with data files in RAMPAC.  Enter data file name
  10. at the "Enter Filename" prompt, or type "END" to exit to the Model 100 menu.
  11.  
  12. Like DATFIL, the search string is case sensitive.  After each record is
  13. displayed the program stops and waits for input.  Any key to continue search
  14. or "N" to discontinue, as in DATFIL.
  15.  
  16. To link one file to another, use DATFIL to add one final record.  The first
  17. data field (in the last record) must be "//filnam".
  18.  
  19. If the last record contains "//vendor" in the first field, then when DATNOD
  20. finishes searching current file, it will continue the search in VENDOR.DO (also
  21. stored in RAMPAC), using the same search string.  The two data files need not
  22. have the same format or number of fields.
  23.  
  24. Note:
  25. -----
  26. This program does not require RAMDSK.CO and will work with Datapac's using the
  27. option ROM.  It does require N-READ.CO.  The program can be further modified to
  28. bring N-READ into RAM from the Datapac and can be made to create a new DATFIL
  29. data file, of selected data records that match the search string.  There is a
  30. lot of potential for a variety of applications, including mailing lists
  31. and information management, based on large databases (by linking several
  32. smaller files).  I leave the development of such applications to the individual
  33. users.
  34. ------------------------------------------------------------------------------
  35.  
  36. 0 REM DATNOD.100 (C) 1990 BY P.GLOBMAN
  37. 10 MAXFILES=1
  38. 20 CLS:PRINT@45,"Enter Filename: "F$
  39. 30 PRINT@61,"";:LINEINPUT F1$
  40. 40 S$="":IFF1$=""THEN60ELSEF$=F1$
  41. 50 IFINSTR(1,"ENDend",F1$)>0THENMENU
  42. 60 PRINT@85,"";:INPUT"Search string";S$
  43. 70 OPEN"TMP"FOROUTPUTAS1:PRINT#1,F$
  44. 75 PRINT#1,S$:CLOSE:LOADM"N-READ"
  45. 80 OPEN"TMP"FORINPUTAS1:INPUT#1,F$,S$
  46. 85 KILL"TMP.DO":NR=64704:X$=""
  47. 90 CALLNR,1,VARPTR(F$)
  48. 100 GOSUB250:NF=VAL(X$)
  49. 110 FORI=1TONF:GOSUB250:FN$(I)=X$
  50. 120 GOSUB250:PA(I)=VAL(X$):NEXT
  51. 130 FORI=1TONF:GOSUB250
  52. 140 IFPEEK(NR+3)<>1THENBEEP:GOTO20
  53. 150 FD$(I)=X$:NEXT:IFS$=""THEN220
  54. 160 IFLEFT$(FD$(1),2)<>"//"THEN190
  55. 170 F$=RIGHT$(FD$(1),LEN(FD$(1))-2)
  56. 180 GOTO70
  57. 190 FORI=1TONF
  58. 200 IFINSTR(1,FD$(I),S$)<>0THEN220
  59. 210 NEXT:GOTO130
  60. 220 CLS:FORI=1TONF:PRINT@PA(I),FD$(I)
  61. 230 NEXT:PRINT@0,"";:AN$=INPUT$(1)
  62. 240 IFINSTR(1,"Nn",AN$)THEN20ELSE130
  63. 250 CALLNR,2,VARPTR(X$):RETURN
  64.  
  65.