PMI.LST 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. Listing:
  2. 1 MODULE PMI;
  3. 2 FROM Drectory IMPORT SetDefaultDrive,GetCurrentDir;
  4. 3 FROM EnvironUtils IMPORT ReadEnvironment;
  5. 4 FROM ModBase3 IMPORT UpdateDBFile,WriteDBRec,DeleteRecord,ReadDBRec,
  6. 5 AppendBlank;
  7. 6
  8. 7 (*FROM Dos IMPORT SetMaxFH;(* for os2 Dos< jpi DosCalls< Stn*)*)
  9. 8 FROM StrEdit IMPORT CrunchBlanks,CAPstr,DeleteRightJustified;
  10. 9 FROM StringIO IMPORT PrintMessage;
  11. 10 FROM M2Strings IMPORT Length;
  12. 11 FROM Scrn2DBF IMPORT FrameToDBF, DBFToFrame;
  13. 12 FROM PosUtils IMPORT Equal;
  14. 13 FROM PMIGlobals IMPORT PMIScreens,GlobalInit,EditConfig;
  15. 14 FROM SmartScreen IMPORT ClearScreen;
  16. 15 FROM VWindows IMPORT ClearPart, CurrentWindow, SetCursorHeight;
  17. 16 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName;
  18. 17 FROM FramePainter IMPORT ShowDisplayFrame;
  19. 18 FROM InputManager IMPORT ControlFrame;
  20. 19 FROM FrameManager IMPORT EraseFrame;
  21. 20 FROM Prompts IMPORT Prompt,PromptStr;
  22. 21 FROM PMIRpt IMPORT ControlReports;
  23. 22 FROM DBStuff IMPORT MakeKey;
  24. 23 FROM SYSTEM IMPORT ADR,SIZE;
  25. 24 FROM ControlUtils IMPORT ControlSeparately, LoadFrameList,Control;
  26. 25 FROM DspFiles IMPORT OpenDisplayFile,ReadDisplayFrame;
  27. 26 FROM HandleIO IMPORT FileExists;
  28. 27 FROM Prompts IMPORT Prompt;
  29. ***** ^ duplicate identifier
  30. ***** ^ duplicate identifier
  31. 28 FROM LowLevel IMPORT Fill;
  32. 29 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt;
  33. 30 FROM ScrnTypes IMPORT AFrameName, InitDisplayFrame,DisplayFile;
  34. ***** ^ duplicate identifier
  35. ***** ^ duplicate identifier
  36. ***** ^ duplicate identifier
  37. 31 FROM DBFCustomer IMPORT CustomerDBF, OpenCustomerDBF,
  38. 32 CloseCustomerDBF,FindCustomerByCin,FindCustomerByName,
  39. 33 NextCustomer,PrevCustomer,FirstCustomer,LastCustomer;
  40. 34 FROM DBFInvtry IMPORT OpenInvtryDBF,CloseInvtryDBF;
  41. 35 FROM Invtry IMPORT ControlInvtry;
  42. 36 FROM Customer IMPORT ControlCustomer;
  43. 37 FROM PriceTable IMPORT InitializePrice,DefinePriceTbl;
  44. 38 FROM PMIMaint IMPORT Maintain;
  45. 39 IMPORT InitCompilerMods;
  46. 40 IMPORT Locks;
  47. 41 VAR
  48. 42 Status : INTEGER;
  49. 43 J : CARDINAL;
  50. 44 Environ : ARRAY[0..80] OF CHAR;
  51. ***** ^ not supported yet
  52. ***** ^ not supported yet
  53. 45 TopMenu : GenList;
  54. 46 FirstTime: BOOLEAN;
  55. 47 NextFrame,EndingFrame : AFrameName;
  56. 48 SelChar : CHAR;
  57. 49 NoData : BOOLEAN; (* true when no data is on the screen *)
  58. 50 CustomerDF : DisplayFrame;
  59. 51 DSPFile : DisplayFile;
  60. 52 PullDnMenu : GenList;
  61. 53
  62. 54
  63. 55
  64. 56
  65. 57
  66. 58 BEGIN
  67. 59
  68. 60 ReadEnvironment('M2TEST', Environ);
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 61 (*Locks.ExclusiveOnly:=TRUE; (* jpi's extenders api does not lock properly*)*)
  73. 62 CrunchBlanks(Environ);
  74. ***** ^ not supported yet
  75. ***** ^ not supported yet
  76. 63 GlobalInit();
  77. ***** ^ not supported yet
  78. ***** ^ not supported yet
  79. 64 IF NOT OpenDisplayFile(PMIScreens,'PMI.DSP')
  80. ***** ^ not supported yet
  81. ***** ^ not supported yet
  82. ***** ^ not supported yet
  83. 65 THEN
  84. 66 Prompt('Could not open PMI Display file');
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. 67 HALT;
  88. ***** ^ undeclared identifier
  89. 68 END;
  90. 69 (* J := SetMaxFH(30); (*os2 only *)*)
  91. 70
  92. 71 InitDisplayFrame(CustomerDF,CurrentWindow);
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 72 NewList(PullDnMenu);
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. 73 NoData := TRUE;
  100. 74
  101. 75 InitializePrice();
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 76 REPEAT
  105. 77 ClearScreen();
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. 78 ReadDisplayFrame(PMIScreens,CustomerDF,'MainMenu'); (*Clear out any of the fields *)
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. 79 ShowDisplayFrame(CustomerDF,0,0,0,0);
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. 80 ControlFrame(CustomerDF,1,'',FALSE,NextFrame); (* alow user input *)
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. 81 OpenCustomerDBF(TRUE);
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. 82 OpenInvtryDBF(TRUE);
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. 83 IF Equal(NextFrame,'Customer')
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. 84 THEN ControlCustomer();;
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. 85 ELSIF Equal(NextFrame,'Inventory')
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. 86 THEN ControlInvtry();
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. 87 ELSIF Equal(NextFrame,'Reports')
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. 88 THEN ControlReports();
  146. ***** ^ not supported yet
  147. ***** ^ not supported yet
  148. 89 ELSIF Equal(NextFrame,'Maint')
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. 90 THEN Maintain();
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. 91 ELSIF Equal(NextFrame,'PriceTable')
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. ***** ^ not supported yet
  159. 92 THEN DefinePriceTbl();
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. 93 ELSIF Equal(NextFrame,'EditConfig')
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. 94 THEN EditConfig();
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. 95 END;
  170. 96 CloseInvtryDBF();
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. 97 CloseCustomerDBF();
  174. ***** ^ not supported yet
  175. ***** ^ not supported yet
  176. 98 ClearScreen();
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. 99 UNTIL Equal(NextFrame,'Exit');
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. 100
  184. 101
  185. 102
  186. 103
  187. 104 END PMI.
  188. 82 errors