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

  1. SBP
  2.   ╜   -----------------------------------------
  3.   ╜   STKFO
  4.   ╜   Maintain Countries
  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: │ _ wm99
  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 wm25
  17.  a$  =(a$)
  18.   ía$ "c" p
  19.  ┤ £"stko":frow% 10
  20.   ^ ía$ "m" p
  21.  ┤ £"stko2":frow% 43
  22.   ^
  23.  wl0
  24.   Æ í
  25.  
  26. m0: ╜ Display from first record
  27.   ╔ b:lkey$ Name.COUNTRY
  28.   ╔ `:fkey$ Name.COUNTRY: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,4
  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.  
  53. m22: ╜ Edit record
  54.   ┬"Enter line to be edited","",4,a%,r$,2
  55.   ía% 0 p wm222
  56.  r%  0(r$)
  57.   ír% 
  58. 1 p wm22
  59.   ír% lrec% p wm22
  60.   ╔ £ "r%
  61.  ckey$ Name.COUNTRY
  62.   ö(r% 1) 4 2,4
  63.   íName.COUNTRY ckey$ p wm221
  64.   vs2: ╜ if key has been edited check whether key was in use
  65.  
  66. m221: 
  67.   ┬ms1$,"",1,a%: ía% 0 p wm223
  68.   ╠
  69.   íName.COUNTRY ckey$ p wm222
  70.   íckey$ fkey$ p ╔ `:fkey$ Name.COUNTRY
  71.   íckey$ lkey$ p ╔ b:lkey$ Name.COUNTRY
  72.   vs1: ╜ redisplay screen from ckey$
  73.  
  74. m222:
  75.   ┬ms3$,"",1,a%
  76.   ía% 1 p wm22
  77.  
  78. m223: ╜ Redisplay existing screen
  79.  ckey$ pfkey$
  80.   wm01
  81.  
  82. m23: ╜ Delete record
  83.   ┬"Enter line to be deleted","",4,a%,r$,2
  84.   ía% 0 p wm1
  85.  r%  0(r$)
  86.   ír% 
  87. 1 p wm23
  88.   ír% lrec% p wm23
  89.   ╔ £ "r%
  90.  ckey$ Name.COUNTRY:  vs2
  91.  h4$ "Deleting line " r$
  92.   ┬h4$,"Are you sure?",1,a%:  ía% 0 p wm1
  93.   ╔ £ "r%
  94.   ╔ Ñckey$
  95.   ╔ ╛
  96.   wm0
  97.  
  98. m24: ╜ Next page
  99.   ílkey$ plkey$ p wm1
  100.   ╔ Ñplkey$
  101.   ╔ ▒:ckey$ Name.COUNTRY
  102.   wm01
  103.  
  104. m25: ╜ Prev page
  105.   ífkey$ pfkey$ p wm1
  106.   ╔ Ñpfkey$
  107.   ¢i% 1 qfrow%
  108.   ╔ g
  109.   ▒i%
  110.  ckey$ Name.COUNTRY
  111.   wm01
  112.  
  113. m26: ╜ Exit
  114.   å £
  115.  ret% 1: ä"stkm"
  116.  
  117. m29: ╜ Print
  118.   ╣ Y
  119.   wm1
  120.  
  121. s1: ╜ Displays page of records starting with ckey$
  122.  ╜ Returns first and last keys and number of records for page
  123.   ü £
  124.   ╔ Ñckey$
  125.  pfkey$ Name.COUNTRY
  126.   ¢i% 1 qfrow%
  127.  ═ £ "i%
  128.  íName.COUNTRY lkey$ p ws11
  129.  íi% 
  130. frow% p ╔ ▒
  131.   ▒i%
  132.  
  133. s11: 
  134.  plkey$ Name.COUNTRY
  135.   íi% frow% 1 plrec% frow% ^lrec% i%
  136.   ├
  137.  
  138. s2: ╜ check NOT in use by clients OR stocks
  139.   Ö"clients"
  140.   ú"Country"
  141.   ╔ Ñckey$
  142.   í C("") p ┬"Warning!","Country in use by Clients file",2,a%
  143.   Ö"stocks"
  144.   ú"country"
  145.   ╔ Ñckey$
  146.   í C("") p ┬"Warning!","Country in use by Stocks file",2,a%
  147.   Ö"country"
  148.   ├
  149.  
  150. m99: ╜ Error conditions
  151.   í & 57 p
  152.  ┬"Record already exists with this key","",2,a%
  153.  ym0 
  154.   ^
  155.  ┬ (( &),"Press OK to make another selection",1,a%
  156.  ía% 1 p ym1 
  157.   Æ í
  158.   ym26 
  159.  
  160.  
  161.