home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / NVDC87.ZIP / TBDBASE.ZIP / ARTICLES.INC next >
Encoding:
Text File  |  1987-07-21  |  1.6 KB  |  58 lines

  1. '*********************************************************************
  2. '        Articles Database Include file for TURBO-BASIC ISAM
  3. '        
  4. ' Dataset reference No:  articles.File
  5. ' Data file name:        articles.DBD
  6. ' Data File length:       268
  7. ' Key File name:         articles.DBI
  8. ' Key length:             4
  9.  
  10. '*********************************************************************
  11.  
  12. defint a-z
  13.  
  14. if articles.File > 0 then goto EndarticlesInc 'skip if already open
  15.   incr LastFileNum
  16.   articles.File = LastFileNum
  17.   articles.RLen =  268
  18.   articles.KLen =  4
  19.  
  20.   call dbCreate(articles.File, FileNo, _
  21.     "articles.DBI", articles.KLen, "articles.DBD", articles.RLen)
  22.  
  23.   if dbStatus = %FileAlreadyCreated then _
  24.     call dbOpen(articles.File, FileNo,      _
  25.       "articles.DBI", articles.KLen, articles.RLen)
  26.  
  27.   if articles.RLen <>  268 then
  28.     print "articles.DBD length is inconsistent with this program."
  29.     end
  30.   elseif articles.KLen <>  4 then
  31.     print "articles.DBI key length is inconsistent with this program."
  32.     end
  33.   end if
  34.  
  35.   field FileNo,_
  36.     4 as articles.Skip$,_
  37.     4 as articles.NUMBER$,_
  38.     18 as articles.TOPIC$,_
  39.     62 as articles.TITLE$,_
  40.     20 as articles.KEYWORD1$,_
  41.     20 as articles.KEYWORD2$,_
  42.     60 as articles.AUTHORS$,_
  43.     40 as articles.JOURNAL$,_
  44.     4 as articles.YEAR$,_
  45.     20 as articles.CITATION$
  46.  
  47.  
  48.   field FileNo,  268 as articles.Buffer$
  49.  
  50.   gosub articlesClear
  51. goto EndarticlesInc:
  52.  
  53. articlesClear:
  54.   lset articles.Buffer$ = string$(  268, " ")
  55. return 'articlesClear
  56.  
  57. EndarticlesInc: 'End of this include file
  58.