home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / database / informix / 1822 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  4.8 KB

  1. Path: sparky!uunet!pipex!demon!salmon.demon.co.uk!neil
  2. Newsgroups: comp.databases.informix
  3. From: neil@salmon.demon.co.uk ("Neil S. Briscoe")
  4. Subject: Why does this not work on one machine?
  5. Date: Fri, 28 Aug 1992 14:32:41 +0000
  6. Message-ID: <9208281432.AA00270@salmon.demon.co.uk>
  7. Sender: usenet@gate.demon.co.uk
  8. Lines: 197
  9.  
  10. I have an appointment entry routine as part of our medical database
  11. and, on the whole, it works fine.  However, there is one section of
  12. code (in an ON KEY clause of the INPUT ARRAY command) that works fine
  13. on two machines and simply does nothing on the other.  It doesn't core
  14. dump, it doesn't crash or hang the machine, simply, nothing happens.
  15. Afterwards, you can use any of the other functions without problems.
  16.  
  17. Here is the section of 4GL code
  18.  
  19.     ON KEY (CONTROL-O)
  20.     DISPLAY FORM sptq_frm_
  21.     CALL short_query("Y", "N")
  22.     CALL make_pat_name()
  23.     CALL disp_patient()
  24.     DISPLAY FORM add_appt_frm_
  25.     DISPLAY diary_.* TO sc_find.*
  26.     CALL disp_instruct()
  27.     EXIT INPUT
  28.  
  29. At the point where this code is called, the form "add_appt_frm_" is on
  30. the screen.  This code calls up a patient enquiry screen, allows a new
  31. patient to be selected and then redisplays the appointment booking
  32. screen.
  33.  
  34. Below I have included the platforms and appropriate code from the .ec
  35. files from each platform.  As can be seen, there are no major
  36. differences other than can be accounted for by the different engine
  37. versions.
  38.  
  39. Here is the code that doesn't work:  Platform: Sun 3/60 SunOS 4.1.1
  40. INFORMIX-4GL Version 4.00.UD3, Standard Engine Version 4.00.UD4
  41.  
  42. $  on key ( control - o );
  43. $  display form sptq_frm_;
  44. status = efcode;
  45.  
  46. {
  47. int fgl_svstk, fgl_nret;
  48. fgl_svstk = mark_stack();
  49. _expcode = 0;
  50. pushquote( "Y" , 1);
  51. pushquote( "N" , 1);
  52. status = _expcode;
  53. fgl_nret = short_query(2);
  54. rest_stack(fgl_svstk);
  55. $input set;
  56. }
  57.  
  58. {
  59. int fgl_svstk, fgl_nret;
  60. fgl_svstk = mark_stack();
  61. _expcode = 0;
  62. status = _expcode;
  63. fgl_nret = make_pat_name(0);
  64. rest_stack(fgl_svstk);
  65. $input set;
  66. }
  67.  
  68. {
  69. int fgl_svstk, fgl_nret;
  70. fgl_svstk = mark_stack();
  71. _expcode = 0;
  72. status = _expcode;
  73. fgl_nret = disp_patient(0);
  74. rest_stack(fgl_svstk);
  75. $input set;
  76. }
  77. $  display form add_appt_frm_;
  78. status = efcode;
  79. $  display $diary_.page_date , $diary_.dow , $diary_.cam_code to sc_find . *;
  80. status = efcode;
  81.  
  82. {
  83. int fgl_svstk, fgl_nret;
  84. fgl_svstk = mark_stack();
  85. _expcode = 0;
  86. status = _expcode;
  87. fgl_nret = disp_instruct(0);
  88. rest_stack(fgl_svstk);
  89. $input set;
  90. }
  91. $  exit input;
  92.  
  93. Here is the code from a Sun 3/280 running SunOS 3.5 (how old?!)
  94. running 4GL 2.10.00B
  95.  
  96. $  on key ( control - o );
  97. $  display form sptq_frm_;
  98. status = efcode;
  99.  
  100. {
  101. int fgl_svstk, fgl_nret;
  102. fgl_svstk = mark_stack();
  103. pushquote("Y", 1);
  104. pushquote("N", 1);
  105. fgl_nret = short_query(2);
  106. rest_stack(fgl_svstk);
  107. }
  108.  
  109. {
  110. int fgl_svstk, fgl_nret;
  111. fgl_svstk = mark_stack();
  112. fgl_nret = make_pat_name(0);
  113. rest_stack(fgl_svstk);
  114. }
  115.  
  116. {
  117. int fgl_svstk, fgl_nret;
  118. fgl_svstk = mark_stack();
  119. fgl_nret = disp_patient(0);
  120. rest_stack(fgl_svstk);
  121. }
  122. $  display form add_appt_frm_;
  123. status = efcode;
  124. $  display $diary_.page_date , $diary_.dow , $diary_.cam_code to sc_find . *;
  125. status = efcode;
  126.  
  127. {
  128. int fgl_svstk, fgl_nret;
  129. fgl_svstk = mark_stack();
  130. fgl_nret = disp_instruct(0);
  131. rest_stack(fgl_svstk);
  132. }
  133. $  exit input;
  134.  
  135. And finally, the code from a Sun Sparc 4/330 running SunOS 4.1.2 with
  136. 4GL version 4.10.UC1 with standard engine 4.10.UC2
  137.  
  138. $  on key ( 15 );
  139. _anyerr = 0;
  140. $  display form sptq_frm_;
  141. status = efcode;
  142.  
  143. {
  144. int fgl_svstk, fgl_nret;
  145. fgl_svstk = mark_stack();
  146. pushquote( "Y" , 1);
  147. pushquote( "N" , 1);
  148. fgl_nret = short_query(2);
  149. rest_stack(fgl_svstk);
  150. _anyerr = 0;
  151. $input set;
  152. }
  153.  
  154. {
  155. int fgl_svstk, fgl_nret;
  156. fgl_svstk = mark_stack();
  157. fgl_nret = make_pat_name(0);
  158. rest_stack(fgl_svstk);
  159. _anyerr = 0;
  160. $input set;
  161. }
  162.  
  163. {
  164. int fgl_svstk, fgl_nret;
  165. fgl_svstk = mark_stack();
  166. fgl_nret = disp_patient(0);
  167. rest_stack(fgl_svstk);
  168. _anyerr = 0;
  169. $input set;
  170. }
  171. $  display form add_appt_frm_;
  172. status = efcode;
  173. $  display $diary_.page_date , $diary_.dow , $diary_.cam_code to sc_find . *;
  174. status = efcode;
  175.  
  176. {
  177. int fgl_svstk, fgl_nret;
  178. fgl_svstk = mark_stack();
  179. fgl_nret = disp_instruct(0);
  180. rest_stack(fgl_svstk);
  181. _anyerr = 0;
  182. $input set;
  183. }
  184. $  exit input;
  185.  
  186. As you can see, apart from the existance of certain variables in one
  187. version and not another, there is no significant difference.  Any one
  188. any idea how to re-code this to make it work on all three?
  189.  
  190. Thanks for any and all suggestions.
  191.  
  192. Regards
  193. Neil
  194.  
  195. Neil S. Briscoe                Telephone: +44 252 376737
  196. System Administrator            Fax:       +44 252 376644
  197.                                         Email: neil@salmon.demon.co.uk
  198.                                                nbriscoe@cix.compulink.co.uk
  199. Bartec Medical Systems Ltd.
  200. Impression House
  201. Invincible Road                "!##@!** Listen who swears
  202. Farnborough                Christopher Robin has fallen downstairs"
  203. Hants GU14 7NP                -- The Goodies Book of Criminal Records
  204. England
  205. "A man is incomplete until he's married -- then he's finished!"
  206. -- seen on a desktop calendar
  207.