home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxgdb2.zip / G2Hlb.CMD < prev    next >
OS/2 REXX Batch file  |  1997-08-10  |  2KB  |  69 lines

  1. /* rexx */
  2. signal on syntax  name error
  3. signal on halt    name error
  4. signal on failure name error
  5. '@echo off'
  6.  
  7. 'cls'
  8. say
  9. say 'G2Hlb --- Testing REXXGDB2.DLL HTML listbox (select) tag creator function'
  10. say '          (G2HSelect2Listbox)'
  11. say 'Simon Husin (husin@ibm.net)'
  12. say 'Kent, Washington, U.S.A., Dec 1996 - Aug 1997'
  13. say
  14.  
  15. sq1 = 'Select name||'', ''||job from staff'
  16.  
  17. htmlfn = 'G22HTML.HTM'
  18. requestedrows = 10
  19. nullchar      = ''
  20. varcharlen    = ''
  21.  
  22. if rxfuncquery('g2LoadFuncs') then do
  23.    say
  24.    say 'Loading REXXGDB2 Functions...'
  25.    call rxfuncadd 'g2LoadFuncs', 'REXXGDB2', 'g2LoadFuncs'
  26.    say 'Result =' g2LoadFuncs()
  27.    end
  28.  
  29. say
  30. say 'Connecting to SAMPLE database...'
  31. call g2connectshare 'SAMPLE'
  32.  
  33. '@del' htmlfn '1>NUL 2>NUL'
  34.  
  35. say
  36.  
  37. call time 'R'
  38. call          g2h htmlfn, 1, '<form method="post">'
  39. call          g2h htmlfn, 1, '<HR>Default settings<BR>'
  40. call          g2hselect2listbox htmlfn, 1, 'sq1', requestedrows
  41.  
  42. call          g2h htmlfn, 1, '<HR>Showing 5 items in 10-item box<BR>'
  43. call          g2hselect2listbox htmlfn, 1, 'sq1', 5,,, 10,, 'LB2'
  44.  
  45. call          g2h htmlfn, 1, '<HR>Showing 3 multiple selectable in 5-item box<BR>'
  46. call          g2hselect2listbox htmlfn, 1, 'sq1', 3,,, 5, 1, 'LB3'
  47. call          g2h htmlfn, 1, '</form>'
  48. elapse = time('E')
  49.  
  50. '@netscape file:///'htmlfn
  51. /* '@explore -q' htmlfn */
  52.  
  53. say 'Execution time' elapse
  54.  
  55. say
  56. say 'Commiting...'
  57. call g2commit
  58. return 0
  59.  
  60.  
  61.  
  62. error:
  63. say 'Error detected at line' SIGL
  64. return 10
  65.  
  66. syntax:
  67. say 'Syntax error detected at line' SIGL
  68. return 20
  69.