home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MSWBASE4.ZIP / TRADING / STKFU.SBP < prev    next >
Encoding:
Text File  |  1989-05-31  |  3.0 KB  |  159 lines

  1. SBP
  2.   ╜   -----------------------------------------
  3.   ╜   STKFU
  4.   ╜   Maintain Currencies
  5.   ╜   Last updated Sep 14, 89
  6.   ╜   -----------------------------------------
  7.  
  8.  ms1$ "Is entry correct?"
  9.  ms2$ "Continue with data entry?"
  10.  ms3$ "Select another line?"
  11.   Γ e: ╜ ON ERROR GOTO m99
  12.  
  13. l0: ╜ Decide which type of form
  14.  a$ "c"
  15.   ┬"Enter choice of form","(c)olor screen-oriented or (m)onochrome report-oriented",4,a%,a$,1
  16.   ía% 0 p wm26
  17.  a$  =(a$)
  18.   ía$ "c" p
  19.  ┤ £"stku":frow% 10
  20.   ^ ía$ "m" p
  21.  ┤ £"stku2":frow% 20
  22.   ^
  23.  wl0
  24.   Æ í
  25.  
  26. m0: ╜ Display from first record
  27.   ╔ b:lkey$ Currency.CURRENCY
  28.   ╔ `:fkey$ Currency.CURRENCY:ckey$ fkey$
  29.  
  30. m01: ╜ Display from ckey$
  31.   vs1
  32.  
  33. m1: ╜ Wait here for a push button to be clicked
  34.  tod$  ( Q,"mmmm dd,yyyy"): ╜ should really be using FORM in SELECT statements
  35.   £: ╧ ▀
  36.   wm1
  37.  
  38. m21: ╜ Enter new record
  39.   ü £
  40.   ╬
  41.   ö2,6
  42.   ┬ms1$,"",1,a%
  43.   ía% 0 p
  44.  ü £
  45.   ^
  46.  ╠
  47.  ┬ms2$,"",1,a%
  48.  ía% 1 p wm21 
  49.   Æ í
  50.   wm0: ╜ Redisplay from first
  51.  
  52. m22: ╜ Edit record
  53.   ┬"Enter line to be edited","",4,a%,r$,2
  54.   ía% 0 p wm222
  55.  r%  0(r$)
  56.   ír% 
  57. 1 p wm22
  58.   ír% lrec% p wm22
  59.   ╔ £ "r%
  60.  ckey$ Currency.CURRENCY
  61.   ö(r% 1) 6 2
  62.   íCurrency.CURRENCY ckey$ p wm221
  63.  fnd% 0:skey$ Currency.CURRENCY
  64.   vs2: ╜ if key has been edited check whether key was in use
  65.   ífnd% 1 p wm222
  66.   ╔ £ "r%:currency.CURRENCY skey$
  67.  
  68. m221: 
  69.   ö(r% 1) 6 3,5
  70.   ┬ms1$,"",1,a%: ía% 0 p wm223
  71.   ╠
  72.   íCurrency.CURRENCY ckey$ p wm222
  73.   íckey$ fkey$ p ╔ `:fkey$ Currency.CURRENCY
  74.   íckey$ pfkey$ p ╔ b:pfkey$ Currency.CURRENCY
  75.   vs1: ╜ redisplay screen from ckey$
  76.  
  77. m222: 
  78.   ┬ms3$,"",1,a%
  79.   ía% 1 p wm22
  80.  
  81. m223:  ╜ Redisplay existing screen
  82.  ckey$ pfkey$
  83.   wm01
  84.  
  85. m23: ╜ Delete record
  86.   ┬"Enter line to be deleted","",4,a%,r$,2
  87.   ía% 0 p wm1
  88.  r%  0(r$)
  89.   ír% 
  90. 1 p wm23
  91.   ír% lrec% p wm23
  92.   ╔ £ "r%
  93.  ckey$ Currency.CURRENCY
  94.   vs2: ╜ checks if in use by stocks
  95.  h4$ "Deleting line " r$
  96.   ┬h4$,"Are you sure?",1,a%:  ía% 0 p wm1
  97.   ╔ £ "r%
  98.   ╔ ╛
  99.   wm0
  100.  
  101. m24: ╜ Next page
  102.   ílkey$ plkey$ p wm1
  103.   ╔ Ñplkey$
  104.   ╔ ▒:ckey$ Currency.CURRENCY
  105.   wm01
  106.  
  107. m25: ╜ Prev page
  108.   ífkey$ pfkey$ p wm1
  109.   ╔ Ñpfkey$
  110.   ¢i% 1 qfrow%
  111.   ╔ g
  112.   ▒i%
  113.  ckey$ Currency.CURRENCY
  114.   wm01
  115.  
  116. m26: ╜ Exit
  117.   å £
  118.  ret% 1: ä"stkm"
  119.  
  120. m29: ╜ Print
  121.   ╣ Y
  122.   wm1
  123.  
  124. s1: ╜ Displays page of records starting with ckey$
  125.  ╜ Returns first and last keys and number of records for page
  126.   ü £
  127.   ╔ Ñckey$
  128.  pfkey$ Currency.CURRENCY
  129.   ¢i% 1 qfrow%
  130.  ═ £ "i%
  131.  íCurrency.CURRENCY lkey$ p ws11
  132.  íi% 
  133. frow% p ╔ ▒
  134.   ▒i%
  135.  
  136. s11: 
  137.  plkey$ Currency.CURRENCY
  138.   íi% frow% 1 plrec% frow% ^lrec% i%
  139.   ├
  140.  
  141. s2: ╜ check NOT in use by stocks
  142.   ┤ Ö"Stocks"
  143.   ú"currency"
  144.   ╔ Ñckey$
  145.   í C("") p ┬"Cannot edit!","Currency in use by Stocks file",2,a%:fnd% 1
  146.   Ö"currency"
  147.   ├
  148.  
  149.  m99 : ╜ Error conditions
  150.   í & 57 p
  151.  ┬"Record already exists with this key","",2,a%
  152.  ym0
  153.   ^
  154.  ┬ (( &),"Press OK to make another selection",1,a%
  155.  ía% 1 p ym1 
  156.   Æ í
  157.   ym26 
  158.  
  159.