home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / OPNHLP.ZIP / OWDEVE.HLP (.txt) next >
OS/2 Help File  |  1993-02-24  |  1MB  |  8,303 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. !  Note ΓòÉΓòÉΓòÉ
  3.  
  4. Product Documentation Information. 
  5.  
  6. Y.A.M.  COMPUTERS (1982) Ltd.  (Y.A.M) PROVIDES THIS INFORMATION "AS IS", 
  7. WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT 
  8. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 
  9. PARTICULAR PURPOSE. 
  10.  
  11. This information could include technical inaccuracies or typographical errors. 
  12. Changes are periodically made to the information herein; these changes will be 
  13. incorporated in new editions of the information.  Y.A.M.  may make improvements 
  14. and/or changes in the product(s) and/or the program(s) described in this 
  15. information at any time. 
  16.  
  17. It is possible that this information may contain reference to, or information 
  18. about, Y.A.M.  products (programs), programming, or services that have not been 
  19. announced in your country.  Such references or information must not be 
  20. construed to mean that Y.A.M. intends to announce such Y.A.M.  products, 
  21. programming, or services in your country. 
  22.  
  23. OpenWin (C) Copyright Y.A.M.  Computers (1982) Ltd.  1991.All rights reserved. 
  24.  
  25.  OpenWin Program License Agreement 
  26.  
  27.  STATEMENT OF LIMITED WARRANTY 
  28.  
  29.  OpenWin REGISTRATION CARD 
  30.  
  31.  
  32. ΓòÉΓòÉΓòÉ 2. OpenWin Program License Agreement ΓòÉΓòÉΓòÉ
  33.  
  34.  OpenWin Program License Agreement 
  35.  
  36.  BEFORE OPENING AND USING THIS PACKAGE, YOU SHOULD CAREFULLY READ THE FOLLOWING 
  37. TERMS AND CONDITIONS.  OPENING THIS PACKAGE OR USING THIS PACKAGE INDICATES 
  38. YOUR ACCEPTANCE OF THESE TERMS AND CONDITIONS.  IF YOU DO NOT AGREE WITH THEM, 
  39. YOU SHOULD PROMPTLY RETURN THE PACKAGE UNOPENED AND YOUR MONEY WILL BE 
  40. REFUNDED. 
  41.  
  42. THE LICENSE HEREIN IS VALID ONLY FOR USERS THAT HAVE PURCHASED THE PRODUCT FROM 
  43. Y.A.M. COMPUTERS OR ITS LICENSED DISTRIBUTORS. 
  44.  
  45. This is a license agreement and not an agreement for sale.  Y.A.M.  owns all 
  46. copyrights to the program - "OpenWin" henceforth the Program.  You obtain no 
  47. rights other than the license granted you by this agreement. Title to the 
  48. enclosed copy of the Program, and any copy made from it, is retained by Y.A.M.. 
  49. Y.A.M.  licenses your use of the program.  You assume all responsibility for 
  50. the selection of the program to achieve your intended results and for the 
  51. installation of, use of, and results obtained from, the program. 
  52.  
  53.       LICENSE 
  54.  
  55. You may: 
  56.  
  57. 1. Use the program on only one machine and only one user may operate it at any 
  58. one time, unless permission to use it on more than one machine at any one time 
  59. is granted in attached Special License Information ; 
  60.  
  61. 2. Make a copy of the Program for backup or modification purposes only in 
  62. support of your authorized use.  However, programs marked "Copy Protected" 
  63. limit copying; 
  64.  
  65. 3. Transfer possession of copies of the program to another party by 
  66. transferring this copy of the OpenWin Program License Agreement, the License 
  67. Information, and all other documentation, along with at least one complete, 
  68. unaltered copy of the program.  You must, at the same time, either transfer to 
  69. such other party or destroy all other copies of the program in your possession, 
  70. including modified copies or portions of the Program merged into other 
  71. programs.  Such transfer of possession terminates your license from Y.A.M.. 
  72. Such other party shall be licensed, under the terms of this agreement, upon 
  73. acceptance of this agreement by its initial use of the program.  You shall 
  74. reproduce and include the copyright notice(s) on all such copies of the 
  75. Program, in whole or in part. 
  76.  
  77. You may not: 
  78.  
  79. 1. Use, copy, modify, merge, or transfer copies of the Program except as 
  80. provided in this agreement; 
  81.  
  82. 2. Perverse assemble or reverse compile the program, and/or 
  83.  
  84. 3. Sub license, rent, lease or assign the program or any copy thereof. 
  85.  
  86.       LIMITED WARRANTY 
  87.  
  88. Warranty details and limitations are described in the Statement of Limited 
  89. Warranty which is attached.  Y.A.M. provides a three-month limited warranty on 
  90. the media for all programs.  For selected programs, as indicated on the outside 
  91. of the package, a limited warranty on the program is available.  The applicable 
  92. warranty period is measured from the date of delivery to the original user as 
  93. evidenced by a Certain Programs receipt., as indicated on the outside of the 
  94. package, are not warranted and are provided "AS IS." 
  95.  
  96. SUCH WARRANTIES ARE IN LIEU OF ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, 
  97. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
  98. FITNESS FOR A PARTICULAR PURPOSE. 
  99.  
  100.  LIMITATION OF REMEDIES 
  101.  
  102. Y.A.M.'s entire liability and your exclusive remedy shall be as follows: 
  103.  
  104. 1. Y.A.M. will provide the warranty described in Y.A.M.'s statement of Limited 
  105. Warranty.  If Y.A.M.'s authorized distributor does not replace defective media 
  106. or, if applicable, make the Program operate as warranted, or replace the 
  107. Program with a functionally equivalent program, all as warranted, you may 
  108. terminate your license and your money will be refunded upon the return of all 
  109. of your copies of the Program. 
  110.  
  111. 2. For any claim arising out of Y.A.M.'s limited warranty, or for any other 
  112. claim whatsoever related to the subject matter of this agreement, Y.A.M.'s 
  113. liability for actual damages, regardless of the form of action, shall be 
  114. limited to the money paid to Y.A.M., its authorized dealer, or its approved 
  115. supplier for the license for the program that caused the damage, or that is the 
  116. subject matter of, or is directly related to, the cause of action. This 
  117. limitation will not apply to claims for personal injury or damages to real or 
  118. tangible personal property caused by Y.A.M.'s negligence. 
  119.  
  120. 3. In no event will Y.A.M. be liable for any lost profits, lost savings, or any 
  121. incidental damages or other consequential damages , even if Y.A.M., its 
  122. authorized dealer, or its approved supplier, has been advised of the 
  123. possibility of such damages, or for any claim by you based on a third party 
  124. claim. 
  125.  
  126. GENERAL 
  127.  
  128. You may terminate your license at any time by destroying all copies of the 
  129. Program in your possession, or as otherwise described in this agreement. 
  130.  
  131. Y.A.M. may terminate your license if you fail to comply with the terms and 
  132. conditions of this agreement.  Upon such termination, you agree to destroy all 
  133. copies of the Program in your possession. 
  134.  
  135. Any attempt to sub-license, rent, lease or assign, or, except as expressly 
  136. provided herein, to transfer any copy of the program is void. 
  137.  
  138. You agree that you are responsible for payment of any taxes, including personal 
  139. property taxes, resulting from this agreement.  No action, regardless of form, 
  140. arising out of this agreement may be brought by either party more than two 
  141. years after the cause of action has arisen, except for breach of the provisions 
  142. in the section entitled "License", in which event four years shall apply. 
  143.  
  144. This agreement will be construed under the laws of Israel. 
  145.  
  146.  
  147. ΓòÉΓòÉΓòÉ 3. Statement of limited warranty ΓòÉΓòÉΓòÉ
  148.  
  149.          STATEMENT OF LIMITED WARRANTY 
  150.  
  151. (MEDIA AND PROGRAM) 
  152.  
  153.  Y.A.M. Computers (1982) Ltd.  (Y.A.M.) grants the following limited warranty 
  154. for this Y.A.M. Licensed Program - OpenWin (Program), if this copy of the 
  155. program is delivered by Y.A.M., a Y.A.M. authorized dealer for this program, or 
  156. any other Y.A.M. approved supplier for this program to a user (supplier).  Such 
  157. a user is referred to herein as "original user."  A "user" shall mean a 
  158. customer who acquired possession of and is licensed to use this copy of the 
  159. program for his own use, or for use within his own business enterprise, and not 
  160. for re-marketing.  Any unused portion of the warranty period may be conveyed to 
  161. another user. 
  162.  
  163. 1. MEDIA 
  164.  
  165. The Warranty Period for the media on which the program is recorded is for three 
  166. months from the date of its delivery to the original user, as evidenced by a 
  167. receipt. 
  168.  
  169. Y.A.M. warrants that this media will be free from defects in material and 
  170. workmanship under normal use during the warranty period.  If notified during 
  171. the warranty period that the media contains such defects, your media supplier 
  172. will replace such media.  If the media supplier is unable to deliver 
  173. replacement media, you may terminate your license and your money will be 
  174. refunded upon return of all copies of the program in your possession. 
  175.  
  176.  2. PROGRAM 
  177.  
  178.  The warranty period for this program is for three months from the date of its 
  179. delivery to the original user, as evidenced by a receipt. 
  180.  
  181. Y.A.M. warrants that this program, if unaltered, will conform to its program 
  182. specifications during the warranty period, when such program is properly used 
  183. on a machine for which it was designed.  If notified during the warranty period 
  184. that the program contain s defects such that it does not conform to its program 
  185. specifications, Y.A.M. will 1) attempt to make the program operate as warranted 
  186. a) if prior to the service expiration date, by providing a correction, or b) if 
  187. after the service expiration date, by providing any existing corrections, or 2) 
  188. replace the program with a functionally equivalent program, as determined by 
  189. Y.A.M.. In the event that Y.A.M. does not provide such a remedy, you may 
  190. terminate your license and your money will be refunded upon return of all of 
  191. your copies of the program. 
  192.  
  193. Y.A.M. does not warrant that any other defects in the program will be corrected 
  194. or that the operation of the program will be uninterrupted. 
  195.  
  196. This limited warranty will apply only if the program is licensed. 
  197.  
  198. THIS WARRANTY IS IN LIEU OF ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, 
  199. INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
  200. FITNESS FOR A PARTICULAR PURPOSE.  This limited warranty gives you specific 
  201. legal rights. 
  202.  
  203. Following the end of the warranty period, program services may be available 
  204. until the service expiration date.  The license information contains details on 
  205. such availability. 
  206.  
  207. If you have a question as to where you may obtain warranty service, see the 
  208. statement of service in the license information for this program. 
  209.  
  210.  
  211. ΓòÉΓòÉΓòÉ 4. Registration ΓòÉΓòÉΓòÉ
  212.  
  213. Before you start using OpenWin you are requested to register your OpenWin copy 
  214. by completing and sending the enclosed OpenWin Registration Card. 
  215.  
  216. If you have an Unregistered Copy of OpenWin Light you will be able to use it as 
  217. well under the limits described in the  Product Definition. 
  218.  
  219. You are requested to register your copy of OpenWin Light by completing and 
  220. sending the enclosed OpenWin Light Registration Card. . 
  221.  
  222. When you receive a registration code (provided with the product or after 
  223. registration), you can change the "  UNREGISTERED COPY, Not for Sale."  title 
  224. to the title you have specified in on your Purchasing / registration form. 
  225.  
  226. To do this activate the OpenWin Development Module. Select the Registered 
  227. option from the action bar. Type the requested title and the password and press 
  228. O.K. 
  229.  
  230. (The requested company title must be the one you have specified on your 
  231. Purchasing / registration form.) 
  232.  
  233.  
  234. ΓòÉΓòÉΓòÉ 4.1. ! OpenWin Registration Card. ΓòÉΓòÉΓòÉ
  235.  
  236. Please use  OpenWin Light Registration Card. 
  237.  
  238.  
  239. ΓòÉΓòÉΓòÉ 4.2. ! OpenWin Light Registration Card. ΓòÉΓòÉΓòÉ
  240.  
  241. OpenWin Light Registration Card 
  242.  
  243. To register your copy of OpenWin Light, just complete and send this form: 
  244.  
  245. To :Y . A . M .Computers .
  246.  
  247.   Fax: 972-52-901423
  248.  
  249.   Telephone: 972-52-901416
  250.  
  251.   CompuServe E-Mail: 100310,10
  252.  
  253.   Mail: Y.A.M. Ltd., P.O.B. 2426, Raanana 43663, Israel
  254.  
  255. Name: ___________________________________________________
  256.  
  257. Company: _________________________________________________
  258.  
  259. Street: __________________________________________________
  260.  
  261. City / State / Country: ______________________________________________
  262.  
  263. Zip/Postal Code: __________  Phone: _______________  Fax: ______________
  264.  
  265. Requested Company Title __________________________________________
  266.  
  267. (Please specify a title that will be used as your application's title)
  268.  
  269. I would like more information about becoming an OpenWin distributor  ___
  270.  
  271. We are interested in the development market for:
  272.  
  273.           ___ Windows  ___ OS/2    ___ Unix/Motif
  274.  
  275. We estimate our OpenWin unit sales volume to be  _________ copies.
  276.  
  277. Please register my copy of OpenWin Light for:
  278.  
  279. ___Windows ($99)  ___ OS/2 ($99)
  280.  
  281. Add $14 per copy for shipping and handling.
  282.  
  283. And charge my  ___  Visa  ___  MasterCard  ___  Diners Club
  284.  
  285. Number: __________________________________________________
  286.  
  287. Expiration Date: __/____       Signature: ______________
  288.  
  289. * Prices are subject to change at any time without prior notice.
  290.  
  291.  
  292. ΓòÉΓòÉΓòÉ 5. ! Product Definition. ΓòÉΓòÉΓòÉ
  293.  
  294. The OpenWin manual describes most of the OpenWin package's capabilities. If you 
  295. are using OpenWin Light which is the stand alone single database version of 
  296. OpenWin, you should be aware that: 
  297.  
  298. 1. OpenWin Light uses one non-SQL file handler bound in the product (dBASE 
  299. files format compatible file handler). 
  300.  
  301. 2. Your application can use external commands by shelling, but you cannot 
  302. define new OpenWin commands as described in OpenWin Programming guide User 
  303. Defined Routines chapter. 
  304.  
  305. The above mentioned does not apply to the full OpenWin package 
  306.  
  307. Unregistered OpenWin Light limits 
  308.  
  309. You may use your evaluation copy of OpenWin Light before registering it for a 
  310. 90 day evaluation period under the following limitations: 
  311.  
  312. 1. Your OpenWin Light application title will be "UNREGISTERED COPY, Not for 
  313. sale.". 
  314.  
  315.  2. Your OpenWin Light data files size will be limited to 25K bytes and 
  316. approximately 100 records. 
  317.  
  318. 3. Your OpenWin Light task can use up to 3 tables within a single task. 
  319.  
  320. 4. The non-SQL file handler bound in the product is C-Index/II. 
  321.  
  322. As soon as you have registered your copy of OpenWin Light you will get a new 
  323. copy of OpenWin Light.  These limitations will be removed and the file handler 
  324. bound in the product will be dBASE files format compatible. 
  325.  
  326.  
  327. ΓòÉΓòÉΓòÉ <hidden> Help for Help ΓòÉΓòÉΓòÉ
  328.  
  329. Choose this option in order to receive information on how to use Help Menus, 
  330. Extended Help Menus, Keys Help, or the Main Help Index. 
  331.  
  332. Help for Help 
  333.       This help window. 
  334.  
  335. Extended Help 
  336.      Gives general help/information for the use of OpenWin's on-line help. 
  337.  
  338. Keys Help 
  339.      A listing of keyboard functions. 
  340.  
  341. Help Index 
  342.      Displays an index of all help items. 
  343.  
  344.  
  345. ΓòÉΓòÉΓòÉ <hidden> Extended help ΓòÉΓòÉΓòÉ
  346.  
  347. It is possible to receive extended help for each part of the OpenWin program. 
  348.  
  349. This help can be accessed at any time by pressing the F1 key.  The help system 
  350. is context-sensitive and will automatically bring you to the related area.  (If 
  351. your present position has no specific help, this screen will appear.) 
  352.  
  353.  
  354. ΓòÉΓòÉΓòÉ <hidden> Keys Help ΓòÉΓòÉΓòÉ
  355.  
  356. OpenWin is using the system keys assignment. 
  357.  
  358.  
  359. ΓòÉΓòÉΓòÉ 6. Printing a hard copy ΓòÉΓòÉΓòÉ
  360.  
  361. OpenWin User Guide has been developed to be  used as an On-Line manual as well 
  362. as to be printed as a hard  copy. 
  363.  
  364. In order to print OpenWin User Guide you should  use the help facility print 
  365. option. Print all the sections  according to the contents order. 
  366.  
  367. This manual is  formatted to fit A4 pages. 
  368.  
  369.  Note! If you are using  the OS/2 version you should specify in your Printer 
  370. settings - Queue Options that the printer supports  Printer-specific format. 
  371.  
  372.  
  373. ΓòÉΓòÉΓòÉ 7. $ START HERE. ΓòÉΓòÉΓòÉ
  374.  
  375. Welcome to OpenWin Development Environment. 
  376.  
  377. OpenWin is a powerful 4GL and database Front End programming environment. 
  378.  
  379. This guide has been developed to help you learn about OpenWin. 
  380.  
  381. OpenWin provides you with an On-Line help system to assist you in learning to 
  382. use OpenWin. 
  383.  
  384. Within this help system you will find an OpenWin Tutorial, a Programming Guide 
  385. and a Commands Reference Guide. 
  386.  
  387. How to begin ? 
  388.  
  389. OpenWin User Guide consists of three  books - 
  390.  
  391. Tutorial  (T) 
  392.  
  393. Programming guide (P) 
  394.  
  395. Commands Reference guide  (C) 
  396.  
  397. The (T),(P),and (C) marks will help you  to distinct between the books when you 
  398. use the on-line index. 
  399.  
  400. In the first book (Tutorial), Read the tutorial thoroughly and follow its 
  401. instructions carefully. We are sure that in the end of the first book you will 
  402. have the ability to build an OpenWin application completely by yourself. 
  403.  
  404. If you have any questions please call your dealer. 
  405.  
  406.  
  407. ΓòÉΓòÉΓòÉ 8. T U T O R I A L ΓòÉΓòÉΓòÉ
  408.  
  409.  This book has been developed to help you learn more  about OpenWin. 
  410.  
  411. Use this guide according to the order of items listed in the Contents  index 
  412. (select it from the Help Window Action Bar) . 
  413.  
  414. Continue 
  415.  
  416.  
  417. ΓòÉΓòÉΓòÉ 9. Control file OpenWin.cfg ΓòÉΓòÉΓòÉ
  418.  
  419.  When OpenWin is installed, a control file named OpenWin.Cfg  is created in C: 
  420. root directory. This file defines some of  the parameters used by OpenWin. When 
  421. you have many  applications in different directories, you can create an 
  422. OpenWin.Cfg file in each directory. The control file  contains the following 
  423. parameters: 
  424.  
  425. FPATH=C:\system directory\-\working directory\ 
  426.  
  427. ( C: indicates your hard disk ) 
  428.  
  429. These  parameters define the directory in which the application and  the data 
  430. are located. This definition may include more than  one directory, but must 
  431. include at least the directory in  which OpenWin is installed. 
  432.  
  433. YAAM=C:\system directory\ 
  434.  
  435. This parameter directs OpenWin to the  location of internal files and programs. 
  436. It must define the  directory in which the system is installed. 
  437.  
  438.  ARSENV=environment name 
  439.  
  440.  This parameter  indicates the environment definition file (.NUM), which 
  441. monitors the application. 
  442.  
  443. ARSFONT=Courb 16 6 
  444.  
  445.  This parameter indicates the name and size of the font. 
  446.  
  447.  Continue 
  448.  
  449.  
  450. ΓòÉΓòÉΓòÉ 10. Monitoring and On-Line Help ΓòÉΓòÉΓòÉ
  451.  
  452.  Monitoring  and on-line help while developing 
  453.  
  454. To assist in  creating an error-free application, OpenWin monitors the 
  455. developer throughout the definition stages. Every time you  type in or select 
  456. data or commands, the legality of your  choice is checked. If the data you 
  457. typed in are not  appropriate, you receive a message guiding you to the 
  458. correct selection. For on-line help, you can press the F1  key anywhere in the 
  459. system to open a help window applicable  to your location, or you can get 
  460. extended help from the help  menu for each part of the developing environment. 
  461.  
  462.  Using Action Bar 
  463.  
  464. While developing an application  in OpenWin, you may use the Action bar or the 
  465. Tool bar. 
  466.  
  467.  The Action Bar is a text option, just as in every Windows  environment. 
  468.  
  469. The Tool bar is a list of icons that  refer to the respective text options. 
  470. When  you use the mouse to point to an icon in the Tool bar, the  text option 
  471. is displayed in the Status line located at the  bottom of the screen. 
  472.  
  473.  Opening a file 
  474.  
  475. When OpenWin Development module is opened, you can choose the type of 
  476. definition module you wish to use (Define Environment, Tables, Views or Tasks ) 
  477. from the Application  options in the Action bar or the Tool bar. 
  478.  
  479. When entering a module, You must define the file which you want to edit. To do 
  480. this, select the File,  Open  option and the appropriate file from the list. 
  481. The file name will appear at the top of the screen. 
  482.  
  483.  If you want to define a new file,  choose the New option. 
  484.  
  485.  After you have defined  the file, choose File and the Save option. If you  are 
  486. defining a new file, you will be asked to type in the  file name. 
  487.  
  488.  The window action bar 
  489.  
  490.  Two kinds of windows can be opened in each module. The first  is a "Dialogue 
  491. window". 
  492.  
  493.  Here you must fill in the required  details and press OK. 
  494.  
  495.  The second and more popular is a  multi-line window 
  496.  
  497. which has an action bar at the top  containing the following commands: 
  498.  
  499.  Edit Move Paint O.K. Cancel
  500. _______________________________________________
  501.  
  502.  The Paint menu enables you to  refresh the screen. 
  503.  
  504.  The Move menu enables you  to move quickly from line to line. 
  505.  
  506.  The Edit  menu contains the following commands: 
  507.  
  508.  Insert  opens a new input line at the currently chosen location. 
  509.  
  510.  Append opens an input line under the currently  chosen location. 
  511.  
  512.  Update moves to the  currently chosen location in order to update it. 
  513.  
  514.  Delete deletes the currently chosen location. 
  515.  
  516.  In order to mark a line as chosen, click on it  with the mouse. 
  517.  
  518.  When you have finished entering  information, you must click on either O.K., 
  519. or  Cancel. 
  520.  
  521.  In order to mark lines for  Copy or Cut, click on the first line  with the 
  522. mouse, keep the left mouse button depressed and  drag the mouse down. The 
  523. marked lines will be highlighted. Continue 
  524.  
  525.  
  526. ΓòÉΓòÉΓòÉ 11. The application's purpose ΓòÉΓòÉΓòÉ
  527.  
  528.  Chapter 1 
  529.  
  530. Before creating an application in OpenWin, you may wish to view a Demo 
  531. application. Once you have seen what the application can do, you can continue 
  532. on to Chapter 2 to see how the application is organized. 
  533.  
  534. The application is designed for organization of worker files. You can add, 
  535. delete, update, find and save information related to workers and departments. 
  536.  
  537.  Running the Demo 
  538.  
  539. In order to run the Demo, you should first open the Tutorial Application Demo 
  540. module from the OpenWin main menu (folder). 
  541.  
  542. When you enter the Tutorial Application Demo module, the following application 
  543. menu will appear on the screen: 
  544.  
  545. As you see, the MAIN MENU has two options: SQL and NON-SQL. Click on the 
  546. NON-SQL option. The sub-menu shows three tasks: WORKERS, DEPARTMENT and 
  547. HOURS-REPORT. 
  548.  
  549. These tasks are interrelated. First, open the WORKERS task. 
  550.  
  551. (You can access the DEPARTMENT table either from the WORKERS table, while you 
  552. are working in it, or independently). 
  553.  
  554. The screen will show the following: 
  555.  
  556.  Data entry 
  557.  
  558. Note that there are two windows on the screen. One is called MENU and the 
  559. other DATA ENTRY. In order to begin an activity, click on the appropriate 
  560. button in the MENU screen. For example, click od the ADD button. This will 
  561. transfer the activity to the DATA ENTRY screen. A frame will appear around the 
  562. field WORKER ID. The frame indicates that the user is to type data in this 
  563. field. Since the worker code is the key to the record, it is opened first. No 
  564. further information can be entered until data are typed in this field. 
  565.  
  566. After the data have been typed in the WORKER ID field, the application checks 
  567. to see if the record already exists.  If the record exists, the application 
  568. notifies the user of this fact.  If not, the application accepts the input and 
  569. opens a new field with a frame around the DEPARTMENT. Here too , the 
  570. application checks to see if a record exists for this department code. 
  571.  
  572. At this point, type in the DEPARTMENT field 100 and press the TAB key. The name 
  573. of the department will appear in the next field, and the rest of the fields 
  574. will be shown with red frames, indicating that you may enter data in any field 
  575. you choose. 
  576.  
  577. Fill the fields and press Enter to confirm the input. 
  578.  
  579. Press ESC to stop the workers data entry. 
  580.  
  581.  What to do if you don't know the department's code. 
  582.  
  583. If you don't know the department's code,leave the DEPARTMENT CODE field empty 
  584. and press TAB.  This will bring the department table to the screen, where you 
  585. can see all department details. 
  586.  
  587. You may implement the following operations: 
  588.  
  589. a. View a list of all existing departments with their codes. 
  590.  
  591. b. Find, delete, update or add a department code. 
  592.  
  593. c. Choose a department code.  To do this, use the keyboard arrows to highlight 
  594. the row containing the desired code.  From the tool bar, choose the Choose 
  595. icon. 
  596.  
  597. At this point, choose the desired department as described in c. above. 
  598.  
  599. For updating or entering a worker hours per day, you can choose the  LOG 
  600. option from the menu window, and the following window will appear: 
  601.  
  602. After updating the worker hours choose the  EXIT  option for returning to  Data 
  603. entry window. 
  604.  
  605. After completing the entry of worker data, you may exit to the MAIN MENU by 
  606. selecting the QUIT action option. 
  607.  
  608. From the MAIN MENU, you may enter the report task, and the following window 
  609. will appear: 
  610.  
  611. Close the tutorial application window. 
  612.  
  613. You can now continue to Chapter 2, to see how the application build. 
  614.  
  615. Continue 
  616.  
  617.  
  618. ΓòÉΓòÉΓòÉ 12. Application building ΓòÉΓòÉΓòÉ
  619.  
  620.  This chapter describes the process of  building an application with OpenWin 
  621. and the main modules  used in the process. 
  622.  
  623.  The application building process  includes three main steps : 
  624.  
  625.  1. Defining the application Environment 
  626.  
  627.  2. Defining the application Tables/Views. 
  628.  
  629.  3. Defining the application Tasks. 
  630.  
  631.  This process goes from top to bottom, starting with  general definitions and 
  632. ending with details. 
  633.  
  634.    Defining the application Environment. The  application Environment 
  635. supervises the application in  its totality. The definitions include the name 
  636. of the  application, available printers, etc. This module also  enables you to 
  637. create a menu for the application. 
  638.  
  639.     Defining Tables module 
  640.  
  641.  The Table  Definition module is used to define the global data  dictionary of 
  642. the application. The table definition includes  general information about the 
  643. table, such as its name, the  type of DBMS that will manage it, etc. The 
  644. definition also  includes the field (table columns) and the way in which the 
  645. keys are to be used. 
  646.  
  647.    Defining View  module 
  648.  
  649.  The View Definition module is used  to create view statements for use in 
  650. OpenWin tasks. After  defining and building a view statement, you can regard it 
  651. as  a new table in your application. 
  652.  
  653.    Editing Task module 
  654.  
  655.  The third and main phase in creating an application is the  Task Definition. A 
  656. task is a program that uses previous  definitions in order to execute different 
  657. functions, such as  updating tables, producing reports, or any other operation. 
  658. In order to shorten the application writing process, you can  generate a task 
  659. source code after defining a table. Of  course, you can edit tasks which are 
  660. created automatically  and change them according to your needs. 
  661.  
  662.  Building 
  663.  
  664. Each definition module has a building module: 
  665.  
  666.   The compilation has two purposes- 
  667.  
  668.  A. Checking the  legality of the definition. If an error exists, it is 
  669. displayed on the screen. 
  670.  
  671.  B. Creating run files. Whenever  you check an environment in which a menu has 
  672. been defined, a  run file for this menu is created. Whenever you check a 
  673. table, an empty physical table is created. Whenever you  check a task, a run 
  674. file for the task is created. 
  675.  
  676.  If an  existing module is edited, you must repeat the compilation  process in 
  677. order to check it and create a new run file. 
  678.  
  679.  Module activating 
  680.  
  681.  A development module  is activated by clicking on the "Development" module 
  682. with the  mouse. 
  683.  
  684.  When the Development module is opened, you choose  the type of definition 
  685. module you wish to use (Define Environment, Tables, Views or Tasks ) from the 
  686. Application options in the  Action bar or the Tool bar. 
  687.  
  688. Continue 
  689.  
  690.  
  691. ΓòÉΓòÉΓòÉ 13. OpenWin files ΓòÉΓòÉΓòÉ
  692.  
  693.  OpenWin files 
  694.  
  695.  Definitions that you execute are  saved in the definition files. The 
  696. compilation process  creates run tables. All files have been given preset fixed 
  697. extensions so that you may distinguish among them. The  extensions are listed 
  698. below: 
  699.  
  700. Environment definition file  .NUM 
  701.  
  702. Menu to run .MNU 
  703.  
  704. Table definition file .DES 
  705.  
  706.  Inner table definition file .DCL The physical DBMS files are  given different 
  707. endings, according to the DBMS chosen. For  example, DAT and IDX. 
  708.  
  709. View definition file .VEW 
  710.  
  711. Task  definition file .ARS 
  712.  
  713. Task execution file .TSK 
  714.  
  715. In the  next chapter you will learn how to set up an OpenWin  tutorial 
  716. application quickly. 
  717.  
  718. Continue 
  719.  
  720.  
  721. ΓòÉΓòÉΓòÉ 14. Tutorial application ΓòÉΓòÉΓòÉ
  722.  
  723. In this section, you will learn how to start using OpenWin's powerful 4GL 
  724. database programming language. A short application has been prepared to make 
  725. the learning process clearer and more efficient. With the help of this 
  726. application you will learn how to use Openwin according to the following 
  727. stages: 
  728.  
  729. 1. What does the application do? 
  730.  
  731. 2. How is the application build? 
  732.  
  733. 3. Analyzes and modification of the application. 
  734.  
  735. To further simplify the learning process, data have already been entered. Your 
  736. work will be limited to updating, changing and adding to the existing data. 
  737.  
  738.  
  739. ΓòÉΓòÉΓòÉ 15. Environment definition ΓòÉΓòÉΓòÉ
  740.  
  741. Following in this tutorial you will be asked to type in some data as shown in 
  742. the manual. When you are requested to "Add the following lines ..." you should 
  743. add only the highlighted lines you will see in the pictures 
  744.  
  745. The first phase in defining an  application is to define the application 
  746. environment. 
  747.  
  748. Open the development module. 
  749.  
  750. Make sure you are in the  Define Environment module (If not, Select it from the 
  751. action bar), and open the file 'Employee.num'. 
  752.  
  753. Next Page 
  754.  
  755.  
  756. ΓòÉΓòÉΓòÉ 15.1. General Settings .. ΓòÉΓòÉΓòÉ
  757.  
  758.  Defining General Settings 
  759.  
  760.  In the Environment Definition module open the   General Settings section. You 
  761. will see the following  details- 
  762.  
  763. Press OK. 
  764.  
  765.  Minimize the General Settings window to an icon 
  766.  
  767.  Next Page 
  768.  
  769.  
  770. ΓòÉΓòÉΓòÉ 15.2. Tables Declaration .. ΓòÉΓòÉΓòÉ
  771.  
  772.  Table Declaration 
  773.  
  774. In  the Environment Definition module open the  Table  Declaration section. You 
  775. will see the following  details: 
  776.  
  777.   ( If you are using OpenWin Light or a non  SQL OpenWin version, delete the 
  778. tables Employee,  DayPay,and Hours . ) 
  779.  
  780. Minimize the Table  section to an icon. 
  781.  
  782. Next Page 
  783.  
  784.  
  785. ΓòÉΓòÉΓòÉ 15.3. DBMS Declaration .. ΓòÉΓòÉΓòÉ
  786.  
  787. In the  Environment Definition module open the  DBMS  Declaration section. You 
  788. will see the following  details 
  789.  
  790.   ( If you are using OpenWin Light or a non  SQL OpenWin version, delete the 
  791. file handler  IBM-DBM DBMS name. ) 
  792.  
  793. Next Page 
  794.  
  795.  
  796. ΓòÉΓòÉΓòÉ 15.4. Task Declaration .. ΓòÉΓòÉΓòÉ
  797.  
  798.  Task Declaration 
  799.  
  800. In the  Environment Definition module open the  Task  section. You will see the 
  801. following details 
  802.  
  803.  ( If you are using  OpenWin Light or a non SQL OpenWin version,  delete the 
  804. tasks Employee, DayPay, RDayPay and Hours . ) 
  805.  
  806.  Minimize the tasks  section to an icon. 
  807.  
  808. Next Page 
  809.  
  810.  
  811. ΓòÉΓòÉΓòÉ 15.5. The application menu .. ΓòÉΓòÉΓòÉ
  812.  
  813.  Defining  the application menu 
  814.  
  815.  In the Environment  Definition module open the   Application Menu  section You 
  816. will see the following details 
  817.  
  818. Next Page 
  819.  
  820.  
  821. ΓòÉΓòÉΓòÉ <hidden> 30085 ΓòÉΓòÉΓòÉ
  822.  
  823. You can look at the following Newmenu , M-Line , Endmenu , Task commands to 
  824. learn more about the menu. 
  825.  
  826. Next Page 
  827.  
  828.  
  829. ΓòÉΓòÉΓòÉ <hidden> 30086 ΓòÉΓòÉΓòÉ
  830.  
  831.  Minimize the menu section to an icon. 
  832.  
  833. If you have made  corrections, select the File option and save the file. 
  834.  
  835.   Activate the  (Build)  Environment Checking Module. Check the file 
  836. Employee.NUM. If  you have entered the data properly, a working menu will be 
  837. created. If not, a list of errors will be displayed. Correct  all errors, save 
  838. the file and recheck the environment. 
  839.  
  840.   Activate the Run option. 
  841.  
  842.  The menu you have defined  will appear and you will be able to review the 
  843. different  options. Of course, tasks which you haven't yet created  can't be 
  844. activated. Close the Run Tasks module. 
  845.  
  846. Continue 
  847.  
  848.  
  849. ΓòÉΓòÉΓòÉ 16. Tables definition ΓòÉΓòÉΓòÉ
  850.  
  851. The second phase of building an  application is defining the tables that make 
  852. up the  application data base. 
  853.  
  854. Select the   Table Definition module from the tool bar. 
  855.  
  856.  Enter the module and open the file  'Depart.des'. 
  857.  
  858. Next Page 
  859.  
  860.  
  861. ΓòÉΓòÉΓòÉ 16.1. Table General Settings ... ΓòÉΓòÉΓòÉ
  862.  
  863.  General  Settings 
  864.  
  865.  In the Table Definition module open the    General Settings section. You will 
  866. see the following  details 
  867.  
  868.  Minimize  the General Settings section to an icon. 
  869.  
  870.  Next Page 
  871.  
  872.  
  873. ΓòÉΓòÉΓòÉ 16.2. Fields Definition ... ΓòÉΓòÉΓòÉ
  874.  
  875.  Fields Definition 
  876.  
  877. In the Table  Definition module open the   Field Definition  section. You will 
  878. see the following details 
  879.  
  880.  Minimize the field section to  an icon. 
  881.  
  882.  Next Page 
  883.  
  884.  
  885. ΓòÉΓòÉΓòÉ 16.3. Keys definition ... ΓòÉΓòÉΓòÉ
  886.  
  887.  Key definition 
  888.  
  889.  In the Table Definition module open the  Key  definition section. You will see 
  890. the following  details 
  891.  
  892.   Minimize the key definition section to an icon. 
  893.  
  894.  If you  have made corrections, select the File option and save the  file. 
  895.  
  896.  You have now finished defining the departments  table. 
  897.  
  898.  The next phase is building tables. 
  899.  
  900. Continue 
  901.  
  902.  
  903. ΓòÉΓòÉΓòÉ 17. Tables building ΓòÉΓòÉΓòÉ
  904.  
  905.  Build tables 
  906.  
  907.  We have already built the physical table for you, so you  won't need to build 
  908. it again. 
  909.  
  910. Now you can use the Automatic Program Creation  option - Source Generator. 
  911.  
  912. Continue 
  913.  
  914.  
  915. ΓòÉΓòÉΓòÉ 18. Task generation ΓòÉΓòÉΓòÉ
  916.  
  917. Activate the   Source Generator  module.  Select O.K.  for the name DEPART. 
  918. Select the "EDIT WINDOW" Option.  Within a few seconds an OpenWin Task named 
  919. DEPART.ARS will be created automatically which will enable you to update the 
  920. departments table,  If you will get a message saying that the task already 
  921. exists, and it will be overwritten.  Press O.K.  and continue. 
  922.  
  923. Close the Source Generator module window. 
  924.  
  925. (If you were activating the Source Generator from another module and not the 
  926. Tables Definition module, you were asked to specify the source table name.) 
  927.  
  928. To activate the task you have created, you must build it. 
  929.  
  930. Continue 
  931.  
  932.  
  933. ΓòÉΓòÉΓòÉ 19. Tasks building ΓòÉΓòÉΓòÉ
  934.  
  935. To activate the tasks which you have created, enter the  Tasks definition 
  936. module and open the file 'Depart.ars'. Now you can activate the  Build Tasks 
  937. module. 
  938.  
  939. Within a few seconds an executable task called Depart.TSK will be created 
  940. automatically.  If you have made any errors, they will be presented on the 
  941. screen.  Correct the errors, save the file and repeat the check. 
  942.  
  943.  Now you can run the Task. 
  944.  
  945. Continue 
  946.  
  947.  
  948. ΓòÉΓòÉΓòÉ 20. Running the Application ΓòÉΓòÉΓòÉ
  949.  
  950.  Activate the  Run Task module. 
  951.  
  952.  The following window  will appear on the screen: 
  953.  
  954. Next Page 
  955.  
  956.  
  957. ΓòÉΓòÉΓòÉ <hidden> 30010 ΓòÉΓòÉΓòÉ
  958.  
  959. To add a  department, select the option Edit from the  action bar and the 
  960. option Insert Or click on the correspond icon from the tool bar.  Using the 
  961. mouse, fill in the  Department Code field and move to the next field. After 
  962. typing the line, press ENTER or TAB. The line will be  entered and a new input 
  963. line opened. 
  964.  
  965. Add some new departments. 
  966.  
  967. After entering the departments as described, press ESC when you are in a Code 
  968. field.  Pressing ESC will take you out of the Add mode. 
  969.  
  970.  Select  Exit  from the action bar to close the task. 
  971.  
  972. In the next chapter, you will analyze the  input task which updates the items. 
  973.  
  974. Continue 
  975.  
  976.  
  977. ΓòÉΓòÉΓòÉ 21. Input Task - Analyzing ΓòÉΓòÉΓòÉ
  978.  
  979. In this chapter, you will analyze the input task which updates the department 
  980. file. 
  981.  
  982. Please close the  Table Definition Module by selecting the EXIT option. 
  983.  
  984. In order to follow the explanation, make sure you are in the  Task Definition 
  985. module and open the file Depart.ARS. 
  986.  
  987. As you have seen, the data entry task created by the Source Generator. 
  988.  
  989. This is an example of a regular task used to update a file. 
  990.  
  991. A data entry task normally includes the following sections: 
  992.  
  993. -  General Parameters section, Defining the task structure. 
  994.  
  995. -  The name of the table being handled, and how to access it. 
  996.  
  997. -  Constant Char used as messages and titles. 
  998.  
  999. -  Local variables. 
  1000.  
  1001. -  Defining and planning the windows. 
  1002.  
  1003.   Edit Window and, 
  1004.  
  1005.   Edit Operations  sections, Defining the edit window. 
  1006.  
  1007. -  The logic flow that supervises the course of the task. 
  1008.  
  1009. -  Defining the ranges used in the flow control commands . 
  1010.  
  1011. In this chapter, you will review the different components and explain their 
  1012. meanings.  If you wish to receive further information about any of the windows 
  1013. described, you can find it in the appropriate chapters of the Programming Guide 
  1014.  
  1015. We will now view the General Parameter section in the Edit Task module. 
  1016.  
  1017. Continue 
  1018.  
  1019.  
  1020. ΓòÉΓòÉΓòÉ 21.1. General Parameters ΓòÉΓòÉΓòÉ
  1021.  
  1022. In the  Edit Tasks module open the  General Parameters section 
  1023.  
  1024. In this section, the task parameters are described, as they are set by the 
  1025. source generator. 
  1026.  
  1027. Next Page 
  1028.  
  1029.  
  1030. ΓòÉΓòÉΓòÉ <hidden> 30011 ΓòÉΓòÉΓòÉ
  1031.  
  1032. The task name is a general name given by the code generator. 
  1033.  
  1034. Enter this field and change the name to 
  1035.  
  1036. In the routines, only the main routine called Main was defined.  This is a 
  1037. routine (label) in the logic flow that runs the task.  Press O.K.  and minimize 
  1038. the General Parameters window. 
  1039.  
  1040. Now you will view the task data dictionary. 
  1041.  
  1042. Continue 
  1043.  
  1044.  
  1045. ΓòÉΓòÉΓòÉ 21.2. Data dictionary ΓòÉΓòÉΓòÉ
  1046.  
  1047. In the  Edit Task module open the   Table section  This window defines the 
  1048. tables handled by the task.  The structure of the window is as follows- 
  1049.  
  1050. The table name the name of the table you wish to refer to (as you have defined 
  1051. in the Define Tables  module without the .DES extension.)- in this case, the 
  1052. Departments file, 'DEPART'. In order to enable references to a number of 
  1053. tables, you must use a table identifier - in this case, 1. Later in the task, 
  1054. you will refer to the table fields by writing down their names and the table 
  1055. identifier. 
  1056.  
  1057. Next Page 
  1058.  
  1059.  
  1060. ΓòÉΓòÉΓòÉ <hidden> 30012 ΓòÉΓòÉΓòÉ
  1061.  
  1062.  Variables 
  1063.  
  1064. The present task uses different variables for different purposes.  The 
  1065. definition window for the  Variable section is as follows- 
  1066.  
  1067. Next Page 
  1068.  
  1069.  
  1070. ΓòÉΓòÉΓòÉ <hidden> 30013 ΓòÉΓòÉΓòÉ
  1071.  
  1072. The variables Zero and Blank are used to nullify  fields. The Max variables are 
  1073. used to define maximum values. The Title variable is used as at title for the 
  1074. edit window. The Dummy variable is used as a field when you define the contents 
  1075. of a window. This will be explained later in the chapter.  The Del, AccKey 
  1076. variables, etc. are used as range parameters for flow control commands. 
  1077.  
  1078. We will now go into window design. 
  1079.  
  1080. Continue 
  1081.  
  1082.  
  1083. ΓòÉΓòÉΓòÉ 21.3. Window Design ΓòÉΓòÉΓòÉ
  1084.  
  1085.  Window Design 
  1086.  
  1087. Activate the  Window Design section.  This window is used for interactive 
  1088. editing of the input task. 
  1089.  
  1090. Drag the mouse pointer to the window MAIN and drag the window top frame up so 
  1091. you can see the fields in it. The window will appear as follows- 
  1092.  
  1093. Drag the mouse pointer to the field 1DCode and click on it in order to select 
  1094. the field. Select the Color Window icon from the tool bar. The color window 
  1095. will appear.  Using the mouse, select a color and double click on the chosen 
  1096. field. The field color will change.  Repeat this process for the other field. 
  1097.  
  1098. In this window, you can perform various functions, but at this stage you will 
  1099. stick to changing colors only.  Drag the window top frame down to one line size 
  1100. (as it was in the beginning) Select the O.K  option at the top corner of the 
  1101. screen, in order to save the changes. You will get a message confirming the 
  1102. changes. 
  1103.  
  1104. Leave the window design screen by minimizing it. 
  1105.  
  1106. Notice that the window height is set for only one line.  Our task uses the 
  1107. multi-line editing command EDIT  to edit this window. 
  1108.  
  1109. An EDIT window height is determined by the EDIT Window section.  The height set 
  1110. when designing the window represents ONE line in the window when it is edited 
  1111. with the edit command. 
  1112.  
  1113. Look at the EDIT Window section. 
  1114.  
  1115. Continue 
  1116.  
  1117.  
  1118. ΓòÉΓòÉΓòÉ 21.4. EDIT Window section ΓòÉΓòÉΓòÉ
  1119.  
  1120.  The Edit Tasks module   EDIT Window  section 
  1121.  
  1122. When you open this section, the following window appears- 
  1123.  
  1124. The data in this window determines the way in which the window is presented on 
  1125. the screen during the execution of the Edit command.  At this stage, you won't 
  1126. change the data in this window. 
  1127.  
  1128. Next Page 
  1129.  
  1130.  
  1131. ΓòÉΓòÉΓòÉ <hidden> 30014 ΓòÉΓòÉΓòÉ
  1132.  
  1133. In The Edit task module, open the  Edit Operations section. 
  1134.  
  1135. Data defined in this section indicate the functions which the user can perform 
  1136. in the edited window.  Read the EDIT Operations chapter in the Programming 
  1137. Guide, and the explanation on the Edit command  in the Command Guide.  Open the 
  1138. edit operations window, which will appear as follows- 
  1139.  
  1140. Next Page 
  1141.  
  1142.  
  1143. ΓòÉΓòÉΓòÉ <hidden> 30015 ΓòÉΓòÉΓòÉ
  1144.  
  1145. Each of the edit functions is linked to a routine in a logic flow.  These 
  1146. routines are explained in greater detail later on. 
  1147.  
  1148. The main part of the task is the logic flow. 
  1149.  
  1150.  Continue 
  1151.  
  1152.  
  1153. ΓòÉΓòÉΓòÉ 21.5. Logic Flow ΓòÉΓòÉΓòÉ
  1154.  
  1155.  The Logic Flow 
  1156.  
  1157. When you open the  Logic Flow section, the program command sequence is 
  1158. presented as follows- 
  1159.  
  1160. Next Page 
  1161.  
  1162.  
  1163. ΓòÉΓòÉΓòÉ <hidden> 30016 ΓòÉΓòÉΓòÉ
  1164.  
  1165.  The logic flow structure 
  1166.  
  1167. The logic flow is a list of OpenWin commands and different parameters for these 
  1168. commands.  The command sequence is divided into different groups called 
  1169. routines.  A routine is characterized by a label at the beginning that enables 
  1170. it to relate to it , and ends with a Return command. 
  1171.  
  1172. In an OpenWin Task, there are two groups of routines.The first group comprises 
  1173. the routines indicated in the General Parameters section of the task as initial 
  1174. , main , and final routines. 
  1175.  
  1176.  When a task is activated, the initial routine is executed and ends, if it has 
  1177. been defined, when the main routine is executed. When this routine ends, the 
  1178. final routine is executed, if one has been defined. The second group comprises 
  1179. routines that were called out from other routines, or were activated as 
  1180. routines defined in libraries exclusive for certain commands. For example, 
  1181. routines used for editing functions of the edit command. 
  1182.  
  1183. We will now view the main routine. 
  1184.  
  1185. Continue 
  1186.  
  1187.  
  1188. ΓòÉΓòÉΓòÉ 21.6. Logic Flow .. ΓòÉΓòÉΓòÉ
  1189.  
  1190.  The main routine 
  1191.  
  1192. In this task, ONLY the routine called Main was defined in the General 
  1193. Parameters section.  Defining a main routine ONLY is accepted practice in 
  1194. interactive input tasks. 
  1195.  
  1196. The routine begins with the following line: 
  1197.  
  1198. This command opens a work screen whose title is the contents of the field "0 
  1199. Title".  The execution of this line is conditioned by the flag Z0.  The command 
  1200. will is executed only if the flag is OFF (=).  The reason for this condition 
  1201. will be explained later. 
  1202.  
  1203. The following command is the main command in the program. 
  1204.  
  1205. This command displays the # MAIN window on the screen and transfers supervision 
  1206. to the edit command.  Further information regarding this command is available 
  1207. from the command window.  In the Result variable  a local variable, Zero, whose 
  1208. value is 0, was indicated, meaning that the window should be displayed in its 
  1209. full size.  This is defined in the  Edit Window definition. 
  1210.  
  1211. Next Page 
  1212.  
  1213.  
  1214. ΓòÉΓòÉΓòÉ <hidden> 30091 ΓòÉΓòÉΓòÉ
  1215.  
  1216. When the edit functions ends, the next two lines are executed to clear the 
  1217. screen and end the task. 
  1218.  
  1219. Next Page 
  1220.  
  1221.  
  1222. ΓòÉΓòÉΓòÉ <hidden> 30017 ΓòÉΓòÉΓòÉ
  1223.  
  1224. The following routines are called by the edit command when the user selects the 
  1225. edit option. 
  1226.  
  1227.  The Insert routine 
  1228.  
  1229. When the edit command Insert  is selected, a new line is opened on the screen 
  1230. in order to enable input and the supervision is turned to the routine.  In the 
  1231. present cases, this routine is called 'Insert'. 
  1232.  
  1233. The first line in this routine sets I1 flag to OFF (=) status. 
  1234.  
  1235. The next line in this routine branches out to the First routine, which 
  1236. nullifies the fields to be entered. 
  1237.  
  1238. Next Page 
  1239.  
  1240.  
  1241. ΓòÉΓòÉΓòÉ <hidden> 30092 ΓòÉΓòÉΓòÉ
  1242.  
  1243.  After the content of these fields has been reduced to zero or blanks, the next 
  1244. line calls Disp* routine to display the sub-screens that contain the fields 
  1245. which make up the line.  As a result, the empty fields are displayed in the 
  1246. line opened by the edit command. 
  1247.  
  1248. Next Page 
  1249.  
  1250.  
  1251. ΓòÉΓòÉΓòÉ <hidden> 30018 ΓòÉΓòÉΓòÉ
  1252.  
  1253. The following line calls AccKey routine where an Accept command - input to the 
  1254. sub screen * KEY that includes the field 1DCode is executed.  This line is 
  1255. given a label, since you may want to refer to it later.  At the end , or in the 
  1256. middle of accept, If the input is aborted, AccKey routine will set A1 flag 
  1257. status to ON. In such a case the next line will set I1 flag to ON and divert 
  1258. the flow to Insert routine end at InsEnd label. 
  1259.  
  1260. The flag I1 is the same as the flag defined in the edit function as a result 
  1261. flag.  As long as the insert routine returns the value = (OFF) in this flag, 
  1262. the edit function insert continues to open new lines and refer to the routine. 
  1263. When the routine returns the value +/- (ON), the insert function ends. 
  1264.  
  1265. Next Page 
  1266.  
  1267.  
  1268. ΓòÉΓòÉΓòÉ 21.7. Logic Flow ... ΓòÉΓòÉΓòÉ
  1269.  
  1270. The following lines check to see if the department code already exists. This is 
  1271. done by trying to find a record from table 1, according to the MainK key . The 
  1272. result of the search is returned in the flag I0.  If the record has been found, 
  1273. indicating that it already exists in the file, the search has been successful 
  1274. and the flag will get the value = (OFF).  In that case, the Message command is 
  1275. executed, displaying the contents of the string Exist and beeping once to 
  1276. request the user to confirm the message. The flow will return to Ins1 label to 
  1277. enable input of a new department number. 
  1278.  
  1279. Next Page 
  1280.  
  1281.  
  1282. ΓòÉΓòÉΓòÉ <hidden> 30022 ΓòÉΓòÉΓòÉ
  1283.  
  1284. Once the department Code has been checked, the following lines calls AccData 
  1285. routine. 
  1286.  
  1287. In this routine the Accept command enables you to receive data in fields that 
  1288. belong to the sub-screen * DATA.  If you press ESC to end the input, the flag 
  1289. A2 is set to ON and the flow returns to Ins1 label. 
  1290.  
  1291. Next Page 
  1292.  
  1293.  
  1294. ΓòÉΓòÉΓòÉ <hidden> 30023 ΓòÉΓòÉΓòÉ
  1295.  
  1296. After entering the department details (Name), if the If term is true, the Write 
  1297. command executes the entry of a new record in the table. 
  1298.  
  1299. The program will reach the "InsEnd" line when the Insert ends and the return 
  1300. command returns control to the edit command. 
  1301.  
  1302. Continue 
  1303.  
  1304.  
  1305. ΓòÉΓòÉΓòÉ 21.8. Logic Flow .... ΓòÉΓòÉΓòÉ
  1306.  
  1307.  Update routine 
  1308.  
  1309. When the Edit function Update  is selected, the edit command knows that you now 
  1310. wish to update the current chosen record.  The logic flow is diverted to a 
  1311. routine, in this case the Update routine. 
  1312.  
  1313. When going through the records, the edit command saves the values of key 
  1314. fields.  Since the possibility exist of a situation in which the value of the 
  1315. fields that are not the key fields is different from the contents of the 
  1316. record.  The first thing to do in the routine is to find the record according 
  1317. to the key. 
  1318.  
  1319. After the record has been found, the sub-screen "* KEY" containing the key 
  1320. field data, and the "* DATA" sub-screen that contains the fields which are not 
  1321. key fields, are displayed in Disp* routine. 
  1322.  
  1323. Next Page 
  1324.  
  1325.  
  1326. ΓòÉΓòÉΓòÉ <hidden> 30025 ΓòÉΓòÉΓòÉ
  1327.  
  1328. The Accept command you can see in AccData routine enables updating the contents 
  1329. of the fields that are not part of the key.  If the user doesn't wish to 
  1330. update, the flag A2 is set to ON.  In such case, the flag U1 is set to ON and 
  1331. Update routine ends. 
  1332.  
  1333. the edit command once again displays the line with the field content as it was 
  1334. before the changes were made. 
  1335.  
  1336. The Rewrite command is executed during a regular update, thus updating the 
  1337. record in the file.  If, for technical reasons, the update should fail, the 
  1338. flag I0 will be set to ON (-) . 
  1339.  
  1340. Next Page 
  1341.  
  1342.  
  1343. ΓòÉΓòÉΓòÉ <hidden> 30026 ΓòÉΓòÉΓòÉ
  1344.  
  1345. Like any other routine, the update routine is ended by the Return command 
  1346.  
  1347.  Delete routine 
  1348.  
  1349. Delete is a routine which is activated when the edit function Delete is 
  1350. selected. 
  1351.  
  1352. To prevent accidental deletion of records, the routine presents a warning 
  1353. message by using the message command.  If the user replies in the negative, the 
  1354. flag D1 will be set to ON. 
  1355.  
  1356. Next Page 
  1357.  
  1358.  
  1359. ΓòÉΓòÉΓòÉ <hidden> 30027 ΓòÉΓòÉΓòÉ
  1360.  
  1361. If the user acknowledges the deletion, the "If Delete" will be true and the 
  1362. Delete command will erase the record from the table. 
  1363.  
  1364. The Return command will return control to the Edit command.  If a deletion was 
  1365. made (information which the Edit command gets through the flag D1), the Edit 
  1366. command refreshes the window. 
  1367.  
  1368. The following routine is the First routine. 
  1369.  
  1370. Continue 
  1371.  
  1372.  
  1373. ΓòÉΓòÉΓòÉ 21.9. Logic Flow ..... ΓòÉΓòÉΓòÉ
  1374.  
  1375.  First routine 
  1376.  
  1377. This routine is executed when the edit command is required to indicate the task 
  1378. to the first record in the table.  To make this possible, the routine transfers 
  1379. a minimum value, Blank, to the key field DCode.  In the present task, this 
  1380. routine is also used to bring the other fields down to Zero, so that if a new 
  1381. record is inputted, the fields will be empty. 
  1382.  
  1383. When an edit command is activated, this routine is executed automatically. 
  1384. After it is executed, a loop of Next and Display routines is executed, until 
  1385. the window is full. 
  1386.  
  1387.  Last routine 
  1388.  
  1389. This routine is executed when the edit command is required to indicate the task 
  1390. to the last record in the table.  For this to happen, the routine transfers a 
  1391. maximum value, "0 MaxStr", to the key field DCode.  In the present task, this 
  1392. routine is also used to bring the other fields to maximum . 
  1393.  
  1394. Next Page 
  1395.  
  1396.  
  1397. ΓòÉΓòÉΓòÉ <hidden> 30028 ΓòÉΓòÉΓòÉ
  1398.  
  1399.  Next routine.  This routine is executed in order to jump forward in the table. 
  1400. To make this possible the Read command Reads the Next record according to the 
  1401. key MainK.  If there are no more records I0 flag will be set to ON in "+" 
  1402. status.  The flag N1 will be set to ON and by this will notify the Edit command 
  1403. that it is on the last record. 
  1404.  
  1405.  Prev routine 
  1406.  
  1407. This routine enables you to scan the table backwards.  In order to do this, the 
  1408. Prev command reads the previous record according to the key, MainK. When no 
  1409. more records exist, I0 flag will be set to ON in "+" status.  The flag P1 is 
  1410. set to ON, indicating to the edit command that it is on the first record. 
  1411.  
  1412. Next Page 
  1413.  
  1414.  
  1415. ΓòÉΓòÉΓòÉ <hidden> 30031 ΓòÉΓòÉΓòÉ
  1416.  
  1417.  Display routine 
  1418.  
  1419. This routine is executed when the edit command has to present a record.  In 
  1420. order to do this, the routine finds the record using the Find command.  The 
  1421. display is automatic. 
  1422.  
  1423. Next Page 
  1424.  
  1425.  
  1426. ΓòÉΓòÉΓòÉ <hidden> 30032 ΓòÉΓòÉΓòÉ
  1427.  
  1428. When the last option is selected, the edit command automatically executes a 
  1429. loop to fill the window with records. 
  1430.  
  1431.  Exit routine 
  1432.  
  1433. When the user chooses to leave the edit command, the exit routine is executed. 
  1434. This routine turns off the flag E1 in order to retain the information about how 
  1435. you exited the edit command. 
  1436.  
  1437. Next Page 
  1438.  
  1439.  
  1440. ΓòÉΓòÉΓòÉ <hidden> 30034 ΓòÉΓòÉΓòÉ
  1441.  
  1442.  Exit- routine 
  1443.  
  1444. This routine is used to leave the edit command when you want to indicate a 
  1445. selection of a certain record.  A detailed explanation about this command will 
  1446. be presented later in the chapter. 
  1447.  
  1448.  Exit+ routine 
  1449.  
  1450. This routine is used to leave the edit command.  From this routine, you can 
  1451. execute different functions.  If the flag is turned on, returning to the edit 
  1452. command, as shown in the present case, the edit command will continue with the 
  1453. edit functions.  Further information about the use of this option is presented 
  1454. later. 
  1455.  
  1456. If you are using OpenWin version supporting SQL,  you will create an SQL 
  1457. Advanced Task in the SQL Table chapter 
  1458.  
  1459. If you are using OpenWin Light or non SQL OpenWin version you should continue 
  1460. in Non SQL Task 
  1461.  
  1462.  
  1463. ΓòÉΓòÉΓòÉ 22. Non SQL Application ΓòÉΓòÉΓòÉ
  1464.  
  1465. In the following chapters we will analyzed  the Workers application. 
  1466.  
  1467.  you should continue in Workers  table 
  1468.  
  1469.  
  1470. ΓòÉΓòÉΓòÉ 22.1. Workers table ΓòÉΓòÉΓòÉ
  1471.  
  1472.  Activate the  Table Definition module. and open  the file 'Workers .des'. 
  1473.  
  1474.  You will see the following  details: 
  1475.  
  1476.   Minimize this section to an icon. 
  1477.  
  1478. Next Page 
  1479.  
  1480.  
  1481. ΓòÉΓòÉΓòÉ <hidden> 31411 ΓòÉΓòÉΓòÉ
  1482.  
  1483.  Field definition 
  1484.  
  1485. In the Table Definition  module open the  Field  Definition section. You will 
  1486. see the following  details: 
  1487.  
  1488.   Minimize this section to an icon. 
  1489.  
  1490.  Next Page 
  1491.  
  1492.  
  1493. ΓòÉΓòÉΓòÉ <hidden> 31412 ΓòÉΓòÉΓòÉ
  1494.  
  1495.  Key definition 
  1496.  
  1497. In the Table Definition  module open the  Key  Definition section. You will see 
  1498. the following details: 
  1499.  
  1500.  Minimize this  section to an icon. 
  1501.  
  1502.  We have already built the physical table for you, so you  won't need to build 
  1503. it again. 
  1504.  
  1505. Continue 
  1506.  
  1507.  
  1508. ΓòÉΓòÉΓòÉ 22.2. Tasks building ΓòÉΓòÉΓòÉ
  1509.  
  1510.  Source Generator 
  1511.  
  1512.  Activate the  Source Generator  module. Select  the Generate Input Task 
  1513. option. Select Workers.DES file.  Press O.K. for the name Workers. Select the 
  1514. "Dialog"   Option. Within a few seconds an OpenWin Task named  Workers.ARS will 
  1515. be created automatically, which will enable  you to update the Workers table. 
  1516.  
  1517.  Close the Source  Generator module window . 
  1518.  
  1519.  To activate the task which you  have created, you must complete the build 
  1520. stage. 
  1521.  
  1522.   Activate the  Definition  Tasks module and open the file 'Workers.ars'. 
  1523.  
  1524.  Activate  the  Build Tasks module. 
  1525.  
  1526.  Within a few seconds an executable task called Workers.TSK  will be created. 
  1527.  
  1528. Close the Build Task module 
  1529.  
  1530. Before you analyze and modify the task, you can run it to see how this task 
  1531. functions. To do that activate the  Run module. Use Quit option to end the task 
  1532. run. 
  1533.  
  1534. Continue 
  1535.  
  1536.  
  1537. ΓòÉΓòÉΓòÉ 22.3. Non SQL Workers Task ΓòÉΓòÉΓòÉ
  1538.  
  1539. In this chapter you will analyze the Workers.ARS task, which is a Data Entry 
  1540. task for a Workers table, without using the Edit Command. 
  1541.  
  1542. Please close the  Table Definition Module by selecting the EXIT option. 
  1543.  
  1544. Make sure you are in the  Edit Tasks module and that the Workers.ARS task is 
  1545. opened. 
  1546.  
  1547.  Continue 
  1548.  
  1549.  
  1550. ΓòÉΓòÉΓòÉ 22.4. Non SQL Logic Flow ΓòÉΓòÉΓòÉ
  1551.  
  1552. Enter the  Logic Flow  window. 
  1553.  
  1554. You will see the following lines at the beginning - 
  1555.  
  1556. Next Page 
  1557.  
  1558.  
  1559. ΓòÉΓòÉΓòÉ <hidden> 31002 ΓòÉΓòÉΓòÉ
  1560.  
  1561.  You already know what the New-Scr line is. 
  1562.  
  1563.  The Setoff commands sets initial status OFF for some flags.  The Q5 flag is 
  1564. used as the main While loop conditions. 
  1565.  
  1566.  The Put-Lin lines calls the MAIN window and the Menu window to the screen. 
  1567.  
  1568.  The next lines Displays the MAIN window (with the contents of the first 
  1569. record). 
  1570.  
  1571.  The "While" command begins a loop that continues as long as the "NotQuit" 
  1572. range terms are true.  This is the main loop for this task. 
  1573.  
  1574.  Following is a Dialog in which there are two Accept commands:  Accept  * 
  1575. Action  and Accept * Repeat.  The Dialog allows the execution of more than one 
  1576. Accept simultaneously. 
  1577.  
  1578.  In the Accept * Action line you are asked to click on one of the buttons to 
  1579. indicate the operation you wish to perform. 
  1580.  
  1581.  To understand how this is done open the section Design window.  Click with the 
  1582. mouse on the Menu window to bring it up, 
  1583.  
  1584.  then click on the radio button called "0 Action". 
  1585.  
  1586. Now you can open the Object Details by clicking on its icon from the tool bar. 
  1587.  
  1588. You will see that  this button is a Char (string) local variable and that it is 
  1589. grouped with the * Action sub-screen. 
  1590.  
  1591.  Minimize the  window design window and return to the Logic Flow. 
  1592.  
  1593.  The  Accept command here will wait for the user to click on a  button. 
  1594.  
  1595.  When a button is pushed the Accept ends and the  button field's value is set 
  1596. to the chosen option. 
  1597.  
  1598.  The  options are defined in the "Input Field" field: ActLst. 
  1599.  
  1600.  If the Q5 flag is ON (accept aborted), you quit the loop. 
  1601.  
  1602.  The following "Switch" command begins a switch to allow  use of "Case" blocks 
  1603. for different selections. The Switch  parameter is the local variable "0 
  1604. Action", whose value is  set by the user selection. If the value of the 
  1605. following  "Case" commands meets this value, the following block is  executed. 
  1606.  
  1607.  You can see that each "Case" performs  routines. We will take a look at some 
  1608. of these routines. 
  1609.  
  1610.  Continue 
  1611.  
  1612.  
  1613. ΓòÉΓòÉΓòÉ 22.5. Non SQL Next Routine ΓòÉΓòÉΓòÉ
  1614.  
  1615. The Next routine. 
  1616.  
  1617. The First and Last  cases initialize or minimize the table fields and designate 
  1618. the first or last record as the current record. 
  1619.  
  1620.  In order  to understand these cases you will analyze the Next routine: 
  1621.  
  1622.  The read  command tries to read the next record. 
  1623.  
  1624.  If the read  fails, I0 is set to ON in + status. Then, after  performing 
  1625. I/O_ok routine, If the read has failed we set the  N1 flag to ON to indicate 
  1626. that there is no next record. 
  1627.  
  1628.  Look at the First, Last and Prev routines (Cases). These  are all simple 
  1629. routines used to scroll through the file. 
  1630.  
  1631.   Note that you have seen similar routines in the Depart Task. 
  1632.  
  1633. Continue 
  1634.  
  1635.  
  1636. ΓòÉΓòÉΓòÉ 22.6. Non SQL Insert Routine ΓòÉΓòÉΓòÉ
  1637.  
  1638. The Insert Case. 
  1639.  
  1640. Unlike a Depart  Task, where the EDIT command did a great deal of the editing 
  1641. work, in this task you handle all operations related to  editing, such as 
  1642. keeping the right key value, etc. 
  1643.  
  1644.  The  insert routine itself is similar to the one in Depart task. 
  1645.  
  1646.  The Add case does what the Edit command did in depart  task. 
  1647.  
  1648.  You can see that if "Add" is selected, you enter a  loop calling Insert 
  1649. routine. This loop will continue as long  as you do not abort the insert. 
  1650.  
  1651.  When the user presses  ESC, or if there is an error, the I1 flag will turn ON 
  1652. and  the program will quit the loop, find the current record,  display it and 
  1653. quit the insert (Add) case. 
  1654.  
  1655. The  Update and the Delete routines are quite similar. 
  1656.  
  1657. Continue 
  1658.  
  1659.  
  1660. ΓòÉΓòÉΓòÉ 22.7. Non SQL Validity test ΓòÉΓòÉΓòÉ
  1661.  
  1662. Now you will begin to modify the  task and customize it according to your 
  1663. needs. 
  1664.  
  1665.  The first  change you will make is to enable you to enter only existing 
  1666. departments. To do this, you must specify that the task uses  the Depart table. 
  1667.  
  1668. In the defined task module open the   Table section Add the table Depart, 
  1669. giving it  "2" as an identifier. The window will appear as follows: 
  1670.  
  1671. Next Page 
  1672.  
  1673.  
  1674. ΓòÉΓòÉΓòÉ <hidden> 31006 ΓòÉΓòÉΓòÉ
  1675.  
  1676. Enter the   window design section and arrange the "MAIN" window so that  it 
  1677. appears as follows:   (First increase its height and then drag the fields to 
  1678. the  requested positions.) 
  1679.  
  1680. Next Page 
  1681.  
  1682.  
  1683. ΓòÉΓòÉΓòÉ <hidden> 31007 ΓòÉΓòÉΓòÉ
  1684.  
  1685. Now add a new field to the window. Select the Field,  Append option and add the 
  1686. field 2 DName as follows- 
  1687.  
  1688. Next Page 
  1689.  
  1690.  
  1691. ΓòÉΓòÉΓòÉ <hidden> 31008 ΓòÉΓòÉΓòÉ
  1692.  
  1693.  Then place the field next to the 1 DCode field, so the MAIN  window appears as 
  1694. follows: 
  1695.  
  1696. Next Page 
  1697.  
  1698.  
  1699. ΓòÉΓòÉΓòÉ <hidden> 31009 ΓòÉΓòÉΓòÉ
  1700.  
  1701. Indicate 1DCode as the chosen field and update it. Change (Select  Field - 
  1702. Update ) the sub-screen from DATA to DATA1. 
  1703.  
  1704. Save the window design changes by pressing O.K at the  top of the window and 
  1705. minimize the window design section. 
  1706.  
  1707. Now you need to make some changes at the  logic flow section. 
  1708.  
  1709. Next Page 
  1710.  
  1711.  
  1712. ΓòÉΓòÉΓòÉ <hidden> 31010 ΓòÉΓòÉΓòÉ
  1713.  
  1714.  First, change the  display routine so that it appears as follows: 
  1715.  
  1716.  Then change Disp* routine so that it appears as follows: 
  1717.  
  1718.  As a result of these changes, each time the display routine is activated you 
  1719. find the department name in the Depart table (2) and display it next to the 
  1720. department code. 
  1721.  
  1722.  Now you will modify the AccData routine so that it allows you to enter only an 
  1723. existing department code. 
  1724.  
  1725.  By changing this routine you will control department code entry during Insert 
  1726. and Update as well, since this routine is called from the insert and update 
  1727. routines. 
  1728.  
  1729. In order to nullify the department name field when entering new record, add the 
  1730. following highlighted line to First routine as follows - 
  1731.  
  1732. In order to keep display and data integrity, change FindCur routine Perform 
  1733. *Disp line to Perform  Display as follows - 
  1734.  
  1735. Next Page 
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ <hidden> 31011 ΓòÉΓòÉΓòÉ
  1739.  
  1740. Change AccData  routine so that it appears as follows: 
  1741.  
  1742. Don't forget to specify the AcEnd label at the end of the first line. 
  1743.  
  1744.  This routine accepts the department code and then checks  to see if such a 
  1745. department code exists in table 2 (the  Depart table). 
  1746.  
  1747.  This routine does not allow you to type  in a wrong code. 
  1748.  
  1749.  If you press ESC during the code input  (the Accept * DATA1 command ), the 
  1750. flag A2 will be turned on  and the routine will return to the calling routine 
  1751. with that  information. 
  1752.  
  1753.  Save the task, build it in the Build Tasks  module and run it. 
  1754.  
  1755.  You will see the effects of all the  changes you have made. 
  1756.  
  1757. End the task run by selecting the Quit option. 
  1758.  
  1759.  Continue 
  1760.  
  1761.  
  1762. ΓòÉΓòÉΓòÉ 22.8. Non SQL Linked Tasks ΓòÉΓòÉΓòÉ
  1763.  
  1764. As you see, it is not convenient for you to input  Workers, because you must 
  1765. type in the right department code  and you do not normally know the department 
  1766. codes. OpenWin  will open a department code window for you. 
  1767.  
  1768. Make sure you are in the  Edit Tasks module, and that the Workers.ARS task is 
  1769. opened. 
  1770.  
  1771.  Add an  new range in the range window - 
  1772.  
  1773. Next Page 
  1774.  
  1775.  
  1776. ΓòÉΓòÉΓòÉ <hidden> 31013 ΓòÉΓòÉΓòÉ
  1777.  
  1778. Now make a slight change in "AccData"  routine so that it appears as follows: 
  1779.  
  1780.  Next Page 
  1781.  
  1782.  
  1783. ΓòÉΓòÉΓòÉ <hidden> 31014 ΓòÉΓòÉΓòÉ
  1784.  
  1785.  The "If  NoCode" command checks to see if you have left the field 1  DCode 
  1786. empty. If not, the flow will continue from the DTest  label. 
  1787.  
  1788.  If it is empty, the callers will call a Depart  task. The shared flag Z1 is 
  1789. affected by the way in which you  exit the Depart task. If it is OFF (=), 
  1790. meaning no selection  has been made, the 1 DCode value will not change. 
  1791.  
  1792.  If a  selection has been made, move the value of 2 DCode field to  1 DCode. 
  1793. Because you have indicated that Depart table is  shared by the two tasks, the 
  1794. values of the 2 DCode field  will be as they were at the end of the Depart task 
  1795. execution. 
  1796.  
  1797.  Save and build the task. Activate the    Link Tasks  module. 
  1798.  
  1799.  Select the "File - Link"  option. 
  1800.  
  1801.  Type "Workers.tsk" as the source task name. 
  1802.  
  1803.   Type Workers1.tsk as the target task name. 
  1804.  
  1805.  Click on the  "LINK" button. At the end of the linking procedure, exit the 
  1806. Link task module. 
  1807.  
  1808.  Note: from this point on, if you  modify a Workers task or a Depart task, you 
  1809. must re-link the  Workers.tsk after you build it. 
  1810.  
  1811.  In order to see how the  linked task works, you need to run it, but our menu 
  1812. runs  Workers.tsk tasks. 
  1813.  
  1814.  Next Page 
  1815.  
  1816.  
  1817. ΓòÉΓòÉΓòÉ <hidden> 31015 ΓòÉΓòÉΓòÉ
  1818.  
  1819. In the  Environment Definition  module open the  Application Menu section 
  1820. window,  and change the line: 
  1821.  
  1822.  to: 
  1823.  
  1824.  Save the file,  build the environment and run the task  through the menu. 
  1825.  
  1826.  You will see that now, if you don't  know the department code you can leave it 
  1827. empty and then  choose it from the department list. 
  1828.  
  1829.  Quit the task and close the Run window. 
  1830.  
  1831.  Close the  Environment Definition Module by selecting the EXIT option. 
  1832.  
  1833.  Continue 
  1834.  
  1835.  
  1836. ΓòÉΓòÉΓòÉ 22.9. GUI fields in Non SQL Task ΓòÉΓòÉΓòÉ
  1837.  
  1838. In this chapter you will make  a small change in the Workers task to show how 
  1839. to use the  GUI environment. 
  1840.  
  1841.  You will enable the user to fill the  "Sex" field from a list. 
  1842.  
  1843.  In the  Edit Tasks module, open a Workers.ARS  task. 
  1844.  
  1845.  Add a  local  variable named Sexlst as follows: 
  1846.  
  1847.  Notice that you have set the  Repetition Factor (R.F.) to two and defined two 
  1848. initial  values. 
  1849.  
  1850.  Next Page 
  1851.  
  1852.  
  1853. ΓòÉΓòÉΓòÉ <hidden> 31017 ΓòÉΓòÉΓòÉ
  1854.  
  1855. Now enter the   window design and change the  Input field and Style  of the 
  1856. field 1 ESex so that it appears as follows: 
  1857.  
  1858.  To make this  change you must give the field a focus by clicking  on it with 
  1859. the mouse. After this choose Field/Update from  the action bar. 
  1860.  
  1861. Make the change and confirm it by pressing accept . 
  1862.  
  1863.  Exit the window design (do not forget to press O.K.). 
  1864.  
  1865.   This change will enable the user to select the required sex  designation from 
  1866. the list. 
  1867.  
  1868.  Assume you want to define the  default sex as female during the insert 
  1869. operation. 
  1870.  
  1871.   Next Page 
  1872.  
  1873.  
  1874. ΓòÉΓòÉΓòÉ <hidden> 31018 ΓòÉΓòÉΓòÉ
  1875.  
  1876. Add two lines to the task  logic Flow in the insert routine immediately 
  1877. following the "Perform First" line so that it appears as follows: 
  1878.  
  1879.  Note the use of one of the Vector Commands, VSetInx. 
  1880.  
  1881.  After you have set the current value of 0Sexlst, move it to 1ESex as the 
  1882. default value. 
  1883.  
  1884.  Save your task  Build,  Link and  run it  From the Menu (to run the menu 
  1885. select the  Run Time option from OpenWin main menu (folder)). 
  1886.  
  1887.  You will see that the user can select the sex designation from the defined 
  1888. list. 
  1889.  
  1890.  Continue 
  1891.  
  1892.  
  1893. ΓòÉΓòÉΓòÉ 22.10. Non SQL Header and Trailer ΓòÉΓòÉΓòÉ
  1894.  
  1895. Up to this point,  you have created a task enabling you to update workers and 
  1896. department data. The next step in the application is to  enable the user to 
  1897. update the work hours for each Worker.  The first step will be to define a 
  1898. TimeCard table as follows: 
  1899.  
  1900.  Activate  the  Define Tables  module. 
  1901.  
  1902. Select New option. 
  1903.  
  1904.  Define the General Settings 
  1905.  
  1906. Activate the  General  Settings section and fill it in as follows: 
  1907.  
  1908.  Click on OK and minimize  this window to an icon. 
  1909.  
  1910.  Next  Page 
  1911.  
  1912.  
  1913. ΓòÉΓòÉΓòÉ <hidden> 31021 ΓòÉΓòÉΓòÉ
  1914.  
  1915.  Field  definition 
  1916.  
  1917. Activate the  fields definition section and fill it in  as follows: 
  1918.  
  1919.  Minimize this window to an icon. 
  1920.  
  1921. Next Page 
  1922.  
  1923.  
  1924. ΓòÉΓòÉΓòÉ <hidden> 31022 ΓòÉΓòÉΓòÉ
  1925.  
  1926.  Key definition 
  1927.  
  1928. Activate the  Key Definition section and fill it in as  follows: 
  1929.  
  1930.   Save the file as TimeCard, and build it 
  1931.  
  1932.  Use the   source generator  to create an input task called "TimeCard". 
  1933.  
  1934.  Select  the Edit Window format for this task. 
  1935.  
  1936. Open the  Edit Tasks module and open the file TimeCard.ARS. 
  1937.  
  1938.  Build  the task "TimeCard". 
  1939.  
  1940.  Now you have a  task that can handle the TimeCard table. 
  1941.  
  1942. Close the  Table Definition Module by selecting the EXIT option. 
  1943.  
  1944. Continue 
  1945.  
  1946.  
  1947. ΓòÉΓòÉΓòÉ 22.11. Non SQL Header and Trailer .. ΓòÉΓòÉΓòÉ
  1948.  
  1949. Make sure you are in the  Edit Tasks module and open the Workers.ARS task, add 
  1950. an  local variable as follows: 
  1951.  
  1952.  Now change the repetition factor of the ActLst variable to 10 and add "Log" to 
  1953. its appearances in the initial value: 
  1954.  
  1955. Next Page 
  1956.  
  1957.  
  1958. ΓòÉΓòÉΓòÉ <hidden> 31024 ΓòÉΓòÉΓòÉ
  1959.  
  1960. Now you need to change the  logic flow so that it will call the TimeCard task 
  1961. when Log selection is made. 
  1962.  
  1963.  Add a new "Case" after the "Switch 0 Action" command: 
  1964.  
  1965.  This "Case" (routine) is activated when the "0 HWin" value (Log) meets the 
  1966. value of the 0 Action field. 
  1967.  
  1968.  Save,  build,  link and run the task from the Menu (to run the menu select the 
  1969. Run Time option from OpenWin main menu (folder)). 
  1970.  
  1971.  Note that when you click the Log option you enter the TimeCard task and you 
  1972. can update the TimeCard table. 
  1973.  
  1974.  You will find, however, that your task will not do exactly what you want it 
  1975. to. 
  1976.  
  1977.  1.You must type a Worker ID in each line. 
  1978.  
  1979.  2. You can view lines (working hours) that do not belong to this Worker. 
  1980.  
  1981.  A few changes will complete your task. 
  1982.  
  1983. Continue 
  1984.  
  1985.  
  1986. ΓòÉΓòÉΓòÉ <hidden> 31026 ΓòÉΓòÉΓòÉ
  1987.  
  1988. First we will take care at data integrity 
  1989.  
  1990. Make sure you are in the  Edit Tasks module, and that the file Workers.ARS is 
  1991. opened. 
  1992.  
  1993. Add the table TIMECARD in the tables definition section - 
  1994.  
  1995. Now add the following lines to the Delete routine- 
  1996.  
  1997. As a result of this change, each time you delete a worker record, you will also 
  1998. delete all its trailing records in TIMECARD table. 
  1999.  
  2000. Next Page 
  2001.  
  2002.  
  2003. ΓòÉΓòÉΓòÉ 22.12. Non SQL Header and Trailer ... ΓòÉΓòÉΓòÉ
  2004.  
  2005. In the   Edit Tasks module, open the file TimeCard.ARS. 
  2006.  
  2007.  First change the windows. Enter the  Window design section. 
  2008.  
  2009. Drag the window top frame up so you will see the fields in it. 
  2010.  
  2011.  Select a color  from the Colors Window and change the color's field. 
  2012.  
  2013.  Select the  1ECode field within the MAIN window and delete it. 
  2014.  
  2015. Drag the window top frame down  so the window will be only one line height. 
  2016.  
  2017.   By making this change you prevent the user from typing in an  Worker ID 
  2018. during input. 
  2019.  
  2020.  (Click on OK before you minimize  the window design) 
  2021.  
  2022. Next Page 
  2023.  
  2024.  
  2025. ΓòÉΓòÉΓòÉ <hidden> 31030 ΓòÉΓòÉΓòÉ
  2026.  
  2027. Now relate the task to the current Worker. 
  2028.  
  2029.  In order to  get the current Worker's ID, define the Workers table as a 
  2030. shared table. 
  2031.  
  2032.  Open the   Table section. Add the Table Workers, giving it  "2" as identifier. 
  2033. The window will appear as follows: 
  2034.  
  2035.  Now let the  user see only those work Hours that are related to the  current 
  2036. Worker. 
  2037.  
  2038.  Open the  Logic Flow section. 
  2039.  
  2040.  Change the  beginning of the "First" routine so that it appears as  follows: 
  2041.  
  2042.  Next Page 
  2043.  
  2044.  
  2045. ΓòÉΓòÉΓòÉ <hidden> 31031 ΓòÉΓòÉΓòÉ
  2046.  
  2047. As a result of this change, when the  First routine is executed only lines 
  2048. having to do with the  current Worker Id or a greater Id are read . 
  2049.  
  2050.  You need to  change the Last routine so that the maximum Worker Id will  not 
  2051. be greater than the current Worker Id. 
  2052.  
  2053.  Change the  beginning of the "Last" routine so that it appears as  follows 
  2054.  
  2055.   Next Page 
  2056.  
  2057.  
  2058. ΓòÉΓòÉΓòÉ <hidden> 31032 ΓòÉΓòÉΓòÉ
  2059.  
  2060. You know that the "Next" and "Prev" routines  are used to read the next or 
  2061. previous record. You need to  change these routines to ensure that when you 
  2062. read a record  you read only those records that are related to the current 
  2063. worker. 
  2064.  
  2065.  Change the "Next" routine so that it appears as  follows: 
  2066.  
  2067.   As a result of this change, if a record is read ( N1 flag is  = OFF), you 
  2068. compare the value of 2 ECode with 1 ECode field.  You use the N1 flag to get 
  2069. the result of the comparison . 
  2070.  
  2071.  If the record has a worker Id that is greater than the  current one, the N1 
  2072. flag will be set to ON and the Edit  command will act as if this is the last 
  2073. record. 
  2074.  
  2075. Next Page 
  2076.  
  2077.  
  2078. ΓòÉΓòÉΓòÉ <hidden> 31033 ΓòÉΓòÉΓòÉ
  2079.  
  2080.  You need to change the "Prev"  routine as well. 
  2081.  
  2082.  Change "Prev" routine so that it  appears as follows: 
  2083.  
  2084.  The last change to be made in  this task is to establish that when a new work 
  2085. hours line is  added, the default date will be the current date. To do  this, 
  2086. you first add an   local variable called DumTime, as follows: 
  2087.  
  2088. (The  initial value should be 00:00:00;) 
  2089.  
  2090. Next Page 
  2091.  
  2092.  
  2093. ΓòÉΓòÉΓòÉ <hidden> 31034 ΓòÉΓòÉΓòÉ
  2094.  
  2095. Now add the command Get-Dat to the insert routine after the "Perform . . First" 
  2096. line so that it appears as follows- 
  2097.  
  2098.  This command will set the value of the 1WDate field to the current date. 
  2099.  
  2100.  Save  Build the TimeCard task. 
  2101.  
  2102. Link  the Workers task, and run it from the Menu (to run the menu select the 
  2103. Run Time option from OpenWin main menu (folder)).  Now the task does what it's 
  2104. supposed to. 
  2105.  
  2106.  Continue 
  2107.  
  2108.  
  2109. ΓòÉΓòÉΓòÉ 22.13. Non SQL Report ΓòÉΓòÉΓòÉ
  2110.  
  2111.  In this chapter we will create and modify a report-printing  (to a printer or 
  2112. the screen) TimeCard table. 
  2113.  
  2114.  Next Page 
  2115.  
  2116.  
  2117. ΓòÉΓòÉΓòÉ <hidden> 31102 ΓòÉΓòÉΓòÉ
  2118.  
  2119. Activate the   Source Generator  module.  Select the Generate Report Task 
  2120. option. Select the TimeCard.DES file and define the task name as "RTimeC". 
  2121.  
  2122.  After generation, make sure you are in the  Edit Tasks module, open the file 
  2123. RTimeC.ARS. 
  2124.  
  2125.  build the RTimeC task with the build tasks module. 
  2126.  
  2127.  Run it through the menu to see the report. 
  2128.  
  2129.  Next Page 
  2130.  
  2131.  
  2132. ΓòÉΓòÉΓòÉ <hidden> 31103 ΓòÉΓòÉΓòÉ
  2133.  
  2134. Now modify the report task so it will print the  total number of hours for each 
  2135. Worker in Hour and day  formats. 
  2136.  
  2137.  Make sure you are in the  Task Definition module and that the file  RTimeC.ARS 
  2138. is opened. 
  2139.  
  2140.  Add two   local variables as follows: 
  2141.  
  2142.   Now add a  sub total definition as follows: 
  2143.  
  2144.  Enter  the  window design section. 
  2145.  
  2146.  Add a New window named CodeT as follows - 
  2147.  
  2148.  Add 0 Hours  and 0 Days fields  to this window. Specify their sub-screen to be 
  2149. Tot 
  2150.  
  2151.  The window will look like this - 
  2152.  
  2153.  Now you will make  some changes in the task logic flow to use this sub-totals 
  2154. definition. 
  2155.  
  2156.  Next Page 
  2157.  
  2158.  
  2159. ΓòÉΓòÉΓòÉ <hidden> 31104 ΓòÉΓòÉΓòÉ
  2160.  
  2161. Enter the task  logic flow. 
  2162.  
  2163.  First, add a Break  command after the QtLoop command as follows: 
  2164.  
  2165.  As a result,  each time a record is read the Code sub-totaling is  executed. 
  2166. Look at the Sub-totals to understand when the  InitC and TotC routines will be 
  2167. executed. 
  2168.  
  2169. Next Page 
  2170.  
  2171.  
  2172. ΓòÉΓòÉΓòÉ <hidden> 31105 ΓòÉΓòÉΓòÉ
  2173.  
  2174. Now you need to  define these two routines as follows: 
  2175.  
  2176. Save the task, build it in the Build Tasks module and run the application from 
  2177. the menu (to run the menu select the  Run Time option from OpenWin main menu 
  2178. (folder)). 
  2179.  
  2180. You will see the effects  of all the changes you have made. 
  2181.  
  2182. You have completed the tutorial application. We hope you will enjoy your work 
  2183. with OpenWin. 
  2184.  
  2185.  Back to Start 
  2186.  
  2187.  
  2188. ΓòÉΓòÉΓòÉ 23. SQL Tables definition ΓòÉΓòÉΓòÉ
  2189.  
  2190. The second phase of building Employee application is defining Employee table. 
  2191.  
  2192. If you are using OpenWin Light or non SQL OpenWin version you should continue 
  2193. in Non SQL Task chapter. 
  2194.  
  2195. Activate the  Definition module.  Select the  Table Definition module. When 
  2196. entering the module, you must choose the option File and indicate that you are 
  2197. defining a new file. To do this, select the option New 
  2198.  
  2199.  General Settings 
  2200.  
  2201. Activate the Table Definition module   General Settings  section and fill it in 
  2202. as follows- 
  2203.  
  2204. Minimize this window to an icon. 
  2205.  
  2206. Next Page 
  2207.  
  2208.  
  2209. ΓòÉΓòÉΓòÉ <hidden> 30008 ΓòÉΓòÉΓòÉ
  2210.  
  2211.  Field definition 
  2212.  
  2213. Activate the  Field Definition section and fill it in as follows- 
  2214.  
  2215. Minimize this window to an icon. 
  2216.  
  2217. Next Page 
  2218.  
  2219.  
  2220. ΓòÉΓòÉΓòÉ <hidden> 30009 ΓòÉΓòÉΓòÉ
  2221.  
  2222.  Key definition 
  2223.  
  2224. Activate the  Key Definition section and fill it in as follows- 
  2225.  
  2226. Minimize this window to an icon. 
  2227.  
  2228. Select the option File  and in it the option Save.  Type Employee as the file 
  2229. name and save the file.  Close the table definition window. 
  2230.  
  2231. The next phase is building tables. 
  2232.  
  2233. Continue 
  2234.  
  2235.  
  2236. ΓòÉΓòÉΓòÉ 23.1. Tables building ΓòÉΓòÉΓòÉ
  2237.  
  2238.  Build tables 
  2239.  
  2240. This  module checks your table definition and creates physical tables that are 
  2241. ready for work. 
  2242.  
  2243. Since an Employee table is an RDBMS table, you need to create the data base in 
  2244. which the table will be created. 
  2245.  
  2246. Open the the Query Manager and create a new database named OpenWin. 
  2247.  
  2248. Activate the Build Tables module and choose Employee.DES table. 
  2249.  
  2250. The table definition will be checked in a few seconds.  If you have made any 
  2251. errors, they will be presented on the screen.  Correct the errors and repeat 
  2252. the check. 
  2253.  
  2254. Now you can use the Automatic Program Creation  option. 
  2255.  
  2256. Continue 
  2257.  
  2258.  
  2259. ΓòÉΓòÉΓòÉ 23.2. Task generation ΓòÉΓòÉΓòÉ
  2260.  
  2261. Activate the   Source Generator  module.  Select the Generate Input Task 
  2262. option. Select Employee.DES file.  Press O.K.  for the name Employee. Select 
  2263. the  "Dialog" Option.  In a few seconds , an OpenWin Task named Employee.ARS 
  2264. will be created automatically, which will enable you to update the Employees 
  2265. table.  You will be informed that a table named IEmploye.DES has been created. 
  2266. Build it with the build tables module. 
  2267.  
  2268. Close the Task generation module window . To activate the tasks you have 
  2269. created, you must compile them. 
  2270.  
  2271. Continue 
  2272.  
  2273.  
  2274. ΓòÉΓòÉΓòÉ 23.3. Tasks building ΓòÉΓòÉΓòÉ
  2275.  
  2276. To activate the tasks which you have created, you must perform the build stage. 
  2277. Activate the  Build Tasks module. 
  2278.  
  2279. Choose the program Employee.ARS.  In a few seconds an executable task will be 
  2280. created, called Employee.TSK. 
  2281.  
  2282. Close the Build Task module window. 
  2283.  
  2284. You can run the application through the menu and see this task behavior. 
  2285.  
  2286. Continue 
  2287.  
  2288.  
  2289. ΓòÉΓòÉΓòÉ 23.4. SQL Handling ΓòÉΓòÉΓòÉ
  2290.  
  2291. In this chapter you will analyze an Employee.ARS task, which is a Data Entry 
  2292. task, for the RDBMS (SQL) table Employee. 
  2293.  
  2294. Before you analyze and modify the task, activate the  Build task module on an 
  2295. Employee.ARS task.  Then activate  Run the task through the menu. 
  2296.  
  2297. You will see that you can add and update the Employee table.  You can also use 
  2298. the query option to view only a part of the data. 
  2299.  
  2300. The Employee.ARS task enables you to access data in the Employee table.  This 
  2301. task is also used to show how you can use different data handling methods 
  2302. simultaneously. 
  2303.  
  2304. The idea of this task is to use a temporary file to scroll through and update 
  2305. this file and the table simultaneously. 
  2306.  
  2307. Activate the  Definition module. Select the  Edit Tasks module and open an 
  2308. Employee.ARS task. 
  2309.  
  2310. Open the  Edit Task module   Table  section  In this window, the tables which 
  2311. the task handles are defined.  In this window you will see the following: 
  2312.  
  2313. Next Page 
  2314.  
  2315.  
  2316. ΓòÉΓòÉΓòÉ <hidden> 30040 ΓòÉΓòÉΓòÉ
  2317.  
  2318. Although you are working with the Employee table, you can see two tables here- 
  2319. IEmploye and Employee.  IEmploye is a temporary table, created by the source 
  2320. generator.  All data handling and scrolling in this task is done on the 
  2321. temporary file IEmploye.  When data are entered, this file is updated and an 
  2322. SQL Query is executed to update the real database.  When a Select Query is 
  2323. executed, the output is written in this temporary file. 
  2324.  
  2325. This method enables quick scrolling through a chosen range of data.  Of course 
  2326. this is only one possible way of handling data from a RDBMS table. 
  2327.  
  2328. Continue 
  2329.  
  2330.  
  2331. ΓòÉΓòÉΓòÉ 23.5. SQL Logic Flow ΓòÉΓòÉΓòÉ
  2332.  
  2333. Enter the  Logic Flow window. 
  2334.  
  2335. At the beginning of the flow, you will see the following lines - 
  2336.  
  2337. We already know what the New-Scr line is. 
  2338.  
  2339. The Setoff commands sets initial status OFF for some flags. Q5 flag is used as 
  2340. the main While loop conditions. 
  2341.  
  2342. Z5 flag is used to indicate if the database is changed and needs a Commit query 
  2343. to be executed when the task ends. M0 is set to ON only if the "Root" range is 
  2344. true.  This flag is used to indicate that this is a root task. As a result, In 
  2345. case of linked tasks, the Commit query in "IfChange" routine is executed at the 
  2346. end of the task only at the root task execution end. This in done because 
  2347. Commit and Rollback queries close all the open cursors off a session, what we 
  2348. don't want to happen during a linked called task execution. 
  2349.  
  2350. The Put-Lin lines puts  MAIN window and Menu window on the screen. 
  2351.  
  2352. The next lines Displays a MAIN window (with the contents of the first record). 
  2353.  
  2354. The "While" command begins a loop that continues as long as the "NotQuit" range 
  2355. terms are true.  This is the main loop for this task. 
  2356.  
  2357. Following is a Dialog in which there are two Accept commands - Accept * Action 
  2358. and Accept * Repeat. The Dialog enables the execution of more than one Accept 
  2359. simultaneously. 
  2360.  
  2361. In the Accept * Action line, the user is asked to click on one of the buttons 
  2362. to indicate the operation he wishes to perform. 
  2363.  
  2364. To understand how this is done, open the Window Design window.  Click with the 
  2365. mouse on the Menu window to bring it up.  You will see a field in a radio 
  2366. button format called "0 Action".  Click with the mouse on it and open the 
  2367. Object Details option from the action bar.  You will see that this button is an 
  2368. Char (string) local variable and that it is grouped to * Action sub-screen. 
  2369.  
  2370. Minimize the window design window and return to the Logic Flow. 
  2371.  
  2372. The Accept command here will wait for the user to click on a button. 
  2373.  
  2374. When the a button is pushed, the Accept ends and the button field's value is 
  2375. set to the chosen option. 
  2376.  
  2377. The options are defined in the "Input Field" field - ActLst. 
  2378.  
  2379. If Q5 flag is ON (accept aborted),  you quit the loop. 
  2380.  
  2381. The following "Switch" command begins a switch to enable use of "Case" blocks 
  2382. for different selections.  The Switch parameter is the local variable "0 
  2383. Action", whose value is set by the user selection.  If the value of the 
  2384. following "Case" commands meets this value, the following block is executed. 
  2385.  
  2386. You can see that each "Case" is performing routines. We will look at some of 
  2387. these routines. 
  2388.  
  2389. Continue 
  2390.  
  2391.  
  2392. ΓòÉΓòÉΓòÉ 23.6. Next  Routine ΓòÉΓòÉΓòÉ
  2393.  
  2394. The Next routine. 
  2395.  
  2396. The First and Last cases set the first or the last record of the temporary file 
  2397. as the current record. 
  2398.  
  2399. In order to understand these cases, you will analyze the Next routine - 
  2400.  
  2401. The read command tries to read the next record in the temporary file. If the 
  2402. read fails we set N1 flag to ON to indicate that there is no next record in the 
  2403. temporary file. 
  2404.  
  2405. Next Page 
  2406.  
  2407.  
  2408. ΓòÉΓòÉΓòÉ <hidden> 30042 ΓòÉΓòÉΓòÉ
  2409.  
  2410. The "If Fetch1" tests the status of N1 flag. If there is no next record we call 
  2411. Fetch1 routine which will be explained later, in which we try to Fetch another 
  2412. line from the Database. 
  2413.  
  2414. If Fetch1 routine fetched a line, it sets I0 flag to OFF so we set N1 flag to 
  2415. OFF as well to indicate that Next succeeded. 
  2416.  
  2417. Look at the First, Last and Prev routines (Cases).  These are all simple 
  2418. routines used to scroll through the temporary file. 
  2419.  
  2420. Notice that you have seen similar routines in the Depart Task.  The difference 
  2421. is that in the case of a temporary file, as in Relative, Sequential and Vector 
  2422. files, you indicate the record by the reserved key "RECORD" which is the record 
  2423. number. 
  2424.  
  2425. Continue 
  2426.  
  2427.  
  2428. ΓòÉΓòÉΓòÉ 23.7. Insert Routine ΓòÉΓòÉΓòÉ
  2429.  
  2430. The Insert routine. 
  2431.  
  2432. Unlike a Depart Task, where the EDIT command did a great deal of the editing 
  2433. work, in this task you handle all operations related to editing, such as 
  2434. keeping the right record number, etc. In this task we keep the last entered 
  2435. record number is a local variable called "0 Record". 
  2436.  
  2437. The purpose of the "Perform First " is to nullify the current record fields, 
  2438. before displaying the record. 
  2439.  
  2440. Look at #MAIN window in the window design.  You will see that the fields which 
  2441. the user is updating are the fields from table 1, the temporary IEmploye table, 
  2442. and that they are grouped into two sub screens, KEY and DATA. 
  2443.  
  2444. The data input to these sub-screens fields is done in AccKey and AccData 
  2445. routines. 
  2446.  
  2447. If the data entry stops, we set I1 flag to ON and quit the Insert routine. 
  2448.  
  2449. Next Page 
  2450.  
  2451.  
  2452. ΓòÉΓòÉΓòÉ <hidden> 30043 ΓòÉΓòÉΓòÉ
  2453.  
  2454. After the data has been entered in the Accept command, the following lines are 
  2455. executed: 
  2456.  
  2457. Next Page 
  2458.  
  2459.  
  2460. ΓòÉΓòÉΓòÉ <hidden> 30044 ΓòÉΓòÉΓòÉ
  2461.  
  2462. The Ex-Sql command sends to the database server the contents of the query 
  2463. "Insert" 
  2464.  
  2465. Open the  SQL Query Window and look at this query.  It will look this: 
  2466.  
  2467. The purpose of this query is to insert the values of the indicated fields into 
  2468. table 2 (the Employee table). 
  2469.  
  2470. Return to the logic flow. 
  2471.  
  2472. In the Ex-Sql command, you see that a local variable 0 SqErr was defined as the 
  2473. result parameter and that the flag Q1 is the result Flag. 
  2474.  
  2475. Since 0 SqErr value was set to 100 before the Ex-Sql command, an error message 
  2476. will be displayed in case of an error. 
  2477.  
  2478. Look at the Ex-Sql command in order to understand the use of the result flag. 
  2479.  
  2480. The Q1 flag can have the following values:  "=" (OFF), meaning the query has 
  2481. been executed successfully, "+" (ON), meaning a "good" SQL error, or "-" (ON), 
  2482. meaning a "bad" error. 
  2483.  
  2484. You can see that the lines following the Ex-Sql command will be executed only 
  2485. if there is no error, Else, we set I1 flag to ON and end the Insert routine. 
  2486.  
  2487. Next Page 
  2488.  
  2489.  
  2490. ΓòÉΓòÉΓòÉ <hidden> 30045 ΓòÉΓòÉΓòÉ
  2491.  
  2492. If there is no error, we set Z5 flag to ON.  This indicates that the database 
  2493. has been changed. As any other Zx flag, Z5 is a shared flag between tasks in 
  2494. cases of linked tasks. As a result, information indicating that database 
  2495. changes were made during a linked task execution will be returned through this 
  2496. flag to the root task, what will effect the execution of "IfChange" routine at 
  2497. the end of the task execution. 
  2498.  
  2499. The next line add 1 to the last temporary file record number that we keep in "0 
  2500. Record" variable and put the result in the temporary file RECORD number.  The 
  2501. following line write the data to the temporary file "IEmploye". 
  2502.  
  2503. If I/O is ok we save the new RECORD number in 0 Record variable. 
  2504.  
  2505. You can see in the "Case 0 Add" that is calling Insert routine that if the user 
  2506. does not abort the insert by pressing ESC, and there is no error, the flow will 
  2507. loop to enable another input. 
  2508.  
  2509. When the user presses ESC, or if there is an error, the I1 flag will turn ON 
  2510. and the program will quit the loop, find the current record, display it and 
  2511. quit the insert case. 
  2512.  
  2513. The Update and the Delete routines are quite similar. 
  2514.  
  2515. Continue 
  2516.  
  2517.  
  2518. ΓòÉΓòÉΓòÉ 23.8. QBE and Quit ΓòÉΓòÉΓòÉ
  2519.  
  2520. Query Case is calling QBE routine. 
  2521.  
  2522. The QBE routine enables the user to define a query to be executed as a Select 
  2523. query and retrieve data from the data base. 
  2524.  
  2525. Notice that in this task you have chosen to work on a temporary file in order 
  2526. to enable quick scrolling through data.  After the Select query, you will see 
  2527. an "Until 10Fetch " loop calling Fetch1 routine in which a "Fetch" query is 
  2528. executed and the retrieved data is moved and written to the temporary file. 
  2529.  
  2530. You may notice we are Fetching only the first 10 records. As we saw, more 
  2531. records will be Fetched if next routine will reach the end of the temporary 
  2532. file. 
  2533.  
  2534. Notice that Fetch1 routine saves the value of the last record written to the 
  2535. temporary file in "0 Record" variable. 
  2536.  
  2537. The Action selection loop ends in the following lines: 
  2538.  
  2539. Next Page 
  2540.  
  2541.  
  2542. ΓòÉΓòÉΓòÉ <hidden> 30046 ΓòÉΓòÉΓòÉ
  2543.  
  2544. We are calling Close routine to Close an open Select Query if there is such. he 
  2545. close query will be executed only if O5 flag is ON. 
  2546.  
  2547.  Following is the the IfChange routine -. 
  2548.  
  2549. IfChange" begins in an If command. 
  2550.  
  2551. As you saw in the "Insert" case, when you are updating the data, you set the 
  2552. value of Z5 flag to ON.  The purpose of this condition is to skip the Commit 
  2553. question, if no changes were made. 
  2554.  
  2555. If you look at "IfChange" range, you will see that it is true only if M0 flag 
  2556. is ON. We are setting this flag status to ON at the beginning of the task. 
  2557.  
  2558. The Message line asks the user if he wishes to commit the changes.  If the 
  2559. answer is Yes, Ex-Sql ?  Commit is executed.  If the answer is No, Ex-Sql ? 
  2560. RollBack is executed. 
  2561.  
  2562. Continue 
  2563.  
  2564.  
  2565. ΓòÉΓòÉΓòÉ 23.9. Validity test ΓòÉΓòÉΓòÉ
  2566.  
  2567. Now you will begin to modify the task and customize it to your needs. 
  2568.  
  2569. The first change you will make is to enable the user to enter only existing 
  2570. departments.  To do this, you must define that the task is using the Depart 
  2571. table. 
  2572.  
  2573. Open  Edit Tasks module   Table  section  Add the table Depart, giving it "3" 
  2574. as an identifier.  The window will:  look as follows 
  2575.  
  2576. Next Page 
  2577.  
  2578.  
  2579. ΓòÉΓòÉΓòÉ <hidden> 30047 ΓòÉΓòÉΓòÉ
  2580.  
  2581. Enter the  window design section and arrange the "MAIN" window so that it loos 
  2582. as follows-  (First increase its height and then drag the fields to the 
  2583. requested positions.) 
  2584.  
  2585. Next Page 
  2586.  
  2587.  
  2588. ΓòÉΓòÉΓòÉ <hidden> 30048 ΓòÉΓòÉΓòÉ
  2589.  
  2590. Now add a new field to the window.  Select the Field, Append option.  Add the 
  2591. field 3 DName as follows- 
  2592.  
  2593. Next Page 
  2594.  
  2595.  
  2596. ΓòÉΓòÉΓòÉ <hidden> 30095 ΓòÉΓòÉΓòÉ
  2597.  
  2598. Then place the field next to the 1 DCode field, so the MAIN window looks as 
  2599. follows 
  2600.  
  2601. Next Page 
  2602.  
  2603.  
  2604. ΓòÉΓòÉΓòÉ <hidden> 30050 ΓòÉΓòÉΓòÉ
  2605.  
  2606. Indicate 1DCode as the chosen field and update it.  Change (Select Field - 
  2607. Update ) the sub-screen from DATA to DATA1. 
  2608.  
  2609. Save the window design changes by pressing O.K at the top of the window, and 
  2610. minimize the window design section. 
  2611.  
  2612. Now you need to make some changes at the task  logic flow. 
  2613.  
  2614. First , change the display routine so that it looks as follows- 
  2615.  
  2616. Next Page 
  2617.  
  2618.  
  2619. ΓòÉΓòÉΓòÉ <hidden> 30051 ΓòÉΓòÉΓòÉ
  2620.  
  2621.  Then change Disp* routine to look like this - 
  2622.  
  2623. By making these changes, each time the display routine will be activated you 
  2624. find the department name in the Depart table (3) and display it next to the 
  2625. department code. 
  2626.  
  2627. Now you will modify the AccData routine so that it allows you to enter only an 
  2628. existing department code. 
  2629.  
  2630. By changing this routine you will control department code entry during Insert 
  2631. and Update as well since this routine is called from the insert and update 
  2632. routines. 
  2633.  
  2634. Next Page 
  2635.  
  2636.  
  2637. ΓòÉΓòÉΓòÉ <hidden> 30056 ΓòÉΓòÉΓòÉ
  2638.  
  2639. Change AccData routine to look as follows - 
  2640.  
  2641. We see that this routine accepts the department code and then checks to see if 
  2642. there is such a department code in table 3 (the Depart table). 
  2643.  
  2644. This routine does not allow the user to type in a wrong code. 
  2645.  
  2646. If the user presses ESC during the code input (the Accept * DATA1 command ), 
  2647. the flag A2 will be turned on and the routine will return to the calling 
  2648. routine with that knowledge. 
  2649.  
  2650. Save the task, build it in the Build Tasks module and run it. 
  2651.  
  2652. You will see the effects of all the changes you have  made. 
  2653.  
  2654. Continue 
  2655.  
  2656.  
  2657. ΓòÉΓòÉΓòÉ 24. Linked Tasks ΓòÉΓòÉΓòÉ
  2658.  
  2659. As you see, it is not convenient for the user to input employees because he 
  2660. must type in the right department code, and he does not normally know the 
  2661. department codes.  We will open a department code window for him. 
  2662.  
  2663. Activate the  Definition module. Select the  Edit Tasks module and open the 
  2664. Employee.ARS task. 
  2665.  
  2666. Add a   new range in the range window - 
  2667.  
  2668. Next Page 
  2669.  
  2670.  
  2671. ΓòÉΓòÉΓòÉ <hidden> 30058 ΓòÉΓòÉΓòÉ
  2672.  
  2673. Now make a slight change in "AccData" routine so that it looks as follows- 
  2674.  
  2675. Next Page 
  2676.  
  2677.  
  2678. ΓòÉΓòÉΓòÉ <hidden> 30059 ΓòÉΓòÉΓòÉ
  2679.  
  2680. The "If NoCode" command checks to see if the field 1 DCode has been left empty 
  2681. by the user.  If not, the flow will continue from the DTest label. 
  2682.  
  2683. If it is empty, The callers will call a Depart task.  The shared flag Z1 is 
  2684. affected by the way in which the user exits the Depart task.  If it is OFF (=), 
  2685. meaning no selection has been made and the 1 DCode value will not change. 
  2686.  
  2687. If selection has been made, move the value of 3 DCode field to 1 DCode. Because 
  2688. you indicated that Depart table is shared by the two tasks, the values of the 3 
  2689. DCode field will be as it was at the end of the Depart task execution. 
  2690.  
  2691. Save and build the task.  Activate the   Link Tasks  module. 
  2692.  
  2693. Select the "File - Link" option. 
  2694.  
  2695. Type "Employee.tsk" as the source task name. 
  2696.  
  2697. Type Employe1.tsk as the target task name. 
  2698.  
  2699. Click on the "LINK" button.  At the end of the linking procedure, exit the Link 
  2700. task module. 
  2701.  
  2702. Note:  from this point on, if you modify an Employee task or a Depart task, you 
  2703. must re-link the Employee.tsk after you build it. 
  2704.  
  2705. In order to see how the linked task works, you need to run it, but our menu 
  2706. runs Employee.tsk tasks. 
  2707.  
  2708. Next Page 
  2709.  
  2710.  
  2711. ΓòÉΓòÉΓòÉ <hidden> 30060 ΓòÉΓòÉΓòÉ
  2712.  
  2713. Activate the  Definition module. Select the  Environment Definition module and 
  2714. the  Application Menu section  window, and change the line: 
  2715.  
  2716. Save , build the environment and run the task through the menu. 
  2717.  
  2718. You will see that now, if the user does not know the department code, he can 
  2719. leave it empty and then choose it from the department list. 
  2720.  
  2721.  Continue 
  2722.  
  2723.  
  2724. ΓòÉΓòÉΓòÉ 25. GUI fields ΓòÉΓòÉΓòÉ
  2725.  
  2726. In this chapter you will make a small change in the Employee task, to show how 
  2727. to use the GUI environment. 
  2728.  
  2729. You will enable the user to fill the "Sex" field from a list. 
  2730.  
  2731. Activate the  Definition module. Select the  Edit Tasks module, and open an 
  2732. Employee.ARS task. 
  2733.  
  2734. Add a  local variable named Sexlst, as follows- 
  2735.  
  2736. Notice that you have set the Repetition Factor (R.F.)  to two ,and defined two 
  2737. initial values. 
  2738.  
  2739. Next Page 
  2740.  
  2741.  
  2742. ΓòÉΓòÉΓòÉ <hidden> 30061 ΓòÉΓòÉΓòÉ
  2743.  
  2744. Now enter the  window design and change the definition of the field 1 ESex as 
  2745. follows - 
  2746.  
  2747. Using the mouse, expand the field. 
  2748.  
  2749. Exit the window design (do not forget to press O.K.). 
  2750.  
  2751. This change will enable the user to select the required sex designation from 
  2752. the list. 
  2753.  
  2754. Assume you want to define the default sex as female during the insert 
  2755. operation. 
  2756.  
  2757. Next Page 
  2758.  
  2759.  
  2760. ΓòÉΓòÉΓòÉ <hidden> 30062 ΓòÉΓòÉΓòÉ
  2761.  
  2762. Add two lines to the task  logic Flow at the insert routine, immediately 
  2763. following the "Perform First" line so Insert routine will look as follows - 
  2764.  
  2765. Note the use of one of the Vector Commands, VSetInx. 
  2766.  
  2767. After you set the current value of 0Sexlst, you move it to 1ESex as the default 
  2768. value. 
  2769.  
  2770. Save your task,  Build,  Link and  run it . 
  2771.  
  2772. You will see that the user can select the sex designation from the defined 
  2773. list. 
  2774.  
  2775. Continue 
  2776.  
  2777.  
  2778. ΓòÉΓòÉΓòÉ 26. Header and Trailer ΓòÉΓòÉΓòÉ
  2779.  
  2780. Up to this point, you have created a task enabling you to update employee and 
  2781. department data.  The next step in the application is to enable the user to 
  2782. update the work hours of each employee. The first step will be to define an 
  2783. hours table, as follows- 
  2784.  
  2785. Activate the  Definition module. Select the  Define Tables module. 
  2786.  
  2787.  Defining General Settings 
  2788.  
  2789. Activate the  General Settings section and fill it in as follows- 
  2790.  
  2791. Click on OK and minimize this window  to an icon. 
  2792.  
  2793. Next Page 
  2794.  
  2795.  
  2796. ΓòÉΓòÉΓòÉ <hidden> 30063 ΓòÉΓòÉΓòÉ
  2797.  
  2798.  Field definition 
  2799.  
  2800. Activate the  fields definition section and fill it in as follows- 
  2801.  
  2802. Minimize this window to an icon. 
  2803.  
  2804. Next Page 
  2805.  
  2806.  
  2807. ΓòÉΓòÉΓòÉ <hidden> 30097 ΓòÉΓòÉΓòÉ
  2808.  
  2809.  Key definition 
  2810.  
  2811. Activate the  Key Definition section and fill it in as follows- 
  2812.  
  2813. Save the file as Hours. 
  2814.  
  2815. Use the   source generator  to create an input task called "Hours". 
  2816.  
  2817. Select the Edit Window format for this task. 
  2818.  
  2819. Build  the tables "Hours" and "IHours" that you create using the source 
  2820. generator. 
  2821.  
  2822. Build  the task "Hours" with the build tasks module. 
  2823.  
  2824. When you have a task that can handle an hours table, call it from the Employee 
  2825. task. 
  2826.  
  2827. Continue 
  2828.  
  2829.  
  2830. ΓòÉΓòÉΓòÉ 26.1. Header and Trailer .. ΓòÉΓòÉΓòÉ
  2831.  
  2832. Activate the  Definition module. Select the  Edit Tasks module, and open an 
  2833. Employee.ARS task. 
  2834.  
  2835. Add a  local variable, as follows- 
  2836.  
  2837. Now change the repetition factor of ActLst variable to 10 and add "Log" to its 
  2838. appearances in the initial value - 
  2839.  
  2840. Next Page 
  2841.  
  2842.  
  2843. ΓòÉΓòÉΓòÉ <hidden> 30066 ΓòÉΓòÉΓòÉ
  2844.  
  2845. Now you need to change the  logic flow so that it will call an Hours task when 
  2846. Log selection is made. 
  2847.  
  2848. Add a new "Case"  after the "Switch  0 Action" command - 
  2849.  
  2850. This  "Case" (routine) is activated when the "0 HWin" value (Log) will meet the 
  2851. value of 0 Action field. 
  2852.  
  2853. Save,  build,  link and run the task. 
  2854.  
  2855. Note that when you click the Log option , you enter the Hours task and you can 
  2856. update the hours table. 
  2857.  
  2858. You will find, however, that your task will not do exactly what you want it to. 
  2859.  
  2860. 1. You don't see the employee existing working hours when you enter the log 
  2861. window. You must select the Query option in order to do that. 
  2862.  
  2863. 2.You must type an Employee ID in each line. 
  2864.  
  2865. 3. You can view lines (working hours) that do not belong to this employee. 
  2866.  
  2867. A few changes in Hours tasks will complete your task. 
  2868.  
  2869. Continue 
  2870.  
  2871.  
  2872. ΓòÉΓòÉΓòÉ 26.2. Header and Trailer ... ΓòÉΓòÉΓòÉ
  2873.  
  2874. Activate the  Definition module. Select the  Edit Tasks module, open Hours.ARS 
  2875. task. 
  2876.  
  2877. First, add the following line to the logic flow before the "Loop" beginning- 
  2878.  
  2879.  Then,change the windows.  Enter the  Window design section. 
  2880.  
  2881. Select a color from the Colors Window (from the Option menu) and double click 
  2882. on MAIN window to change its color. 
  2883.  
  2884. Select the 1ECode field within the MAIN window and delete it. 
  2885.  
  2886. Select the QBE Window. 
  2887.  
  2888. Delete the four following fields from the window: 
  2889.  
  2890. By these changes you prevent the user from typing an employee ID during input 
  2891. and, or from defining an employee ID as part of the query terms, if he chooses 
  2892. the Query option in order to access data related to the employee. 
  2893.  
  2894. (Click on OK before you minimize the window design) 
  2895.  
  2896. Next Page 
  2897.  
  2898.  
  2899. ΓòÉΓòÉΓòÉ <hidden> 30098 ΓòÉΓòÉΓòÉ
  2900.  
  2901. Change the  local variables "0 Order" and "0 OrdList" as follows- 
  2902.  
  2903. Next Page 
  2904.  
  2905.  
  2906. ΓòÉΓòÉΓòÉ <hidden> 30067 ΓòÉΓòÉΓòÉ
  2907.  
  2908.  Now relate the task to the current employee. 
  2909.  
  2910. In order to get the current employee's ID, define the IEmploye table as a 
  2911. shared table. 
  2912.  
  2913. Open the  Edit Tasks module   Table  section  Add the Table IEmploye, giving it 
  2914. "3" as identifier.  The window will appear as follows- 
  2915.  
  2916. Since you have removed the Employee ID field (1ECode) from the input window and 
  2917. from the query window, you need to change some of the queries. 
  2918.  
  2919. Open the  SQL query section. 
  2920.  
  2921. Change the Select query so that it appears as follows 
  2922.  
  2923. Next Page 
  2924.  
  2925.  
  2926. ΓòÉΓòÉΓòÉ <hidden> 30068 ΓòÉΓòÉΓòÉ
  2927.  
  2928. As a result of this change, when the Select query is executed, only lines 
  2929. relating to the current employee are selected. 
  2930.  
  2931. Change the Insert query 
  2932.  
  2933. Now, every time the Insert query is executed, the current employee ID will be 
  2934. taken from the field 3.ECode and all lines related to this employee will 
  2935. contain the employee's ID. 
  2936.  
  2937. The last change to make in this task is to establish that when a new work hours 
  2938. line is add, the default date will be the current date.  To do this, you first 
  2939. add a  local variable called DumTime, as follows- 
  2940.  
  2941. Next Page 
  2942.  
  2943.  
  2944. ΓòÉΓòÉΓòÉ <hidden> 30070 ΓòÉΓòÉΓòÉ
  2945.  
  2946. Now add the command Get-Dat to the insert routine after the "Perform . . First" 
  2947. line, so that it appears as follows- 
  2948.  
  2949. This command will set the value of the 1WDate field to the current date. 
  2950.  
  2951. Save  build an Hours task. 
  2952.  
  2953. build Employee task, link the  it and run it. Now the task is doing what it's 
  2954. supposed to. 
  2955.  
  2956. Next you will learn about views 
  2957.  
  2958. Continue 
  2959.  
  2960.  
  2961. ΓòÉΓòÉΓòÉ 27. Views ΓòÉΓòÉΓòÉ
  2962.  
  2963. In this chapter, you will create a view of Employee and Hour tables, 
  2964. calculating the daily payment for each employee.  Then you will create two 
  2965. tasks, a viewing task and a reporting task. 
  2966.  
  2967. Activate the  Definition module. Select the  Define View module. 
  2968.  
  2969. Enter the  Table Definition section and fill it in as follows-- 
  2970.  
  2971. By this definition, the statement view will be related to fields from both 
  2972. tables. 
  2973.  
  2974. To use functions within the view statement, you must define fields to hold the 
  2975. results. 
  2976.  
  2977. Next Page 
  2978.  
  2979.  
  2980. ΓòÉΓòÉΓòÉ <hidden> 30071 ΓòÉΓòÉΓòÉ
  2981.  
  2982. Enter the  Field Definition section and fill it in as follows 
  2983.  
  2984. The last step in the view definition is to create a view statement. 
  2985.  
  2986. Enter the  View Statement Definition section and fill it in as follows- 
  2987.  
  2988. The results of "Select" are stored in the corresponding fields list. 
  2989.  
  2990. (There are many ways to define views.  This method is used when the view is 
  2991. intended to use functions or conduct calculations, so that it is necessary to 
  2992. indicate where the calculation results will be stored.) 
  2993.  
  2994. Save the view with the name "DayPay". 
  2995.  
  2996. Build it using the  Build Views module. 
  2997.  
  2998. Note that a a table Definition File (.DES) named "DayPay" will be created long 
  2999. with the view created. 
  3000.  
  3001. You can look at it using the  Define Tables module. 
  3002.  
  3003. Note that this table is a "View" type table and has the same fields as you 
  3004. defined in the view definition. 
  3005.  
  3006. You can relate to this table as any other table. 
  3007.  
  3008. Use the   source generator  to create an Input task named "DayPay" by the 
  3009. DayPay.DES . 
  3010.  
  3011. Use the  source generator  to create a report task named "RDayPay" by the 
  3012. DayPay.DES . 
  3013.  
  3014. Build the tasks using the  Build Tasks module. 
  3015.  
  3016. Now you have two view tasks at DayPay table. 
  3017.  
  3018. Run  these tasks. 
  3019.  
  3020. As a result of the view statement multiplying ( 1.Rate * 2.Hours ) you will get 
  3021. the result as the "Daily payment" 
  3022.  
  3023. You can edit these tasks and see that they are much like the other SQL handling 
  3024. tasks you have created. 
  3025.  
  3026. Continue 
  3027.  
  3028.  
  3029. ΓòÉΓòÉΓòÉ 27.1. SQL Report ΓòÉΓòÉΓòÉ
  3030.  
  3031. In this chapter we will modify RDaypay report printing task. 
  3032.  
  3033. We will modify the report task so it will print the hours total for each 
  3034. employee in Hours and days formats. 
  3035.  
  3036. Activate the  Definition module.  Select the the  Task Definition module and 
  3037. open the file RDayPay.ARS. 
  3038.  
  3039. Add two  local variables as follows- 
  3040.  
  3041.  Now add a   sub total definition as follows - 
  3042.  
  3043. Enter the  window design section. 
  3044.  
  3045. Add a New window named CodeT 
  3046.  
  3047. Add 0 Hours and 0 Days to this window. specify their sub-screen to be Tot 
  3048.  
  3049. Now we will make some changes in the task logic flow to use this sub totals 
  3050. definition. 
  3051.  
  3052. Next Page 
  3053.  
  3054.  
  3055. ΓòÉΓòÉΓòÉ <hidden> 31204 ΓòÉΓòÉΓòÉ
  3056.  
  3057. Enter the task  logic flow. 
  3058.  
  3059. First , add a Break command before the Print # MAIN command as follows - 
  3060.  
  3061. As a result, each time a line is fetched, the Code sub-totaling is executed. 
  3062. Look at the Sub-totals  to understand when will InitC  and TotC  routines will 
  3063. be executed. 
  3064.  
  3065. Next Page 
  3066.  
  3067.  
  3068. ΓòÉΓòÉΓòÉ <hidden> 31205 ΓòÉΓòÉΓòÉ
  3069.  
  3070. Now you need to define these two routines as follows - 
  3071.  
  3072. Save the task, build it in the Build Tasks module and run it. 
  3073.  
  3074. You will see the effects of all the changes you have  made. 
  3075.  
  3076.  
  3077. ΓòÉΓòÉΓòÉ 28. P R O G R A M M I N G   G U I D E ΓòÉΓòÉΓòÉ
  3078.  
  3079. This guide has been developed to help you learn about OpenWin modules. 
  3080.  
  3081. You may use the Contents  option (select it from the Help Window Action Bar) to 
  3082. view this book by it's chapters order or you may search the Index for a 
  3083. particular module, section, command etc. 
  3084.  
  3085. You can also select one of the following OpenWin's modules which are OpenWin's 
  3086. main development modules - 
  3087.  
  3088.  Define Environment, 
  3089.  
  3090.  Define Tables, 
  3091.  
  3092.  Define Views, 
  3093.  
  3094.  Edit Tasks, 
  3095.  
  3096.  Source Generator, 
  3097.  
  3098.  Linker, 
  3099.  
  3100.  Visual Debugger, 
  3101.  
  3102.  
  3103. ΓòÉΓòÉΓòÉ 29. Environment definition ΓòÉΓòÉΓòÉ
  3104.  
  3105. The  environment defining module is used to define the environment of the 
  3106. application which you are developing.  This module includes the following 
  3107. windows- 
  3108.  
  3109.   General Settings . 
  3110.  
  3111.   U.D.R. Declaration . 
  3112.  
  3113.   Locking Resources . 
  3114.  
  3115.   Printer Declaration . 
  3116.  
  3117.   DBMS Declaration . 
  3118.  
  3119.   Tables Declaration . 
  3120.  
  3121.   Tasks Declaration . 
  3122.  
  3123.   Application menu . 
  3124.  
  3125. When entering the module you must specify what File  you wish to edit.  It can 
  3126. be done by selecting Open.  from the File menu and choosing the desired file 
  3127. name from the list presented.  The file name will appear at the top of the 
  3128. screen. 
  3129.  
  3130. If you wish to define a new filename you must select the New  option. 
  3131.  
  3132. When you have finished editing the file, select the option File  and save it. 
  3133. If you are defining a new file you will be asked to type the filename. 
  3134.  
  3135.  
  3136. ΓòÉΓòÉΓòÉ 29.1. General Settings ΓòÉΓòÉΓòÉ
  3137.  
  3138. In this  section you will type in, or choose the General settings regarding the 
  3139. application you are developing. 
  3140.  
  3141.  System code 
  3142.  
  3143. This code identifies the application uniquely, and it's used to identify the 
  3144. system for locking needs. 
  3145.  
  3146.  Description 
  3147.  
  3148. This text shortly describes the application.
  3149.  
  3150.  Application language 
  3151.  
  3152. You must select the language in which you wish to work during development. 
  3153.  
  3154.  System users 
  3155.  
  3156. You must define whether the application which you are developing will work as a 
  3157. stand alone application or in a multi-users environment. 
  3158.  
  3159.  
  3160. ΓòÉΓòÉΓòÉ 29.2. Users Defined Routines ΓòÉΓòÉΓòÉ
  3161.  
  3162. In this  section you point out whether in addition to OpenWin commands you wish 
  3163. to include programs (servers) written in a third generation language, or to 
  3164. activate programs that can be activated from the system prompt.  The definition 
  3165. includes- 
  3166.  
  3167.  Command name . 
  3168.  
  3169. The command name is the name through which you will activate this command while 
  3170. writing the application. 
  3171.  
  3172.  Server/program name 
  3173.  
  3174. The server is a third generation language program name, which will perform the 
  3175. command.  See library commands in order to get more information about this 
  3176. option.  In case you wish to activate an outer program through the operating 
  3177. system the server's name would be SYC_SYS (for synchronized execution), or 
  3178. ASYC_SYS ( for un synchronized execution). 
  3179.  
  3180. For example, the next definition makes possible of operating an outer Word 
  3181. Processor, named 'Word', from the OpenWin tasks. 
  3182.  
  3183.  Command name  Server    Description
  3184.  -------------------------------------
  3185.  Word      ASYC_SYS Word processor
  3186.  
  3187.  Command description 
  3188.  
  3189. Is a Text describing, That describes the perform of this command. 
  3190.  
  3191.  
  3192. ΓòÉΓòÉΓòÉ 29.3. Locking Resources ΓòÉΓòÉΓòÉ
  3193.  
  3194. In this  section you define the logical locking resources for the application. 
  3195. OpenWin enables you to perform lock and share actions to these resources while 
  3196. giving them different values.  You can find a detailed explanation about the 
  3197. Lock command in the command guide. 
  3198.  
  3199. In order to define a new resource you must define- 
  3200.  
  3201.  Resource name 
  3202.  
  3203. Treat this name as a parameter while writing the lock and share commands. 
  3204.  
  3205.  The resource description 
  3206.  
  3207. Is a Text explaining, that explains the purpose of the resource's definition. 
  3208.  
  3209.  
  3210. ΓòÉΓòÉΓòÉ 29.4. Printers Declaration ΓòÉΓòÉΓòÉ
  3211.  
  3212. In this  section you choose which printers will be Active or Inactive while an 
  3213. application is running.  The definition includes- 
  3214.  
  3215.  Printer Name 
  3216.  
  3217. A Text string, which will describe the printer, and will appear in the printer 
  3218. selection menu during run time. 
  3219.  
  3220.  Control file 
  3221.  
  3222. The filename which includes the escape sequence controlling this printer. 
  3223.  
  3224.  Command file 
  3225.  
  3226. If you wish the printing to be performed through the command file, you must 
  3227. type in the file name.  This command file will get the file name from the 
  3228. program during run time and you can use the system " %1 " parameter in order to 
  3229. print it. 
  3230.  
  3231. This enables you, for example, to define that before printing begins you can 
  3232. change the printer's emulation.  For direct printing to the printer type PRN. 
  3233.  
  3234.  
  3235. ΓòÉΓòÉΓòÉ 29.5. DBMS Declaration ΓòÉΓòÉΓòÉ
  3236.  
  3237. In this  section you choose which DBMS will be used in the application.  The 
  3238. DBMS's definition is made by selecting them from the DBMS list. 
  3239.  
  3240.  
  3241. ΓòÉΓòÉΓòÉ 29.6. Tables Declaration ΓòÉΓòÉΓòÉ
  3242.  
  3243. In this  section you declare the table names that the application will use. 
  3244. This definition is made in order to guide you to an organized work environment. 
  3245. The definition includes- 
  3246.  
  3247.  Table name 
  3248.  
  3249. The table name is a definition file (.DES) which describes the logical 
  3250. structure of the table. 
  3251.  
  3252.  Table description 
  3253.  
  3254. In the description you are asked to type a text string describing the table's 
  3255. task in the application.  This description will enable other users to 
  3256. understand the application structure. 
  3257.  
  3258.  
  3259. ΓòÉΓòÉΓòÉ 29.7. Tasks Declaration ΓòÉΓòÉΓòÉ
  3260.  
  3261. In this  section you are asked to type the different tasks that make up the 
  3262. whole application.  The definition includes- 
  3263.  
  3264.  Task name 
  3265.  
  3266. The task name is the program name (.ARS) that is used in the application 
  3267.  
  3268.  Task description 
  3269.  
  3270. The description includes a text string describing the task and its uses in the 
  3271. application. 
  3272.  
  3273.  
  3274. ΓòÉΓòÉΓòÉ 29.8. Application Menu ΓòÉΓòÉΓòÉ
  3275.  
  3276. In this  section you will define the application menu and create a shell, which 
  3277. will be used as a main menu in the application.  A detailed description 
  3278. regarding the menu commands can be found. 
  3279.  
  3280. Each line in the definition includes- 
  3281.  
  3282.  Label  Defining a label in this field will allow access to this line.  A line 
  3283. beginning a menu window with the Newmenu  command and a line beginning a group 
  3284. of commands with the Newbtch  command must be characterized by a label. 
  3285.  
  3286. Variable Some of the menu commands give an answer as a numeric value stored in 
  3287. variable (A-Z).  Defining variables in this field will create together with 
  3288. "Whether in range" fields a condition that will effect the execution of the 
  3289. line.  The value of this variable is set in the user's task by the Ext-Val 
  3290. command.  By checking the value of this variable you can condition the 
  3291. execution of tasks, in the ending of other tasks. 
  3292.  
  3293.  Whether in range  Under this heading there are two numeric fields.  In order 
  3294. to create a condition for the execution of the line you must put in these 
  3295. fields maximum and minimum values.  The line will be executed only if the value 
  3296. of the variable that was chosen in the "check variable" field will fit the 
  3297. defined range. 
  3298.  
  3299.  Command  In this field you have to select the requested command 
  3300.  
  3301.  Parameter  In this field you should type in a parameter for the command.  For 
  3302. example, the  Task  command runs an OpenWin task, the parameter will be the 
  3303. task's name. 
  3304.  
  3305. Variable There are some commands that return a result to a variable.  This 
  3306. result will be stored inside the variable defined in this field. 
  3307.  
  3308.  Icon  In lines, which are used as options in a menu, you must point out an 
  3309. icon or a ".bmp" file name, which will appear next to the text describing the 
  3310. option. 
  3311.  
  3312.  Text  In this field you should type in text that will appear on the screen as 
  3313. a heading for a menu or as a choice selection description. 
  3314.  
  3315.  
  3316. ΓòÉΓòÉΓòÉ 30. Tables definition ΓòÉΓòÉΓòÉ
  3317.  
  3318. The  Define Tables module is used to define the logical structure of the tables 
  3319. which comprise your data base.  This module contains three windows: 
  3320.  
  3321.   General settings 
  3322.  
  3323.   Field definition 
  3324.  
  3325.   Key definition 
  3326.  
  3327. When entering the module, you must specify the File  that you wish to edit. 
  3328. This is done by selecting Open  from the File menu and choosing the desired 
  3329. file name from the list displayed.  The file name will appear at the top of the 
  3330. window. 
  3331.  
  3332. If you wish to define a new file name, you must select the New option. 
  3333.  
  3334. When you have finished defining the file, select the file option and save it. 
  3335. If you are defining a new file you will be asked to type in the file name. 
  3336.  
  3337.  
  3338. ΓòÉΓòÉΓòÉ 30.1. General Settings ΓòÉΓòÉΓòÉ
  3339.  
  3340. In this  section you define the General Setting of the data file. 
  3341.  
  3342.  File name 
  3343.  
  3344. The file is the physical data file name.  You must define this name.  In some 
  3345. cases the data file will comprise a number of physical files.  The file names 
  3346. will consist of the defining name and various extensions.  If, for example, a 
  3347. file with the name VENDOR S, together with the DBMS chosen to run it, is 
  3348. C-Index/II, two physical files will be created:  VENDORS and VENDORS.DCL 
  3349.  
  3350. When writing programs, you aren't normally concerned with the physical file 
  3351. name, but rather with the defining file name. 
  3352.  
  3353.  Table Type 
  3354.  
  3355. The file can be organized in different ways.  You must select the method of 
  3356. organization you desire, in accordance with its purpose. 
  3357.  
  3358. The possible types are: 
  3359.  
  3360. A RDBMS table - Relational.  This method of organization allows you to use a 
  3361. SQL Query about the RDBMS data. 
  3362.  
  3363. An index file - Indexed.  Enables a quick and direct access to the records 
  3364. according to different key values. 
  3365.  
  3366. A relative file - Relative.  This method of organization enables you to treat 
  3367. the records in accordance with their numbers.  It does not require that the 
  3368. records be arranged sequentially. 
  3369.  
  3370. A sequential file - Sequential.  This method of organization enables you to 
  3371. treat the records in accordance with their numbers.  In a sequential file, the 
  3372. records must always be arranged sequentially. 
  3373.  
  3374. A temporary file - Temporary.  This is a sequential file created during the 
  3375. running of programs and erased when the task ends. 
  3376.  
  3377. A vector file - Vector.  This file is a sequential file which is managed only 
  3378. in memory. 
  3379.  
  3380. A view file - View.  This file is created by the  Build View module.  It saves 
  3381. the view definition in a way that you can relate to data via SQL Queries. 
  3382.  
  3383.  DBMS 
  3384.  
  3385. If the data base method of organization is chosen, you must select the DBMS. 
  3386. In order to enable you to make a selection, a list of DBMS's is displayed which 
  3387. are suited to the chosen method of organization. 
  3388.  
  3389.  Data Base  If a relational table type has been chosen, you must specify an 
  3390. existing data base name under which the table is to be created.   Record length 
  3391.  
  3392. Some of the DBMS's require that the length of a record be defined.  This length 
  3393. must be longer than the length of all of the fields which comprise the record 
  3394.  
  3395.  The number of records 
  3396.  
  3397. In some cases, such as for a Vector table used as a definition, you must define 
  3398. the maximum number of records.  This field will usually be left empty 
  3399.  
  3400.  
  3401. ΓòÉΓòÉΓòÉ 30.2. Field Definition ΓòÉΓòÉΓòÉ
  3402.  
  3403. In this  section you define the fields which comprise a line or a record in the 
  3404. data base. 
  3405.  
  3406.  Field name 
  3407.  
  3408. This field is a distinct name that identifies the field.  Reference to the 
  3409. field is made in the program by the use of this name. 
  3410.  
  3411.  The field description 
  3412.  
  3413. The field description is text which describes the context of the field.  The 
  3414. description may be presented in the programs next to the field, or as a heading 
  3415. for the column in which the field will appear 
  3416.  
  3417.  The field type 
  3418.  
  3419. There are different types of fields, different types of numeric, character and 
  3420. date fields, etc.  You must select a field from the list.  The different fields 
  3421. and their meanings are listed below - 
  3422.  
  3423.  1.        Byte 
  3424.  
  3425.  2.       Integer 
  3426.  
  3427.  3.        Long 
  3428.  
  3429.  4.        Money 
  3430.  
  3431.  5.        Date 
  3432.  
  3433.  6.        Time 
  3434.  
  3435.  7.        Real 
  3436.  
  3437.  8.        Float 
  3438.  
  3439.  9.        Char 
  3440.  
  3441. 10.       Bitmap 
  3442.  
  3443.  The field format 
  3444.  
  3445. You can define different characteristics for various types of fields, for 
  3446. example, a Char field can be defined for characters or digits only, to be 
  3447. received from right to left, or left to right, etc.  Characteristics suitable 
  3448. to the specific type of field can be chosen from the list.  The different 
  3449. possible characteristics are listed below: 
  3450.  
  3451.  1.         Positive 
  3452.  
  3453.  2.         Negative 
  3454.  
  3455.  3.         AmerDate 
  3456.  
  3457.  4.         EuroDate 
  3458.  
  3459.  5.         Time 
  3460.  
  3461.  6.         0..9 
  3462.  
  3463.  7.         Rgh-T-Lf 
  3464.  
  3465.  8.         Lf-T-Rgh 
  3466.  
  3467.  9.         Numeric 
  3468.  
  3469. 10.         Catalog 
  3470.  
  3471. 11.         Date 
  3472.  
  3473. 12.         Hidden-> 
  3474.  
  3475. 13.         Hidden<- 
  3476.  
  3477.  The field length 
  3478.  
  3479. The field length is the length displayed on the screen.  In numeric fields, 
  3480. this length includes the decimal point and commas, if the field 
  3481. characterization is Money. 
  3482.  
  3483.  Offset 
  3484.  
  3485. Use the Offset option only when you wish to make an equivalence off two 
  3486. different fields.  The offset indicates the physical place in the record where 
  3487. the field begins.  You normally leave this field empty and the fields arrange 
  3488. themselves sequentially in the record. 
  3489.  
  3490.  
  3491. ΓòÉΓòÉΓòÉ 30.3. Keys Definition ΓòÉΓòÉΓòÉ
  3492.  
  3493. In this  section you define the file keys. The purpose of the keys is to allow 
  3494. rapid and practical location of data suited to specific conditions.  Keys must 
  3495. be defined for relational tables and index files. 
  3496.  
  3497.  The key name 
  3498.  
  3499. The key name identifies the key exclusively. 
  3500.  
  3501.  The key fields 
  3502.  
  3503. Key fields are table fields according to which you can sort or locate records. 
  3504. For example, there is a table with the following fields: 
  3505.  
  3506. VENDCODE   - Distributor code 
  3507.  
  3508. VENDNAME   - Distributor name 
  3509.  
  3510. CITY     - City 
  3511.  
  3512. The specialized identifier of every distributor is the Distributor code, so the 
  3513. first key must be defined to include the field VENDCODE.  To enable you to 
  3514. obtain a list of distributors sorted according to both name and distributor 
  3515. code, another key defines the VENDCODE and VENDNAME fields. 
  3516.  
  3517.  
  3518. ΓòÉΓòÉΓòÉ 31. Views definition ΓòÉΓòÉΓòÉ
  3519.  
  3520.  The  Define View module is used to create a view statement for use within 
  3521. OpenWin tasks.  After defining and building the view statement, you can regard 
  3522. it as a new table in your application. 
  3523.  
  3524. This module includes the following sections: 
  3525.  
  3526.  Tables . 
  3527.  
  3528.  Fields . 
  3529.  
  3530.  View Statements. 
  3531.  
  3532. When entering the module, you must specify the File  you wish to edit.  This is 
  3533. done by selecting Open  from the file menu and choosing the desired file name 
  3534. from the list displayed.  The file name will appear at the top of the screen. 
  3535.  
  3536. If you wish to edit a new file name, you must select the New Option. 
  3537.  
  3538. When you have finished editing the file, select the File option and save it. 
  3539. If you are defining a new file, you will be asked to type in the file name. 
  3540.  
  3541.  
  3542. ΓòÉΓòÉΓòÉ 31.1. View Tables ΓòÉΓòÉΓòÉ
  3543.  
  3544. In this  section, you indicate the tables which are handled by the view.  The 
  3545. table definition includes the fields of this table. 
  3546.  
  3547.  The table identifier 
  3548.  
  3549. In this field you must define a table identifier (1-9, A-Z).  Later you will 
  3550. refer to this table by specifying the identifier. 
  3551.  
  3552.  The Table Name 
  3553.  
  3554. In this field you must specify the definition file name of the table used in 
  3555. the view.  This must be the definition of an RDBMS table. 
  3556.  
  3557.  
  3558. ΓòÉΓòÉΓòÉ 31.2. View Statements ΓòÉΓòÉΓòÉ
  3559.  
  3560. In the  View Statements section, you define view creation statements which are 
  3561. made of SQL sentences based on the ANSI standard.  The queries are written in 
  3562. multi-line windows. 
  3563.  
  3564. When writing a Create query, you use TOKENS (SQL queries) and may handle the 
  3565. table fields.  You can choose to see a number of query examples.  If you don't 
  3566. know SQL, we suggest that you study the subject from suitable literature. 
  3567. Comprehensive information can be found in the following books:  IBM OS/2 
  3568. Extended Edition; Database Manager Programming Guide and Reference; Database 
  3569. Manager Structured Query Language (SQL) Concepts. 
  3570.  
  3571.  
  3572. ΓòÉΓòÉΓòÉ 31.3. View Fields ΓòÉΓòÉΓòÉ
  3573.  
  3574. If you wish to use functions within the View Statement, you must define a 
  3575. Local Field in which the function result are stored, so that you will be able 
  3576. to refer to it. 
  3577.  
  3578. The field is defined just as you define table fields. 
  3579.  
  3580.  
  3581. ΓòÉΓòÉΓòÉ 31.4. View TOKENS ΓòÉΓòÉΓòÉ
  3582.  
  3583. Following is the list of Tokens used for writing Create queries. 
  3584.  
  3585.  Commands 
  3586.  
  3587. CREATE VIEW AS - Views name query - Begins  a create view statement. 
  3588.  
  3589. SELECT- Defines field limits in the query and is normally used according to a 
  3590. specified query condition. 
  3591.  
  3592. FROM- Indicates a table to be queried 
  3593.  
  3594. WHERE- Starts a condition sentence. 
  3595.  
  3596. GROUP- Files "records" according to groups. 
  3597.  
  3598. DISTINCT- Ignores double columns. 
  3599.  
  3600. ANY- A condition word in a SELECT sentence. 
  3601.  
  3602. IS- Enables conditioning with NULL. 
  3603.  
  3604. TO- A reserved word. 
  3605.  
  3606. BY- A linking word. 
  3607.  
  3608. AND- A condition word. 
  3609.  
  3610. OR- A condition word. 
  3611.  
  3612. NOT- A condition word. 
  3613.  
  3614.  Condition char 
  3615.  
  3616. >   - big 
  3617.  
  3618. <   - small 
  3619.  
  3620. <>   - different 
  3621.  
  3622. >=   - greater than or equal to 
  3623.  
  3624. <=   - smaller than or equal to 
  3625.  
  3626. =   - equal 
  3627.  
  3628.  More char 
  3629.  
  3630. ,  - separates variables 
  3631.  
  3632. *  - all the fields in the table 
  3633.  
  3634. '  - opens and closes a constant local char in a query 
  3635.  
  3636. (  - open brackets 
  3637.  
  3638. )  - close brackets 
  3639.  
  3640.  
  3641. ΓòÉΓòÉΓòÉ 31.5. View Examples ΓòÉΓòÉΓòÉ
  3642.  
  3643. Following are a few examples for query structures.  The parts in brackets [ ] 
  3644. are optional. 
  3645.  
  3646. Example 1 - a CREATE VIEW AS sentence
  3647.  
  3648. General example
  3649.  
  3650. Private example
  3651.  
  3652. Example 2 - a detailed CREATE VIEW AS sentence
  3653.  
  3654. general example
  3655.  
  3656. Private example
  3657.  
  3658. Next Page
  3659.  
  3660.  
  3661. ΓòÉΓòÉΓòÉ <hidden> 30100 ΓòÉΓòÉΓòÉ
  3662.  
  3663. Example 3 - a CREATE VIEW AS sentence using function and local field.
  3664.  
  3665. Private example
  3666.  
  3667.  
  3668. ΓòÉΓòÉΓòÉ 32. Tasks editing ΓòÉΓòÉΓòÉ
  3669.  
  3670. The Edit Task  This is the central module in the development environment.  With 
  3671. it you can write or change the tasks (programs) which make up the application 
  3672.  
  3673. The Edit Task module includes the following windows: 
  3674.  
  3675. General Parameters. 
  3676.  
  3677.  Tables  .  . 
  3678.  
  3679.  Strings . . 
  3680.  
  3681.  Variables. . 
  3682.  
  3683.  Window Design  . . 
  3684.  
  3685.  Logic Flow. 
  3686.  
  3687.  Sub totals . . 
  3688.  
  3689. Ranges  . . 
  3690.  
  3691. The Edit Window 
  3692.  
  3693.  Edit Operations  . . 
  3694.  
  3695. SQL Query  . . 
  3696.  
  3697. Printers  . . 
  3698.  
  3699. When entering the module you must specify the File you wish to edit. This is 
  3700. done by selecting Open  from the file menu and choosing the  desired file name 
  3701. from the list presented. The file name will appear at the top of the screen. 
  3702.  
  3703. If you wish to edit a new file name you must select the New option. 
  3704.  
  3705. When you have finished editing the file, select the File option and save it. If 
  3706. you are defining a new file you will be asked to type in the file name. 
  3707.  
  3708.  
  3709. ΓòÉΓòÉΓòÉ 32.1. Identifiers [Tasks] ΓòÉΓòÉΓòÉ
  3710.  
  3711. OpenWin distinguishes between different objects by using identifiers.  An 
  3712. identifier is a mark which indicates the object type.  This relationship makes 
  3713. it possible to give identical names to different objects , yet retain the 
  3714. ability to differentiate among them.  For example, you can define a local field 
  3715. called NAME with 0 as the identifier.  You may then refer to a table field 
  3716. which is also called NAME by referring to it according to the table identifier, 
  3717. for example B.  Identifiers that can be used in the edit tasks module flow are: 
  3718.  
  3719. 9 Printer 
  3720.  
  3721. Z-A,9-1 Tables 
  3722.  
  3723. ! constant strings 
  3724.  
  3725. 0 local variables 
  3726.  
  3727. # windows 
  3728.  
  3729. * sub-window 
  3730.  
  3731. " another task 
  3732.  
  3733. -,+ numeric constants 
  3734.  
  3735. ? SQL query 
  3736.  
  3737. % locking resource 
  3738.  
  3739. ^ Flag (In ranges section) 
  3740.  
  3741.  
  3742. ΓòÉΓòÉΓòÉ 32.2. Flags [Tasks] ΓòÉΓòÉΓòÉ
  3743.  
  3744. OpenWin uses logical variables called flags.  A flag is identified by the 
  3745. combination of a letter and a digit, for example F1 C5, etc.  The flags are 
  3746. effected by OpenWin commands and can have the following values 
  3747.  
  3748. On    ON  ( - or + ) 
  3749.  
  3750. Off   OFF (  =  ) 
  3751.  
  3752. See the explanation for use of the flags in The  Logic Flow  window 
  3753.  
  3754. When tasks are linked through the Callers command, each task is given a 
  3755. distinct set of flags. 
  3756.  
  3757. OpenWin has a group of common flags which are used to transfer logic 
  3758. information between linked tasks.  These flags are identified by the letter Z. 
  3759.  
  3760.  
  3761. ΓòÉΓòÉΓòÉ 32.3. General Parameters [Tasks] ΓòÉΓòÉΓòÉ
  3762.  
  3763. In this  section you define the general parameters of the task.  This data 
  3764. includes: 
  3765.  
  3766.  The task name 
  3767.  
  3768. The task name is a short text line which describes the task. 
  3769.  
  3770.  Routines 
  3771.  
  3772. An OpenWin task must have a main routine, but may also include a beginning and 
  3773. ending routine.  Each of the routines comprises a group of commands written in 
  3774. the Logic Flow  window, which begins with a label. 
  3775.  
  3776.  An Initial routine 
  3777.  
  3778. In this field you have the choice of indicating a routine name (label) which 
  3779. will be activated before the main routine.  Beginning routines are primarily 
  3780. defined for tasks with an initialization phase, for example, receiving ranges 
  3781. in a report task. 
  3782.  
  3783.  Main routine 
  3784.  
  3785. In this field you can specify the name of the main routine of the task. 
  3786.  
  3787.  Final routine 
  3788.  
  3789. In this field you can specify a name (label) for the routine which will be 
  3790. activated after completion of the central routine.  Ending routines are defined 
  3791. primarily in tasks which have ending phases, for example, presenting final 
  3792. calculations in report tasks. 
  3793.  
  3794.  
  3795. ΓòÉΓòÉΓòÉ 32.4. Printers [Tasks] ΓòÉΓòÉΓòÉ
  3796.  
  3797. This  section is used for report tasks.  In this window you define the report 
  3798. specifications and data.  Beginning routines are primarily defined for tasks 
  3799. with an initialization phase, for example, receiving ranges in a re port task. 
  3800.  
  3801.  Printer ID 
  3802.  
  3803. In this field you specify the printer to which the report will be sent.  You 
  3804. can enter the name of a printer, a file name, or "?"  to enable the selection 
  3805. of a printer while you are working on the task. 
  3806.  
  3807.  Form size 
  3808.  
  3809. You specify the length of the page.  Standard A4 size paper is usually 66 
  3810. lines. 
  3811.  
  3812. First printing line 
  3813.  
  3814. You must specify the line on which the printing should begin. 
  3815.  
  3816.  Last printing line 
  3817.  
  3818. You must specify the line on which the printing should end. 
  3819.  
  3820.  The page beginning routine 
  3821.  
  3822. You must specify the name for a routine which will be repeated at the beginning 
  3823. of each page, for example, a routine that prints a heading at the beginning of 
  3824. the page 
  3825.  
  3826.  Page end routine 
  3827.  
  3828. You must specify the name for a routine which will be repeated after the 
  3829. printing of each page has ended, for example, a routine that prints the page 
  3830. number at the bottom of each page 
  3831.  
  3832.  
  3833. ΓòÉΓòÉΓòÉ 32.5. Tables [Tasks] ΓòÉΓòÉΓòÉ
  3834.  
  3835. In this  section you identify the tables managed by this task.  The table 
  3836. definition includes the fields. 
  3837.  
  3838.  The table identifier 
  3839.  
  3840. In this field you must define a  table identifier  (1-9,A-Z).  Later you will 
  3841. refer to this table by specifying the identifier 
  3842.  
  3843.  The table name 
  3844.  
  3845. In this field you must specify the definition file name of the table to be used 
  3846. in the task. 
  3847.  
  3848. Access 
  3849.  
  3850. You must select the access form admitted for this table (reading only, reading 
  3851. and writing). 
  3852.  
  3853.  Shared 
  3854.  
  3855. If you want this table to be shared by a number of linked tasks, you must 
  3856. define the table as a shared table. 
  3857.  
  3858.  
  3859. ΓòÉΓòÉΓòÉ 32.6. Strings [Tasks] ΓòÉΓòÉΓòÉ
  3860.  
  3861. In this  section you define constant character strings used in the task. 
  3862.  
  3863.  Constant name 
  3864.  
  3865. This name identifies the constant for future reference. 
  3866.  
  3867.  Constant content 
  3868.  
  3869. The constant content is the text.  Constant characters are normally used to 
  3870. define text messages that will be presented on the screen or printed etc. 
  3871.  
  3872.  
  3873. ΓòÉΓòÉΓòÉ 32.7. Local Variables [Tasks] ΓòÉΓòÉΓòÉ
  3874.  
  3875. In this  section you may define variables (local fields) to be used for 
  3876. different purposes in the task such as initial values, numeric variables for 
  3877. temporary calculation, etc. 
  3878.  
  3879.  The field name 
  3880.  
  3881. The field name is an exclusive name which identifies the field and is used to 
  3882. refer to the field in the program. 
  3883.  
  3884.  The field description 
  3885.  
  3886. The field description is text which describes the context of the field.  This 
  3887. description is presented in the programs as the field title or a heading for 
  3888. the column in which the field will appear. 
  3889.  
  3890.  The field type 
  3891.  
  3892. There are different types of field characteristics:  different kinds of numeric 
  3893. fields, date fields, etc.  You must type in the desired field type, or select 
  3894. it from the list.  A list of the fields and their meanings is presented below: 
  3895.  
  3896.  1.        Byte 
  3897.  
  3898.  2.       Integer 
  3899.  
  3900.  3.        Long 
  3901.  
  3902.  4.        Money 
  3903.  
  3904.  5.        Date 
  3905.  
  3906.  6.        Time 
  3907.  
  3908.  7.        Real 
  3909.  
  3910.  8.        Float 
  3911.  
  3912.  9.        Char 
  3913.  
  3914. 10.       Bitmap 
  3915.  
  3916.  The field format 
  3917.  
  3918. Different field types can have different formats defined for them, for example, 
  3919. a Char field can be presented in a form which receives characters or digits 
  3920. only, to be received from right to left, or left to right, etc. The 
  3921. characteristics suited to each field type can be chosen from the following 
  3922. list: 
  3923.  
  3924.  1.         Positive 
  3925.  
  3926.  2.         Negative 
  3927.  
  3928.  3.         AmerDate 
  3929.  
  3930.  4.         EuroDate 
  3931.  
  3932.  5.           Time 
  3933.  
  3934.  6.           0..9 
  3935.  
  3936.  7.         Rgh-T-Lf 
  3937.  
  3938.  8.         Lf-T-Rgh 
  3939.  
  3940.  9.         Numeric 
  3941.  
  3942. 10.         Catalog 
  3943.  
  3944. 11.          Date 
  3945.  
  3946. 12.         Hidden-> 
  3947.  
  3948. 13.         Hidden<- 
  3949.  
  3950.  The field length 
  3951.  
  3952. The field length defines the length of the field presented on the screen.  In 
  3953. numeric fields this length includes the decimal point and commas, if the field 
  3954. format is money. 
  3955.  
  3956.  Repetition factor 
  3957.  
  3958. For each field you must define the desired repetition factor (minimum - 1 ). 
  3959. This means that each local field can comprise a table with more than one value 
  3960.  
  3961.  Initial value 
  3962.  
  3963. A field you may defined with an initial value.  When you define a field with 
  3964. more then one repetition factor, you will be able to define an initial value 
  3965. for each of the factors.  A beginning value ends with a ";". 
  3966.  
  3967.  
  3968. ΓòÉΓòÉΓòÉ 32.8. Window Design [Tasks] ΓòÉΓòÉΓòÉ
  3969.  
  3970. This  window is used for interactive editing of the task windows. You can 
  3971. perform a variety of actions on the windows and their fields in order to give 
  3972. them the shape you want. 
  3973.  
  3974. Chosen window/field In order to perform actions of various kinds on a window or 
  3975. a field, you must first indicate the window or field to be edited.  To do this, 
  3976. click on the requested field or window with the mouse.  Windows are presented 
  3977. at the front of the screen.  Fields are surrounded by a narrow frame. 
  3978.  
  3979. Shifting In order to move a window or a field on the screen, bring the mouse to 
  3980. the field, click and hold the mouse button down, then drag the window or field 
  3981. to the desired location and release the mouse button. 
  3982.  
  3983. Size change You can change the size of the windows and the fields.  This is 
  3984. done similarly to the PM with the mouse. 
  3985.  
  3986. The Action Bar 
  3987.  
  3988. The following options are presented in the operation bar window. 
  3989.  
  3990. Under Window you will find the following options - 
  3991.  
  3992. Append  Update  Delete 
  3993.  
  3994. Under Field you will find the following options - 
  3995.  
  3996. Append  Update  Delete 
  3997.  
  3998. Under Options you will find the following options - 
  3999.  
  4000. Object Details  Color Window  Windows List 
  4001.  
  4002. After editing a window you should press OK or Cancel 
  4003.  
  4004. Click on the option you wish to know more about. 
  4005.  
  4006.  
  4007. ΓòÉΓòÉΓòÉ 32.9. Revise/Update Window. ΓòÉΓòÉΓòÉ
  4008.  
  4009. When revising/updating a window, you should refer to the following parameters: 
  4010.  
  4011. Click on the parameter you wish to know more about. 
  4012.  
  4013. Name  Style  Background  Title Field  Icon Name  Icon Position  Icon Dimensions 
  4014.  
  4015.  
  4016. ΓòÉΓòÉΓòÉ 32.10. Revise/Update Field. ΓòÉΓòÉΓòÉ
  4017.  
  4018. When revising/updating a field you refer to the following parameters: 
  4019.  
  4020. Click on the parameter you wish to know more about. 
  4021.  
  4022. Screen  Output Field  Input Field  Style  Background  Foreground  Title Place 
  4023. SubScreen  Help Panel 
  4024.  
  4025.  
  4026. ΓòÉΓòÉΓòÉ 32.11. Color Window. ΓòÉΓòÉΓòÉ
  4027.  
  4028. This window can be used to change field or window colors and field styles. 
  4029. Color change In order to change the color of a field or window you must mark 
  4030. the field/window as chosen.  Press the appropriate button to choose the desired 
  4031. color from the palette and then confirm your choice by pressing Apply at the 
  4032. top of the palette. 
  4033.  
  4034. Field style change You can define a display of fields in different forms.  In 
  4035. order to do this you must mark a field as chosen, go to the Format list by 
  4036. selecting the Format (Style)  option from the operation bar at the top of the 
  4037. palette, mark the display style de sired (by clicking the mouse) and confirm 
  4038. your choice by pressing Apply 
  4039.  
  4040.  
  4041. ΓòÉΓòÉΓòÉ 32.12. Logic flow [Tasks] ΓòÉΓòÉΓòÉ
  4042.  
  4043. In this  section you define the logical sequence of the task.  Each line is 
  4044. constructed as follows: 
  4045.  
  4046. Label 
  4047.  
  4048. Identifies the line exclusively. 
  4049.  
  4050.  Condition 
  4051.  
  4052. A conditional group.  If conditions are specified, the line will be constructed 
  4053. only if the specified conditions are met. 
  4054.  
  4055. Command 
  4056.  
  4057. An OpenWin command, the parameters associated with it, and the resultant 
  4058. variables. 
  4059.  
  4060. Branching 
  4061.  
  4062. Each line can include conditioned branching. 
  4063.  
  4064. Each part of the command is comprised of a number of fields.The fields are 
  4065. defined as follows: 
  4066.  
  4067.  Label  Each label identifies a specific line in a logical sequence for 
  4068. purposes of reference.  The label can be made up of letters and numbers. 
  4069. Various commands can direct the task flow to this label.  There is no need to 
  4070. identify each line by a label.  The reserve label ******** prevents execution 
  4071. of the line while running. 
  4072.  
  4073.  Flag  A flag  mentioned in this field will cause the command in this line to 
  4074. be executed while running or not.  Use the first flag only if you want to 
  4075. create a complex condition. 
  4076.  
  4077.  Operation  In this field you define a logical condition which effects the 
  4078. previous and following flags.  The possible conditions are AND,OR, XOR 
  4079.  
  4080.  Flag  A flag mentioned in this field together with the first flag and the 
  4081. logical condition, if one has been defined, will effect the execution of the 
  4082. command in the line.  If a first flag has been defined, it is a necessity to 
  4083. define this flag and the logical condition between them. 
  4084.  
  4085.  Command  The desired command is written in this field.  It can be one of the 
  4086. OpenWin commands or an external command added to the system.  See the command 
  4087. specifications and the parameters which they use in the command guide. 
  4088.  
  4089.  Identifier  An Identifier  that characterizes the first parameter of the 
  4090. command. 
  4091.  
  4092.  Parameter 1  A local field, a table field, constant, etc. Used as the first 
  4093. parameter in the command, if it requires or permits the use of this parameter. 
  4094.  
  4095.  Identifier  An identifier  that characterizes the second parameter of the 
  4096. command. 
  4097.  
  4098.  Parameter 2  A local field, a table field, constant, etc. Used as the second 
  4099. parameter in the command, if it requires or permits the use of this parameter. 
  4100.  
  4101.  Identifier  An identifier  which characterizes the result variable of the 
  4102. command. 
  4103.  
  4104.  Result variable  A local field, a table field, constant,used as a result 
  4105. variable in the command, if it requires or permits the use of this parameter. 
  4106.  
  4107.  Result flag  A logical flag.  Most commands effect the situation of the result 
  4108. flag.  A flag with the value "=" (OFF) indicates success.  A flag with the 
  4109. value "+" or "-" (ON) indicates failure.  Specifications for the situation of 
  4110. the flag after each command can be found in the command guide. 
  4111.  
  4112.  Goto Label  This label is used for quick branching from this line.  The label 
  4113. relates to the definition of a line in the task.  Branching through this label 
  4114. can be done in two ways.  The first is through the use of different flow 
  4115. commands such as "Perform", etc.  The second depends on the nature of the 
  4116. result flag.  When you indicate a result flag, branching to the defined lab el 
  4117. will proceed if, after execution of the command, the result flag is set to the 
  4118. same value as that defined in the Result flag. 
  4119.  
  4120.  
  4121. ΓòÉΓòÉΓòÉ 32.13. Comment Line [Tasks] ΓòÉΓòÉΓòÉ
  4122.  
  4123. In a comment line you may write comments to document your task logic flow. 
  4124.  
  4125.  
  4126. ΓòÉΓòÉΓòÉ 32.14. SQL Queries [Tasks] ΓòÉΓòÉΓòÉ
  4127.  
  4128. In the  SQL Queries section you define queries which are made of SQL sentences 
  4129. written in multi-line windows to the ANSI standard.  Each query starts and is 
  4130. specified by a label and continues until another label indicates the beginning 
  4131. of the next query.  You will refer to this label in the Ex-Sqland the Fetch 
  4132. commands. 
  4133.  
  4134. While writing a query you use TOKENS  (SQL queries) and treat local  variables 
  4135. and fields from the data bases.  You can choose to see a number of queries 
  4136. examples.  If you aren't familiar with SQL, we recommend that you study the 
  4137. subject from suitable literature.  Comprehensive information can be found in 
  4138. the following books- 
  4139.  
  4140. IBM OS/2 Extended Edition Database Manager Programming Guide and Reference 
  4141. Database Manager Structured Query Language (SQL) Concepts. 
  4142.  
  4143.  
  4144. ΓòÉΓòÉΓòÉ 32.15. Variables in the query [Tasks] ΓòÉΓòÉΓòÉ
  4145.  
  4146. In the SQL queries you can use OpenWin variables as part of the query condition 
  4147. tot create flexible queries that change while running.  The variables in the 
  4148. queries can be fields from tables, fields from files, local  fields , or 
  4149. textual constants  The variables in the query are identified as used to in 
  4150. OpenWin with the identifier.  You can also define them as part of the query's 
  4151. condition.  a local constant  character by inserting it between inverted 
  4152. commas, for example:  1.CITY = 'WASHINGTON' 
  4153.  
  4154.  
  4155. ΓòÉΓòÉΓòÉ 32.16. Queries TOKENS [Tasks] ΓòÉΓòÉΓòÉ
  4156.  
  4157. The following is a list of TOKENS used for writing queries. 
  4158.  
  4159.  Commands 
  4160.  
  4161. ROLLBACK- cancels changes made in the current operation. 
  4162.  
  4163. COMMIT- updates changes in the current operation. 
  4164.  
  4165. SELECT- Defines field limits in the query normally used according to a 
  4166. specified condition in the query. 
  4167.  
  4168. FROM- Indicates a table on which the query is to be performed. 
  4169.  
  4170. WHERE- starts a condition sentence. 
  4171.  
  4172. INSERT- inserts new "records" into the table. 
  4173.  
  4174. DELETE- deletes the table "records". 
  4175.  
  4176. UPDATE- updates "records" 
  4177.  
  4178. GROUP-organizes "records" by groups. 
  4179.  
  4180. ORDER- sets the fields according to which the table will be categorized. 
  4181.  
  4182. SET- joins the VALUES 
  4183.  
  4184. VALUES- indicates the beginning of a group of values to be entered into the 
  4185. table. 
  4186.  
  4187. DESC- organizes in descending order (from large to small). 
  4188.  
  4189. ASC- organizes in ascending order (from small to large). 
  4190.  
  4191. IN-starts an operation. 
  4192.  
  4193. ALL-a condition word in a SELECT sentence. 
  4194.  
  4195. DISTINCT- ignores double columns. 
  4196.  
  4197. ANY- a condition word in a SELECT sentence. 
  4198.  
  4199. IS- enables conditioning with NULL. 
  4200.  
  4201. TO-a reserved word. 
  4202.  
  4203. BY-a linking verb. 
  4204.  
  4205. INTO-indicates a table. 
  4206.  
  4207. AND-a condition word. 
  4208.  
  4209. OR- a condition word. 
  4210.  
  4211. NOT-a condition word. 
  4212.  
  4213.  Condition char 
  4214.  
  4215. >   - big 
  4216.  
  4217. <   - small 
  4218.  
  4219. <>   - different 
  4220.  
  4221. >=   - larger or equal 
  4222.  
  4223. <=   - smaller or equal 
  4224.  
  4225. =   - equal 
  4226.  
  4227.  More char 
  4228.  
  4229. ,  - separates  variables 
  4230.  
  4231. *  - all the fields in the table 
  4232.  
  4233. '  - opening and closing a constant local char in a query 
  4234.  
  4235. (  - open brackets 
  4236.  
  4237. )  - close brackets 
  4238.  
  4239.  
  4240. ΓòÉΓòÉΓòÉ 32.17. Queries Examples [Tasks] ΓòÉΓòÉΓòÉ
  4241.  
  4242. Following are a few examples for query structures The parts in brackets [ ] are 
  4243. optional. 
  4244.  
  4245. Example 1 - a SELECT sentence 
  4246.  
  4247. general example 
  4248.  
  4249.              Private example 
  4250.  
  4251. Next Page 
  4252.  
  4253.  
  4254. ΓòÉΓòÉΓòÉ <hidden> 30101 ΓòÉΓòÉΓòÉ
  4255.  
  4256. Example 2 - INSERT sentence 
  4257.  
  4258.               General example 
  4259.  
  4260.               Private example 
  4261.  
  4262. Next Page 
  4263.  
  4264.  
  4265. ΓòÉΓòÉΓòÉ <hidden> 30102 ΓòÉΓòÉΓòÉ
  4266.  
  4267. Example 3 - UPDATE sentence 
  4268.  
  4269.               General example 
  4270.  
  4271.               Private example 
  4272.  
  4273. Next Page 
  4274.  
  4275.  
  4276. ΓòÉΓòÉΓòÉ <hidden> 30103 ΓòÉΓòÉΓòÉ
  4277.  
  4278. Example 4 - DELETE sentence 
  4279.  
  4280.               General example 
  4281.  
  4282.               Private example 
  4283.  
  4284. Next Page 
  4285.  
  4286.  
  4287. ΓòÉΓòÉΓòÉ <hidden> 30104 ΓòÉΓòÉΓòÉ
  4288.  
  4289. Example 5 - ROLLBACK sentence 
  4290.  
  4291.               General example 
  4292.  
  4293.               Private example 
  4294.  
  4295. example 6 - COMMIT sentence 
  4296.  
  4297.               General example 
  4298.  
  4299.               Private example 
  4300.  
  4301.  
  4302. ΓòÉΓòÉΓòÉ 32.18. Sub totals [Tasks] ΓòÉΓòÉΓòÉ
  4303.  
  4304. In this  section you can define sub-totaling and operations performed in 
  4305. response to the Break  command.  Breaks and sub-totaling are usually used with 
  4306. report tasks.  To do this you must define the following parameters: 
  4307.  
  4308.  Label 
  4309.  
  4310. The label identifies a group of sub-totals.  The group of sub-totals continues 
  4311. until the next label. 
  4312.  
  4313.  Breaking field 
  4314.  
  4315. A table field or a local field and the field identifier  Operations defined for 
  4316. execution when the field changes will be executed when the value of this field 
  4317. is changed. 
  4318.  
  4319.  Add field 
  4320.  
  4321. A field that calculates. 
  4322.  
  4323.  Result 
  4324.  
  4325. A field that collects the scheme result. 
  4326.  
  4327.  When a field changes 
  4328.  
  4329. In a line that defines breaking - when a field value changes - you can define 
  4330. the following operations to be executed 
  4331.  
  4332.  Routine name 
  4333.  
  4334. The name of a routine in the logic flow which will be executed when the value 
  4335. of the breaking field changes.  This routine is used for complicated 
  4336. calculations. 
  4337.  
  4338.  Printing window 
  4339.  
  4340. A window which will be printed if a break occurs. 
  4341.  
  4342.  New page 
  4343.  
  4344. You can indicate that you wish to move to a new page whenever a break occurs. 
  4345.  
  4346.  beginning value 
  4347.  
  4348.  Routine name 
  4349.  
  4350. You can indicate the name of a routine in the logical flow to be executed at 
  4351. the beginning of a task and after a break.  Such a routine is normally used to 
  4352. initialize values for different fields such as fields for sub-totaling. 
  4353.  
  4354.  
  4355. ΓòÉΓòÉΓòÉ 32.19. Ranges [Tasks] ΓòÉΓòÉΓòÉ
  4356.  
  4357. In this  section you define the ranges to be examined during the execution of 
  4358. the Range command.  These examinations are usually performed in report tasks. 
  4359. See the Range  command in the command guide.  Range definition is performed as 
  4360. following way: 
  4361.  
  4362.  Label 
  4363.  
  4364. The label identifies a group of ranges.  The group of ranges continues until 
  4365. the next label. 
  4366.  
  4367. A range can be made of fields as well as of Flags. To define a range of Flags 
  4368. use ^ identifier. 
  4369.  
  4370.  Checked field 
  4371.  
  4372. A field and field identifier  on which the range is examined. 
  4373.  
  4374.  Minimum field 
  4375.  
  4376. You have to type in the field name and the field identifier  This field is used 
  4377. as a lower blockage in the examined range.  It will normally be a local field 
  4378. which will be given an initial value at the beginning o f the task. 
  4379.  
  4380.  Maximum field  You must type in the field name and the field identifier  This 
  4381. field is used as an upper blockage in the examined range.  It will normally be 
  4382. a local field which will be given an initial value at the beginning of the 
  4383. task. 
  4384.  
  4385.  A logical condition 
  4386.  
  4387. This the connection between the examined range in this line and the following 
  4388. lines of the range group, if they exist.  The possible conditions are:  AND, 
  4389. OR, XOR. 
  4390.  
  4391.  
  4392. ΓòÉΓòÉΓòÉ 32.20. Edit Operations [Tasks] ΓòÉΓòÉΓòÉ
  4393.  
  4394. The  Edit Operations section is an operation library which is activated when 
  4395. the Edit command is used on a window. Each window on which the Edit command is 
  4396. to be used must contain a group of operations.  The structure of the Edit 
  4397. Operations window is as follows: 
  4398.  
  4399.  Window name  Entering a window name in this field starts a group of edit 
  4400. commands which belong to this window.  The name of the window is defined in the 
  4401. window design section.  The group includes all defined commands from a line for 
  4402. which a window name has been defined, until the next line for which a window 
  4403. name has been defined.  This field can be defined only once for each group of 
  4404. edit commands, in the first line of the command group. 
  4405.  
  4406.  Identifier  If this line has an edit key defined for it, you must define the 
  4407. table identifier  to which it belongs to. 
  4408.  
  4409.  Key  If the line starts a group of commands, you must enter the key name from 
  4410. a table according to which the automatic edit operations will be executed.  In 
  4411. special cases you can define a field (local or from a table) as an edit key. 
  4412.  
  4413.  Operation  One of the edit commands.  Some of the edit commands are mandatory, 
  4414. some can appear only once in a group of commands and some can appear several 
  4415. times in the same group.  See the detailed explanation of the edit commands in 
  4416. the edit commands appendix 
  4417.  
  4418.  Selection char  When the Edit command is being executed the system waits for 
  4419. the user's selection, which is made by selecting an option from the operation 
  4420. menu with the mouse or by pressing the key or combination of keys defined as 
  4421. the selection char.  Each edit command has a character defined as default 
  4422. choice, but the programmer can change it. 
  4423.  
  4424.  Routine for execution  A routine name written in the logic flow  Some of the 
  4425. edit commands require definition of a routine, some are internal and have no 
  4426. connection to a routine, and some can be executed automatically or referred to 
  4427. a routine.  The sequence of actions performed by an edit operation is: 
  4428. Executing an automatic beginning action (usually a screen operation). 
  4429. Executing the default choice or the routine, if defined.  Execution of an 
  4430. ending operation (usually a screen operation with a command execution break). 
  4431.  
  4432.  The result flag  The result flag  is a logical flag  which permits the 
  4433. transfer of information from the user routine to the edit command that 
  4434. activated this routine.  Normally a flag  in the OFF position indicates a 
  4435. successful operation and an ON flag  indicates its conclusion. 
  4436.  
  4437.  Operation description  The text is displayed in the operation bar.  To set a 
  4438. "Hot Key" type ~ first. For example, ~Exit. 
  4439.  
  4440.  
  4441. ΓòÉΓòÉΓòÉ 32.21. Edit Window [Tasks] ΓòÉΓòÉΓòÉ
  4442.  
  4443. In this  section you define the way in which the edit window is shown on the 
  4444. screen.To do this you must insert the following parameters: 
  4445.  
  4446. The window name The window name is the window you wish to activate with the 
  4447. Edit command.Remember that you must define EDIT actions for this window. 
  4448.  
  4449. Position X axis The position of the bottom left corner of the window on the 
  4450. x-axis (the width axis) in relation to the left side of the screen. 
  4451.  
  4452. Y axis The position of the bottom left corner of the window on the y-axis (the 
  4453. height axis) in relation to the left side of the screen. 
  4454.  
  4455. Width The width of the window. 
  4456.  
  4457. Height The height of the window. 
  4458.  
  4459. Line color This is the color of the current line. 
  4460.  
  4461. Heading and identifier You must define a local field or constant character to 
  4462. be used as the heading for a window. 
  4463.  
  4464.  
  4465. ΓòÉΓòÉΓòÉ 33. Source Generator ΓòÉΓòÉΓòÉ
  4466.  
  4467.  The  The Source Generator module is used to generate OpenWin codes that can be 
  4468. edited with the  Edit Tasks module. 
  4469.  
  4470. You may select different types and formats of code such as Input Task (data 
  4471. entry), Reports, Dialog, etc. 
  4472.  
  4473. Source generation is based on a Table Definition file (.DES) which you create 
  4474. with the  Define Tables module. 
  4475.  
  4476. The output of Source Generation is a task source code file (.ARS).  You can 
  4477. edit this file with the Edit Tasks module, or build it from the start with the 
  4478. build tasks module. 
  4479.  
  4480. To generate a source you must: 
  4481.  
  4482. Select the type . 
  4483.  
  4484. Select the table definition (.DES) file. 
  4485.  
  4486. Select the task name to be generated.  The default name is identical with the 
  4487. table definition name. 
  4488.  
  4489. Select the format and the source to be created. 
  4490.  
  4491.  
  4492. ΓòÉΓòÉΓòÉ 34. Link Tasks ΓòÉΓòÉΓòÉ
  4493.  
  4494.  The  Link Tasks module is used to Link tasks that use the Callers  command. 
  4495.  
  4496. Before you link a task, you should build it and the called tasks using the 
  4497. Build Tasks module. 
  4498.  
  4499. Linking tasks creates a new task (.TSK), which includes all of the tasks called 
  4500. by the main (source) task. 
  4501.  
  4502. If one of the called tasks also uses the Callars  command Do Not  Linking the 
  4503. main task will link all the tasks called by the main task and the called tasks, 
  4504. if any exist. 
  4505.  
  4506. To link a task you should: 
  4507.  
  4508. Select the main task as the Source Task Name 
  4509.  
  4510. Define the new task name  you wish to have as the output of the linkage and 
  4511. type it in as the Target Task Name 
  4512.  
  4513. You may mark the overwrite  option.  If you do not mark this option, a message 
  4514. will be displayed, if the Target (New) task exists. 
  4515.  
  4516. Press LINK 
  4517.  
  4518. A list of the called tasks names will be displayed. 
  4519.  
  4520. You may link another task, or press CANCEL to quit. 
  4521.  
  4522.  
  4523. ΓòÉΓòÉΓòÉ 35. Help File ΓòÉΓòÉΓòÉ
  4524.  
  4525. If you wish to define help panels for the end of the application, you should 
  4526. modify the file USERHELP.IPF. 
  4527.  
  4528. You will find this file in the directory where OpenWin is installed. 
  4529.  
  4530. This file is embedded within the OpenWin standard help file - RARSE.IPF. 
  4531.  
  4532. To define an .IPF file, look at the proper section (Developing Help 
  4533. Information) of the IBM OS/2 Programming Guide. 
  4534.  
  4535. Use resource codes (res=) from 10000 and higher. 
  4536.  
  4537. After editing the USERHELP.IPF File, you should compile the file RARSE.IPF in 
  4538. order to create the help file - RARSE.HLP. 
  4539.  
  4540. The compilation is done with the OS/2 IPFC compiler. 
  4541.  
  4542.  
  4543. ΓòÉΓòÉΓòÉ 36. Debugger ΓòÉΓòÉΓòÉ
  4544.  
  4545.  The  The Visual Debugger module enables you to run your tasks in debug mode. 
  4546.  
  4547. When you run a task in debug mode you can see the task execution as well as all 
  4548. commands, data, etc. 
  4549.  
  4550. When you activate this module and enter a task, you see the following windows: 
  4551.  
  4552.  1. Commands 
  4553.  
  4554.  2. Flags 
  4555.  
  4556.  3. Variables 
  4557.  
  4558.  4. Tables 
  4559.  
  4560.  5. SQL Query 
  4561.  
  4562.  6. Locate Data Dictionary 
  4563.  
  4564. The items in each window are numbered according to the order in which they 
  4565. appear.You can refer to these items by their number. 
  4566.  
  4567. You can access these windows by clicking with the mouse, or by choosing the 
  4568. Windows  option from the action bar. 
  4569.  
  4570. On the action bar you will also find the Operations,  Run and Step options. 
  4571.  
  4572.  
  4573. ΓòÉΓòÉΓòÉ 37. Debugging Operations ΓòÉΓòÉΓòÉ
  4574.  
  4575. Under this title you will find the following options: 
  4576.  
  4577.  1. Present PC 
  4578.  
  4579.  2. Change PC 
  4580.  
  4581.  3. Find Text 
  4582.  
  4583.  4. Break Points 
  4584.  
  4585.  
  4586. ΓòÉΓòÉΓòÉ 37.1. Present PC ΓòÉΓòÉΓòÉ
  4587.  
  4588. This option effects the  Commands  window.  It displays the present command 
  4589. line to be executed. 
  4590.  
  4591.  
  4592. ΓòÉΓòÉΓòÉ 37.2. Change PC ΓòÉΓòÉΓòÉ
  4593.  
  4594. This option effects the  Commands  window.  It enables you to change the 
  4595. program counter and thus define a new command line to be executed next. 
  4596.  
  4597.  
  4598. ΓòÉΓòÉΓòÉ 37.3. Find Text ΓòÉΓòÉΓòÉ
  4599.  
  4600. This option can be used within any window.  The text may be a Command, Variable 
  4601. name or title, Field value, etc.The line found becomes the first line in the 
  4602. window. 
  4603.  
  4604.  
  4605. ΓòÉΓòÉΓòÉ 37.4. Break Points ΓòÉΓòÉΓòÉ
  4606.  
  4607. This option opens a table from which you can define break points. 
  4608.  
  4609. In each line you can type a Line No., Field No, Screen No., etc.. 
  4610.  
  4611. You should type the flag name (A1, B5 etc.).  You can specify the flag status 
  4612. that will create a break by typing it (A1=, B5+, etc.) 
  4613.  
  4614. At the end of the line, you indicate whether or not the line break points 
  4615. should be active. 
  4616.  
  4617. When you scroll through the Commands window you can define a break point for 
  4618. every line by double clicking on the line with the mouse Right button. 
  4619.  
  4620.  
  4621. ΓòÉΓòÉΓòÉ 37.5. Debugging Run ΓòÉΓòÉΓòÉ
  4622.  
  4623. When you choose the Run option, the task will start running.  If you define 
  4624. Break Points, the task will pause when it reaches a break point. 
  4625.  
  4626. You can use the mouse to switch back and forth between the task window and the 
  4627. debugger window. 
  4628.  
  4629.  
  4630. ΓòÉΓòÉΓòÉ 37.6. Debugging Step ΓòÉΓòÉΓòÉ
  4631.  
  4632. When you choose the Step option, the task starts running, step by step.  You 
  4633. will be able to see the execution of the command and the results. 
  4634.  
  4635.  
  4636. ΓòÉΓòÉΓòÉ 37.7. Commands [Debug] ΓòÉΓòÉΓòÉ
  4637.  
  4638. In the command window, you can see the task commands and parameters as they 
  4639. appear in the logic flow. 
  4640.  
  4641. The displayed PC line is highlighted. 
  4642.  
  4643. When you scroll through the Command window, you can define a break point for 
  4644. every line by double clicking on it with the mouse Right  button. 
  4645.  
  4646. You can double click on a line with the mouse Left  button to see all the 
  4647. Locate Data Dictionary  related to the command in this line. 
  4648.  
  4649.  
  4650. ΓòÉΓòÉΓòÉ 37.8. Flags [Debug] ΓòÉΓòÉΓòÉ
  4651.  
  4652. In the Flags window you can see the task flags and their status.  You can 
  4653. double click on a flag with the mouse Left  button to  Change  to see and 
  4654. change its status. 
  4655.  
  4656.  
  4657. ΓòÉΓòÉΓòÉ 37.9. Variables [Debug] ΓòÉΓòÉΓòÉ
  4658.  
  4659. In the Variables window you can see the task's local and global data. 
  4660.  
  4661. In each line you can see the data type identifier, title and value. 
  4662.  
  4663. This data includes (Id 1-9,A-Z)  Tables Fields, (Id 0)Local Variables, (Id 0) 
  4664. Strings Constants and (Id +,-)Immediate numeric constants. 
  4665.  
  4666. If a Local Variable has a repetition factor greater than one, a list of values 
  4667. is displayed and the current value highlighted. 
  4668.  
  4669. You can double click on a line with the mouse Left  button to  Change  change 
  4670. the data values. 
  4671.  
  4672.  
  4673. ΓòÉΓòÉΓòÉ 37.10. Tables [Debug] ΓòÉΓòÉΓòÉ
  4674.  
  4675. In the Tables window, you can view the names of the tables used by the task, 
  4676. together with their identifiers, to enable you to refer to the table's 
  4677. Variables (Fields), or to  Commands  processing the table data. 
  4678.  
  4679.  
  4680. ΓòÉΓòÉΓòÉ 37.11. SQL Query [Debug] ΓòÉΓòÉΓòÉ
  4681.  
  4682. In the SQL Query window, you can see the SQL Queries as they are sent to the 
  4683. SQL Server. 
  4684.  
  4685.  
  4686. ΓòÉΓòÉΓòÉ 37.12. Locate Data Dictionary [Debug] ΓòÉΓòÉΓòÉ
  4687.  
  4688. In the Locate Data Dictionary window, you can see all the data related to a 
  4689. chosen command. 
  4690.  
  4691. When you scroll through the  Commands  in the Command window, you can double 
  4692. click on a line with the mouse Left  button to see the data related to the 
  4693. command. 
  4694.  
  4695. In the Locate Data Dictionary window you can double click on a line with the 
  4696. mouse Left  button to  Change  and see the data values. 
  4697.  
  4698.  
  4699. ΓòÉΓòÉΓòÉ 37.13. Debugging Values Change ΓòÉΓòÉΓòÉ
  4700.  
  4701. When you are in the  Variables  Window, the  Flags  window, or the  Locate Data 
  4702. Dictionary  window, you can double click on a line with the mouse Left button 
  4703. to change the data values. 
  4704.  
  4705. A window appropriate to the data format will be opened. 
  4706.  
  4707.  
  4708. ΓòÉΓòÉΓòÉ 38. Utilities ΓòÉΓòÉΓòÉ
  4709.  
  4710. Under the Utilities option, you will find utilities used during development. 
  4711.  
  4712.  1.  User Permeations 
  4713.  
  4714.  2.  Lister 
  4715.  
  4716.  3.  Printers 
  4717.  
  4718.  4.  Locking Resources 
  4719.  
  4720.  
  4721. ΓòÉΓòÉΓòÉ 39. User Permeations ΓòÉΓòÉΓòÉ
  4722.  
  4723. The User utility defines access rights to system resources from OpenWin tasks 
  4724. and the OpenWin environment. 
  4725.  
  4726. When you enter the User utility for the first time, use the system password - 
  4727. OPENWIN 
  4728.  
  4729. After you have defined your system manager password with the same permission as 
  4730. that of the OPENWIN password, delete the OPENWIN password. 
  4731.  
  4732. A "Job" is a group of operations for which you wish to control the access 
  4733. rights. It may be an application, a menu option, a task, a routine, or one line 
  4734. within a task. 
  4735.  
  4736. There are two options in the utility module: 
  4737.  
  4738.  1.  Input 
  4739.  
  4740.  2.  Output 
  4741.  
  4742. See also "Passwrd" - OpenWin environment command, "Ckpw" logic flow command. 
  4743.  
  4744.  
  4745. ΓòÉΓòÉΓòÉ 39.1. Input ΓòÉΓòÉΓòÉ
  4746.  
  4747.  The Input Module contains three windows: 
  4748.  
  4749.  1.  USER HANDLING 
  4750.  
  4751.  2.  JOB HANDLING 
  4752.  
  4753.  3.  PERMISSION HANDLING 
  4754.  
  4755.  
  4756. ΓòÉΓòÉΓòÉ 39.2. USER HANDLING ΓòÉΓòÉΓòÉ
  4757.  
  4758.  In USER HANDLING, a user password is entered into the system.  This window has 
  4759. the following structure: 
  4760.  
  4761. User password.  is a code identifying the user or user's group. 
  4762.  
  4763. General code.  is a parameter which allows you to define the access rights for 
  4764. users with the same password. 
  4765.  
  4766. Work code.  is a numeric code used to define access rights for the user from an 
  4767. OpenWin environment menu.The application's menu command, Passwrd, puts the Work 
  4768. code into the result variable. 
  4769.  
  4770. Description.  Includes a text string describing the user's access rights. 
  4771.  
  4772.  
  4773. ΓòÉΓòÉΓòÉ 39.3. JOB HANDLING ΓòÉΓòÉΓòÉ
  4774.  
  4775. In JOB HANDLING, the default access to a job is defined.  This window has the 
  4776. following structure: 
  4777.  
  4778.  Job code  identifies the job . Enter the job name here and refer to it 
  4779. whenever you use the Logic Flow "Ckpw" command in order to get the permission a 
  4780. user has for this job 
  4781.  
  4782. A "Job" is a group of operations on which you wish to control the access 
  4783. rights. It may be an application, a menu option, a task, a routine, or one line 
  4784. within a task. 
  4785.  
  4786. Access  You must select an access from the list.  If a user has no other 
  4787. permission in the PERMISSION HANDLING for this job code, the access defined 
  4788. here will be returned by the Ckpw command as a result. 
  4789.  
  4790. Description  includes a text string describing the job. 
  4791.  
  4792.  
  4793. ΓòÉΓòÉΓòÉ 39.4. User permeations ΓòÉΓòÉΓòÉ
  4794.  
  4795. In PERMISSION HANDLING, each user receives access rights to a specific job. 
  4796. This window has the following structure: 
  4797.  
  4798.  User password.  is a code identifying the user or user's group which can be 
  4799. selected from the list of passwords in the USER HANDLING window. 
  4800.  
  4801. Job code.can be selected from the job list in the JOB HANDLING window. 
  4802.  
  4803. Group and Sub  are numeric codes which allow you to define different access 
  4804. rights to the job defined for several users with the same password. 
  4805.  
  4806. The value "0" indicates that this applies to all of the groups (Sub-groups). 
  4807. Zero may be used for one or both variables. 
  4808.  
  4809. Access  You must select an access from the list.  It will be returned by the 
  4810. Ckpw command as a result. 
  4811.  
  4812. Description  includes a text string describing the user's access rights. 
  4813.  
  4814.  
  4815. ΓòÉΓòÉΓòÉ 39.5. Output ΓòÉΓòÉΓòÉ
  4816.  
  4817. The Output Module contains three printing options:  USER HANDLING, JOB HANDLING 
  4818. and PERMISSION HANDLING. 
  4819.  
  4820.  
  4821. ΓòÉΓòÉΓòÉ 40. Lister ΓòÉΓòÉΓòÉ
  4822.  
  4823. The lister utility enables you to print your environment, table definitions, 
  4824. view definitions and task sources. 
  4825.  
  4826.  
  4827. ΓòÉΓòÉΓòÉ 41. Printers ΓòÉΓòÉΓòÉ
  4828.  
  4829. The printer utility enables you to define new Printer Control Files. 
  4830.  
  4831.  
  4832. ΓòÉΓòÉΓòÉ 42. Locking Resources ΓòÉΓòÉΓòÉ
  4833.  
  4834. the Locking Resources status while IN USE.   When using this utility, be very 
  4835. careful not to change the normal behavior of the application 
  4836.  
  4837.  
  4838. ΓòÉΓòÉΓòÉ 43. Batch Building ΓòÉΓòÉΓòÉ
  4839.  
  4840. In order to maintain large applications you may rebuild and link an application 
  4841. from a batch file. To do so, you should add the /B qualifier to the command and 
  4842. specify an errors messages file name. a BTH extension will be add to this file 
  4843. name. 
  4844.  
  4845. Following are the building commands formats- 
  4846.  
  4847. Build Environment- 
  4848.  
  4849. BV [Environment file name]  /BErrors 
  4850.  
  4851. Build Tables - 
  4852.  
  4853. BLDTBL [Table definition file name]  /BErrors 
  4854.  
  4855. (Batch tables building dose not overwrite existing tables) 
  4856.  
  4857. Build Views - 
  4858.  
  4859. BLDVEW [View definition file name]  /BErrors 
  4860.  
  4861. (Batch views building dose not overwrite existing views) 
  4862.  
  4863. Build Tasks - 
  4864.  
  4865. BX [Task definition file name]  /BErrors 
  4866.  
  4867. Link Tasks - 
  4868.  
  4869. LN [Table definition file name] /O /BErrors 
  4870.  
  4871. (You must specify the /O (overwrite) qualifier) 
  4872.  
  4873.  
  4874. ΓòÉΓòÉΓòÉ 44. C O M M A N D S   R E F E R E N C E ΓòÉΓòÉΓòÉ
  4875.  
  4876. This guide has been developed to help you learn about OpenWin commands. 
  4877.  
  4878. You may use the Contents  option (select it from the Help Window Action Bar) to 
  4879. view this book by it's chapters order or you may search the Index for a 
  4880. particular module, section, command etc. 
  4881.  
  4882. You can also select one of the following sections - 
  4883.  
  4884.  Menu Commands, 
  4885.  
  4886.  Field Types, 
  4887.  
  4888.  Logic Flow Commands, 
  4889.  
  4890.  Edit Command Operations, 
  4891.  
  4892.  
  4893. ΓòÉΓòÉΓòÉ 45. Menu commands ΓòÉΓòÉΓòÉ
  4894.  
  4895. Here is the list of commands used to create a menu. 
  4896.  
  4897.     Batch 
  4898.  
  4899.     Goto 
  4900.  
  4901.     Endbtch 
  4902.  
  4903.     Endmenu 
  4904.  
  4905.     M-Line 
  4906.  
  4907.     Newbtch 
  4908.  
  4909.     Newmenu 
  4910.  
  4911.     Passwrd 
  4912.  
  4913.     System 
  4914.  
  4915.     Task 
  4916.  
  4917. Choose a command on which you wish to receive further information. 
  4918.  
  4919.  
  4920. ΓòÉΓòÉΓòÉ 45.1. Batch ΓòÉΓòÉΓòÉ
  4921.  
  4922.  Description  Is used to define this menu option.  With the selection of a 
  4923. choice a branching to a label is made.  This label should point out a line that 
  4924. begins a group of commands which are supposed to be executed one after the 
  4925. other.  In the line which the reference is made to there should be a Newbtch 
  4926. command. 
  4927.  
  4928.  Action parameter  A label points to address. 
  4929.  
  4930.  Result variable  None. 
  4931.  
  4932.  Icon  Bitmap name which will appear next to the text.(a .bmp file name without 
  4933. the  .bmp extension ) 
  4934.  
  4935.  Text This text would be shown as the option description. 
  4936.  
  4937.  See also   Newbtch,Endbtch 
  4938.  
  4939.  
  4940. ΓòÉΓòÉΓòÉ 45.2. Endbtch ΓòÉΓòÉΓòÉ
  4941.  
  4942.  Description  Ends a group of commands which are executed one after the other. 
  4943. A group of commands that begins with a Newbtch  command must end with this 
  4944. command. 
  4945.  
  4946.  Action parameter  None. 
  4947.  
  4948.  Result variable  None. 
  4949.  
  4950.  Icon  None.  Text None. 
  4951.  
  4952.  See also  .Newbtch,Batch 
  4953.  
  4954.  
  4955. ΓòÉΓòÉΓòÉ 45.3. Endmenu ΓòÉΓòÉΓòÉ
  4956.  
  4957.  Description  Ends a group of commands which create a menu window.  Every menu 
  4958. window must end with this command. 
  4959.  
  4960.  Action parameter  None. 
  4961.  
  4962.  Result variable  None. 
  4963.  
  4964.  Icon  None. 
  4965.  
  4966.  Text None. 
  4967.  
  4968.  See also    .Newmenu 
  4969.  
  4970.  
  4971. ΓòÉΓòÉΓòÉ 45.4. M-Line ΓòÉΓòÉΓòÉ
  4972.  
  4973.  Description  Used to define a menu option.  With the selection of a choice a 
  4974. branching to a label is made.  This label should indicate a line which begins a 
  4975. sub-menu window.  In the line which the reference is made to there should be 
  4976. the  Newmenu  command. 
  4977.  
  4978.  Action parameter  Label to go to. 
  4979.  
  4980.  Result variable  None. 
  4981.  
  4982.  Icon  Bitmap name which will appear next to the text.( a .bmp file name 
  4983. without the  .bmp extension ) 
  4984.  
  4985.  Text Would be shown as the option description. 
  4986.  
  4987.  See also  .Newmenu,Batch 
  4988.  
  4989.  
  4990. ΓòÉΓòÉΓòÉ 45.5. Newbtch ΓòÉΓòÉΓòÉ
  4991.  
  4992.  Description  Begins a group of commands which are executed one after the 
  4993. other.  Every group of "Batch" commands must begin with this command and end 
  4994. with the Endbtch command. The reference to this command is made from the Batch 
  4995. menu option. 
  4996.  
  4997.  Action parameter  None. 
  4998.  
  4999.  Result variable  None.  Icon  None.  Text None.  See also  .Endbtch,Batch 
  5000.  
  5001.  
  5002. ΓòÉΓòÉΓòÉ 45.6. Newmenu ΓòÉΓòÉΓòÉ
  5003.  
  5004.  Description  Begins a group of commands which make up a menu window.  Every 
  5005. group of commands defining a menu window must begin with this command and end 
  5006. with the Endmenu  command.  The referral to this command is made from the 
  5007. M-Line  menu option.  This command begins the menu tree. 
  5008.  
  5009.  Action parameter  None. 
  5010.  
  5011.  Result variable  None. 
  5012.  
  5013.  Icon  None 
  5014.  
  5015.  Text Will appear as a heading in the menu window. 
  5016.  
  5017.  See also   .Endmenu,M-Line. 
  5018.  
  5019.  
  5020. ΓòÉΓòÉΓòÉ 45.7. Passwrd ΓòÉΓòÉΓòÉ
  5021.  
  5022.  Description  Stops the menu flow and waits for a password 
  5023.  
  5024.  Action parameter  None. 
  5025.  
  5026.  Result variable  Menu variable A-Z.  This variable will receive the user's 
  5027. work code.  In order to get by the passwords, the user must type in a legal 
  5028. password . 
  5029.  
  5030.  Icon  None. 
  5031.  
  5032.  Text None. 
  5033.  
  5034.  
  5035. ΓòÉΓòÉΓòÉ 45.8. System ΓòÉΓòÉΓòÉ
  5036.  
  5037.  Description  Is used as an option in a menu or a group of Batch  commands. 
  5038. When the option is chosen an exit to the operating system is made and the 
  5039. option runs a program,a group of commands or an operating system command. 
  5040.  
  5041.  Action parameter  The command line is used for activating the program, a group 
  5042. of commands or the operating system command.  For example, in order to receive 
  5043. a list of files into a file, the parameter will be a command file name in which 
  5044. the command - DIR >DIRFILE.TMP is typed. 
  5045.  
  5046.  Result variable  None. 
  5047.  
  5048.  Icon  A bitmap name that will appear next to the text describing the choice ( 
  5049. a .bmp file without the .bmp extension) 
  5050.  
  5051.  Text Text describing the option. 
  5052.  
  5053.  See also      .Task 
  5054.  
  5055.  
  5056. ΓòÉΓòÉΓòÉ 45.9. Task ΓòÉΓòÉΓòÉ
  5057.  
  5058.  Description  Is used as an option in a menu or a group of Batch  commands. 
  5059. When this option is chosen an OpenWin (.TSK) task is being executed. 
  5060.  
  5061.  Action parameter  The task name for operating without the TSK extension. 
  5062.  
  5063.  Result variable  A variable, if defined, will receive the exit value from the 
  5064. task. 
  5065.  
  5066.  Icon  A bitmap name that will appear next to the text describing the choice ( 
  5067. a .bmp file without the .bmp extension) 
  5068.  
  5069.  Text Text describing the option in the menu 
  5070.  
  5071.  See also     .System 
  5072.  
  5073.  
  5074. ΓòÉΓòÉΓòÉ 45.10. Goto ΓòÉΓòÉΓòÉ
  5075.  
  5076.  Description  Is used as an option in a group of Batch commands.  When the menu 
  5077. flow reaches this command it diverts the flow to the mentioned label. 
  5078.  
  5079.  Action parameter  The label to divert to. 
  5080.  
  5081.  Result variable  None. 
  5082.  
  5083.  Icon  None. 
  5084.  
  5085.  Text Text describing the option. 
  5086.  
  5087.  See also  .M-Line,Batch 
  5088.  
  5089.  
  5090. ΓòÉΓòÉΓòÉ 46. Fields types ΓòÉΓòÉΓòÉ
  5091.  
  5092. Use this menu to get information about the different field types in the system. 
  5093.  
  5094.  1.        Byte 
  5095.  
  5096.  2.       Integer 
  5097.  
  5098.  3.        Long 
  5099.  
  5100.  4.        Money 
  5101.  
  5102.  5.        Date 
  5103.  
  5104.  6.        Time 
  5105.  
  5106.  7.        Real 
  5107.  
  5108.  8.        Float 
  5109.  
  5110.  9.        Char 
  5111.  
  5112. 10.       Bitmap 
  5113.  
  5114.  
  5115. ΓòÉΓòÉΓòÉ 46.1. Byte ΓòÉΓòÉΓòÉ
  5116.  
  5117. This is a numeric field represented by one byte.  It can have the following 
  5118. formats: 
  5119.  
  5120.  1.        Positive 
  5121.  
  5122.  2.        Negative 
  5123.  
  5124.  The field length is between 1 and 11. 
  5125.  
  5126.  
  5127. ΓòÉΓòÉΓòÉ 46.2. Integer ΓòÉΓòÉΓòÉ
  5128.  
  5129. This is a numeric field which can receive positive or negative whole numbers 
  5130. between 32767 and 32767.  It can have the following formats: 
  5131.  
  5132.  1.        Positive 
  5133.  
  5134.  2.        Negative 
  5135.  
  5136.  The field length is between 1 and 11. 
  5137.  
  5138.  
  5139. ΓòÉΓòÉΓòÉ 46.3. Long ΓòÉΓòÉΓòÉ
  5140.  
  5141. This field is identical to an Integer  field, but can receive numbers greater 
  5142. than 32767. 
  5143.  
  5144. This field can have the following formats: 
  5145.  
  5146.  1.        Positive 
  5147.  
  5148.  2.        Negative 
  5149.  
  5150.  The field length is between 1 and 11. 
  5151.  
  5152.  
  5153. ΓòÉΓòÉΓòÉ 46.4. Money ΓòÉΓòÉΓòÉ
  5154.  
  5155. This is a numeric Real  field which is displayed with a comma after every three 
  5156. digits.  It can have 0..9  formats.  The field length is between 1 and 100. 
  5157.  
  5158.  
  5159. ΓòÉΓòÉΓòÉ 46.5. Date ΓòÉΓòÉΓòÉ
  5160.  
  5161. This is a date field which is saved in four bytes:  day, month, and two year 
  5162. bytes.  When values are received in this field, the legality of the date is 
  5163. checked.  The field can have the following formats: 
  5164.  
  5165.  1. American 
  5166.  
  5167.  2. European 
  5168.  
  5169.  The length of the date field is either 7 or 10. 
  5170.  
  5171.  
  5172. ΓòÉΓòÉΓòÉ 46.6. Time ΓòÉΓòÉΓòÉ
  5173.  
  5174. This field is used to save time variables of hours, minutes and seconds.This 
  5175. field is always characterized as Time, and its length can be either 5 or 8. 
  5176.  
  5177.  
  5178. ΓòÉΓòÉΓòÉ 46.7. Real ΓòÉΓòÉΓòÉ
  5179.  
  5180. This is a real number field.  It can have positive or negative numbers with up 
  5181. to 6 digits after the decimal point.  The formats of these fields are 0..9, and 
  5182. the field length is between 1 and 100, including the decimal point.  The length 
  5183. must be greater than the field format. 
  5184.  
  5185.  
  5186. ΓòÉΓòÉΓòÉ 46.8. Float ΓòÉΓòÉΓòÉ
  5187.  
  5188. This is a real number field, like the Real field, but one which can receive 
  5189. greater numbers. 
  5190.  
  5191.  
  5192. ΓòÉΓòÉΓòÉ 46.9. Char ΓòÉΓòÉΓòÉ
  5193.  
  5194. This  is a char field which can be characterized in the following ways: 
  5195.  
  5196.  1.            Rgh-T-Lf 
  5197.  
  5198.  2.            Lf-T-Rgh 
  5199.  
  5200.  3.            Numeric 
  5201.  
  5202.  4.            Catalog 
  5203.  
  5204.  5.            AmerDate 
  5205.  
  5206.  6.            EuroDate 
  5207.  
  5208.  7.             Time 
  5209.  
  5210.  8.            Hidden-> 
  5211.  
  5212.  9.            Hidden<- 
  5213.  
  5214. Most of the characteristics have a length of between 1 and 100.  The date 
  5215. format has a length of either 7 or 10.  The time format can have a length of 
  5216. either 5 or 8. 
  5217.  
  5218.  
  5219. ΓòÉΓòÉΓòÉ 46.10. Bitmap ΓòÉΓòÉΓòÉ
  5220.  
  5221. In order to display a bitmap field, you define the field as a Char  When you 
  5222. design the window, you define S_BITFLD Style to the field.  The field should 
  5223. have a .bmp file name. 
  5224.  
  5225.  
  5226. ΓòÉΓòÉΓòÉ 47. Fields formats ΓòÉΓòÉΓòÉ
  5227.  
  5228. Under this title there is information about the different field Formats in the 
  5229. system. 
  5230.  
  5231.  Use the Index or the Expand Contents help option to see the different field 
  5232. Formats . 
  5233.  
  5234.  
  5235. ΓòÉΓòÉΓòÉ 47.1. Positive ΓòÉΓòÉΓòÉ
  5236.  
  5237. This format makes it possible to enter positive numbers from the keyboard only. 
  5238.  
  5239.  
  5240. ΓòÉΓòÉΓòÉ 47.2. Negative ΓòÉΓòÉΓòÉ
  5241.  
  5242. This format makes it possible to enter positive and negative numbers from the 
  5243. keyboard. 
  5244.  
  5245.  
  5246. ΓòÉΓòÉΓòÉ 47.3. AmerDate ΓòÉΓòÉΓòÉ
  5247.  
  5248. The date format will be accepted and shown according to the American standard: 
  5249. month/day/year. 
  5250.  
  5251.  
  5252. ΓòÉΓòÉΓòÉ 47.4. EuroDate ΓòÉΓòÉΓòÉ
  5253.  
  5254. The date format will be accepted and shown according to the European standard: 
  5255. day/month/year. 
  5256.  
  5257.  
  5258. ΓòÉΓòÉΓòÉ 47.5. Time ΓòÉΓòÉΓòÉ
  5259.  
  5260. Time is presented in hours:minutes:seconds format 
  5261.  
  5262.  
  5263. ΓòÉΓòÉΓòÉ 47.6. 0..9 ΓòÉΓòÉΓòÉ
  5264.  
  5265. This numeric format indicates the number of digits to be displayed after the 
  5266. decimal point. 
  5267.  
  5268.  
  5269. ΓòÉΓòÉΓòÉ 47.7. Rgh-T-Lf ΓòÉΓòÉΓòÉ
  5270.  
  5271. In this field, the characters are right justified. 
  5272.  
  5273.  
  5274. ΓòÉΓòÉΓòÉ 47.8. Lf-T-Rgh ΓòÉΓòÉΓòÉ
  5275.  
  5276. In this field, the characters are left justified. 
  5277.  
  5278.  
  5279. ΓòÉΓòÉΓòÉ 47.9. Numeric ΓòÉΓòÉΓòÉ
  5280.  
  5281. This field will accept only numeric digits. 
  5282.  
  5283.  
  5284. ΓòÉΓòÉΓòÉ 47.10. Catalog ΓòÉΓòÉΓòÉ
  5285.  
  5286. In this field, the characters are inserted from right to left. 
  5287.  
  5288.  
  5289. ΓòÉΓòÉΓòÉ 47.11. Date ΓòÉΓòÉΓòÉ
  5290.  
  5291. This field is displayed in a date format structure. 
  5292.  
  5293.  
  5294. ΓòÉΓòÉΓòÉ 47.12. Hidden-> ΓòÉΓòÉΓòÉ
  5295.  
  5296. Characters are inserted in this field from left to right, but remain hidden 
  5297. from view. 
  5298.  
  5299.  
  5300. ΓòÉΓòÉΓòÉ 47.13. Hidden<- ΓòÉΓòÉΓòÉ
  5301.  
  5302. Characters are inserted in this field from right to left, but remain hidden 
  5303. from view 
  5304.  
  5305.  
  5306. ΓòÉΓòÉΓòÉ 48. Edit Command Operations ΓòÉΓòÉΓòÉ
  5307.  
  5308.  The Edit Operations  The Edit Operations are operations defined in the Edit 
  5309. Operations  WindowThese operations are actions that the  Edit  operations 
  5310. performs. Some of the edit operations are mandatory, some can appear only once 
  5311. in a group of commands and some can appear several times in the same group. 
  5312. See the detailed explanation for Edit Operations in the appendix. 
  5313.  
  5314.  
  5315. ΓòÉΓòÉΓòÉ 48.1. APPEND ΓòÉΓòÉΓòÉ
  5316.  
  5317.  Description 
  5318.  
  5319. Executes screen operations as preparation for receiving a new record.  The 
  5320. values of the key fields are maintained.  If the user's routine generates (ON) 
  5321. status at the result flag, the value of the last key field is re stored. 
  5322.  
  5323.  Screen operation 
  5324.  
  5325. Opens an empty record under the current record. 
  5326.  
  5327.  Routine execution 
  5328.  
  5329. Vital. Normally includes receiving values for fields and writing functions. 
  5330.  
  5331.  Result flag  Y9..A0. This operation repeats itself as long as the user's 
  5332. routine generates (ON) the result flag  is turned off (OFF). 
  5333.  
  5334.  
  5335. ΓòÉΓòÉΓòÉ 48.2. DELETE ΓòÉΓòÉΓòÉ
  5336.  
  5337.  Description  Executes a screen operation after a record has been deleted. 
  5338.  
  5339.  Screen operation  The screen operation refreshes the screen after a record has 
  5340. been deleted.  A refresh operation is executed only if the result flag 
  5341. returned by the routine indicates the success of the delete operation. 
  5342.  
  5343.  Routine for execution  Vital.  Normally this will include confirmation of the 
  5344. delete operation and a DELETE command. 
  5345.  
  5346.  Result flag  Y9..A0. The screen operation will be executed only if the result 
  5347. flag  is turned off (OFF). 
  5348.  
  5349.  
  5350. ΓòÉΓòÉΓòÉ 48.3. DISPLAY ΓòÉΓòÉΓòÉ
  5351.  
  5352.  Description  Shows the current record in the window.  This command is vital 
  5353. for every edit window. 
  5354.  
  5355.  Screen operation  Presents a window line. 
  5356.  
  5357.  Routine for execution  Vital.  Usually it includes a FIND command.  It can 
  5358. include different commands used for linking between fields or tables. 
  5359.  
  5360.  Result flag  Marks a flag. 
  5361.  
  5362.  
  5363. ΓòÉΓòÉΓòÉ 48.4. EXIT ΓòÉΓòÉΓòÉ
  5364.  
  5365.  Description  Ends the execution of the edit commands and leaves the Edit 
  5366. command.  The flag defined in the Edit command line will have the value "=" 
  5367. (OFF). 
  5368.  
  5369.  Screen operation  None. 
  5370.  
  5371.  Routine for execution  Vital. Will be executed before exiting the Edit 
  5372. command. 
  5373.  
  5374.  Result flag  Marks a flag. 
  5375.  
  5376.  
  5377. ΓòÉΓòÉΓòÉ 48.5. EXIT+,EXIT- ΓòÉΓòÉΓòÉ
  5378.  
  5379.  Description  Leaves the Edit command while turning on the flag  defined in the 
  5380. Edit  command line for the "+" or "-" values respectively. 
  5381.  
  5382.  Screen operation  None. 
  5383.  
  5384.  Routine for execution  Vital.  Can include different functions, including 
  5385. activation of another task. It normally defines the position of the flag. 
  5386.  
  5387.  Result flag   Y9..A0 Optional.  If the routine executed turns on the flag 
  5388. defined here, the edit commands will continue to run and the Edit command 
  5389. execution will not stop after execution of the routine. 
  5390.  
  5391.  
  5392. ΓòÉΓòÉΓòÉ 48.6. FIRST ΓòÉΓòÉΓòÉ
  5393.  
  5394.  Description  Transfers the minimum values to the key fields defined for the 
  5395. edit window. 
  5396.  
  5397.  Screen operation  None. 
  5398.  
  5399.  Routine for execution  Vital.  If you want the beginning key values to be 
  5400. different from the minimum values, you can transfer the requested values. 
  5401.  
  5402.  Result flag  Marks a flag. 
  5403.  
  5404.  
  5405. ΓòÉΓòÉΓòÉ 48.7. INSERT ΓòÉΓòÉΓòÉ
  5406.  
  5407.  Description  Performs a screen operation in preparation for receiving a new 
  5408. record.  The value of the key fields is retained.  If the user's routine turns 
  5409. on (ON) the result flag, the value of the last key field is returned. 
  5410.  
  5411.  Screen operation  Opens an empty record in the location of the current chosen 
  5412. record. 
  5413.  
  5414.  Routine for execution  Vital.Normally includes receiving values for fields and 
  5415. writing them 
  5416.  
  5417.  Result flag  Y9..A0. This operation repeats itself as long as the user's 
  5418. routine leaves the result flag turned off (OFF). 
  5419.  
  5420.  
  5421. ΓòÉΓòÉΓòÉ 48.8. LAST ΓòÉΓòÉΓòÉ
  5422.  
  5423.  Description  Transfers the maximum values to the key fields defined for the 
  5424. editing window. 
  5425.  
  5426.  Screen actions  None. 
  5427.  
  5428.  Routine for execution  Vital.  If you want to limit the key values to maximum 
  5429. values, you can transfer the desired values. 
  5430.  
  5431.  Result flag  Marks a flag. 
  5432.  
  5433.  
  5434. ΓòÉΓòÉΓòÉ 48.9. LOCATE ΓòÉΓòÉΓòÉ
  5435.  
  5436.  Description  Prepares the screen to receive a query for locating a record. 
  5437. Saves the key values and, if the result flag  indicates that the operation has 
  5438. been stopped, restores the value of the last key. 
  5439.  
  5440.  Screen operation  Opens a line at the location of the current chosen record. 
  5441. When the locating succeeds, the window is refreshed. 
  5442.  
  5443.  Routine for execution  Vital. The routine includes receiving a query and 
  5444. locating functions. 
  5445.  
  5446.  Result flag  Y9..A0. Indicates the success or failure of the locating 
  5447. function. 
  5448.  
  5449.  
  5450. ΓòÉΓòÉΓòÉ 48.10. NEXT ΓòÉΓòÉΓòÉ
  5451.  
  5452.  Description  Reads the following record according to the key value.  If there 
  5453. isn't any record to be read, the value of the last key is retained. 
  5454.  
  5455.  Screen operation  Fits the position of the cursor. 
  5456.  
  5457.  Routine for execution  Vital.  Normally includes a Read command that will read 
  5458. the next record.  You can define a routine that will read the previous record 
  5459. in a different way and in different tests. 
  5460.  
  5461.  Result flag  Y9..A0. Used to return an answer from the routine.  The off (OFF) 
  5462. position indicates that a record is currently being read.  The on (ON) position 
  5463. indicates that no record has been found. 
  5464.  
  5465.  
  5466. ΓòÉΓòÉΓòÉ 48.11. PREVIOUS ΓòÉΓòÉΓòÉ
  5467.  
  5468.  Description  Reads the previous record according to the key value. If no 
  5469. record exists, the value of last key is saved. 
  5470.  
  5471.  Screen operation  Fits the position of the cursor. 
  5472.  
  5473.  Routine for execution  Vital.It normally includes a Prev command.  You can 
  5474. define a routine that will read the previous record in a different way and in 
  5475. different tests. 
  5476.  
  5477.  Result flag  Y9..A0. Used to return an answer from the routine.  The off (OFF) 
  5478. position indicates that a record is currently being read.  The on (ON) position 
  5479. indicates that no record has been found. 
  5480.  
  5481.  
  5482. ΓòÉΓòÉΓòÉ 48.12. UPDATE ΓòÉΓòÉΓòÉ
  5483.  
  5484.  Description  Permits the updating of a record. 
  5485.  
  5486.  Screen operation  Restores the values of the record if the updating function 
  5487. is stopped. 
  5488.  
  5489.  Routine for execution 
  5490.  
  5491. Vital. Normally includes input values and updating commands. 
  5492.  
  5493.  Result flag  Y9..A0. Indicates the success or failure of the updating 
  5494. operation. 
  5495.  
  5496.  
  5497. ΓòÉΓòÉΓòÉ 49. Logic Flow Commands ΓòÉΓòÉΓòÉ
  5498.  
  5499. The OpenWin commands are the commands which you define in  the  Logic Flow 
  5500. Section  to create the logic flow for the task.  See the detailed explanation 
  5501. in the appendix. 
  5502.  
  5503.  
  5504. ΓòÉΓòÉΓòÉ 49.1. Accept ΓòÉΓòÉΓòÉ
  5505.  
  5506.  Description  Enables the input of data to a field or to a number of fields 
  5507. combined by a sub-screen.  The PUT-LIN command, or the Edit  command, must 
  5508. precede this command. 
  5509.  
  5510.  Identifier   * 
  5511.  
  5512.  Parameter 1  Sub-screen name. 
  5513.  
  5514.  Identifier   None. 
  5515.  
  5516.  Parameter 2  None. 
  5517.  
  5518.  Identifier   None. 
  5519.  
  5520.  Result variable  None. 
  5521.  
  5522.  Result flag   Can have the following values: 
  5523.  
  5524. = (OFF) Input is ended normally by pressing enter, or clicking with the mouse 
  5525. on another sub-screen. 
  5526.  
  5527. + (ON) Input is ended by pressing esc, or the appropriate mouse button . 
  5528.  
  5529. See also  Put-Lin  ,Edit, Display 
  5530.  
  5531.  
  5532. ΓòÉΓòÉΓòÉ 49.2. Add ΓòÉΓòÉΓòÉ
  5533.  
  5534.  Description  Addition.  This operation can be performed on two numeric values, 
  5535. or on a numeric value and a date. 
  5536.  
  5537.  Identifier   Z-A,9-0,-,+ 
  5538.  
  5539.  Parameter 1  The first term is a local variable, constant, or field from a 
  5540. file which includes a numeric value or date. 
  5541.  
  5542.  Identifier   Z-A,9-0,-,+ 
  5543.  
  5544.  Parameter 2  The second term is a local variable, constant, or field from a 
  5545. file which includes a numeric value or date. 
  5546.  
  5547.  Identifier   Z-A,9-0 
  5548.  
  5549.  Result variable  A local variable, or field from a file with a numeric value 
  5550. or date.  Formats that will include the addition result. 
  5551.  
  5552.  Result flag   Can have the following values: 
  5553.  
  5554.  = (OFF) The result of the addition equals 0. 
  5555.  
  5556.  + (ON) The result of the addition is greater than 0 . 
  5557.  
  5558.  + (ON) The result of the addition is smaller than 0 . If the addition involves 
  5559. a date field, the flag  will be on (ON), in a + position. 
  5560.  
  5561. See also  Diff-M,Diff-Y ,Mult  , Sub 
  5562.  
  5563.  
  5564. ΓòÉΓòÉΓòÉ 49.3. Add-M ΓòÉΓòÉΓòÉ
  5565.  
  5566.  Description  Adds a month to the date. 
  5567.  
  5568.  Identifier   Z-A ,9-0 
  5569.  
  5570.  Parameter 1  Date field. 
  5571.  
  5572.  Identifier   Z-A ,9-0 
  5573.  
  5574.  Parameter 2  A numeric field containing a value which defines the number of 
  5575. months you wish to add to a parameter 1. 
  5576.  
  5577.  Identifier   Z-A ,9-0 
  5578.  
  5579.  Result variable  A date field that will get the calculated date. 
  5580.  
  5581.  Result flag   Always turned on (ON), in the + position. 
  5582.  
  5583. See also  .Add,  Add-Y,  Diff-M,Diff-Y,  Sub 
  5584.  
  5585.  
  5586. ΓòÉΓòÉΓòÉ 49.4. Add-Y ΓòÉΓòÉΓòÉ
  5587.  
  5588.  Description  Adds a year to the date. 
  5589.  
  5590.  Identifier   Z-A ,9-0 
  5591.  
  5592.  Parameter 1  Date field. 
  5593.  
  5594.  Identifier   Z-A ,9-0 
  5595.  
  5596.  Parameter 2  A numeric field containing a value which defines the number of 
  5597. years you wish to add to a parameter 1. 
  5598.  
  5599.  Identifier   Z-A ,9-0 
  5600.  
  5601.  Result variable  A field that will get the calculated date. 
  5602.  
  5603.  Result flag   Always turned on (ON) in the + position. 
  5604.  
  5605. See also  .Add,  Add-M,  Diff-M,Diff-Y,  Sub 
  5606.  
  5607.  
  5608. ΓòÉΓòÉΓòÉ 49.5. Break ΓòÉΓòÉΓòÉ
  5609.  
  5610.  Description  Causes the task to examine the definitions in the Sub totals 
  5611. window in order to make the calculations defined in this window.  If the 
  5612. breaking values change, it performs the routines marked for execution with the 
  5613. changing of the values. 
  5614.  
  5615.  Identifier   None. 
  5616.  
  5617.  Parameter 1  A label which defines the group of examinations in the break 
  5618. window. 
  5619.  
  5620.  Identifier  Z-A ,9-0 
  5621.  
  5622. Optional. 
  5623.  
  5624.  Parameter 2  Optional.  If you define a field with a real value (Not null) the 
  5625. command will close the break and act as if the last break occurred. 
  5626.  
  5627.   Result flag   Isn't effected. 
  5628.  
  5629.  Result variable  None. 
  5630.  
  5631.  
  5632. ΓòÉΓòÉΓòÉ 49.6. Callers ΓòÉΓòÉΓòÉ
  5633.  
  5634.  Description  Calls another OpenWin task and begins its execution. When setting 
  5635. the sharedflag  ZO is turned on (ON) in order to indicate to the summoned 
  5636. program that it is a secondary program, and not the main program.  After th e 
  5637. summoned task is executed the calling program continues its execution. 
  5638.  
  5639.  Identifier   " 
  5640.  
  5641.  Parameter 1  The name of the OpenWin task (.TSK) to be performed. 
  5642.  
  5643.  Identifier   None. 
  5644.  
  5645.  Parameter 2  None. 
  5646.  
  5647.   Result variable  None. 
  5648.  
  5649.  Result flag   Optional - a flag  defined as a result.  flag  It will get the 
  5650. value in the ZO flag  after completing the called task. 
  5651.  
  5652.  
  5653. ΓòÉΓòÉΓòÉ 49.7. Clr-Lin ΓòÉΓòÉΓòÉ
  5654.  
  5655.  Description  Clears a window presented by the Edit  command or Put-Lin  and 
  5656. presents the screen as it was before the window was displayed. 
  5657.  
  5658.  Identifier   # 
  5659.  
  5660.  Parameter 1  The name of the window to be cleared. 
  5661.  
  5662.  Identifier   None. 
  5663.  
  5664.  Parameter 2  None. 
  5665.  
  5666.  Result variable  None. 
  5667.  
  5668.  Result flag   Isn't effected . 
  5669.  
  5670. See also  Put-Lin,Edit, Display 
  5671.  
  5672.  
  5673. ΓòÉΓòÉΓòÉ 49.8. Comp ΓòÉΓòÉΓòÉ
  5674.  
  5675.  Description  Compares the values of two numbers. 
  5676.  
  5677.  Identifier   Z-A,9-0,-,+. 
  5678.  
  5679.  Parameter 1  The first number of the comparison.  It can be a local field, a 
  5680. field from a file, or a numeric field. 
  5681.  
  5682.  Identifier   Z-A,9-0,-,+. 
  5683.  
  5684.  Parameter 2  The second number of the comparison. 
  5685.  
  5686.  Identifier   None. 
  5687.  
  5688.  Result variable  None. 
  5689.  
  5690.  Result flag   Vital.  Can have the following values: 
  5691.  
  5692.  = (OFF)Parameter 1 equals parameter 2. 
  5693.  
  5694.  + (ON) Parameter 1 is greater than parameter 2. 
  5695.  
  5696.  + (ON) Parameter 1 is smaller than parameter 2. 
  5697.  
  5698.  See also  Comps 
  5699.  
  5700.  
  5701. ΓòÉΓòÉΓòÉ 49.9. Comps ΓòÉΓòÉΓòÉ
  5702.  
  5703.  Description  Compares two strings, character by character. 
  5704.  
  5705.  Identifier   Z-A,9-0,!. 
  5706.  
  5707.  Parameter 1  First string of a comparison.  It can be a local field, a field 
  5708. from a file, or a character constant 
  5709.  
  5710.  Identifier   Z-A,9-0,!. 
  5711.  
  5712.  Parameter 2  Second string of a comparison with parameter 1. 
  5713.  
  5714.  Identifier   None. 
  5715.  
  5716.  Result variable  None. 
  5717.  
  5718.  Result flag   Vital.  It can have the following values: 
  5719.  
  5720.  = (OFF) Parameter 1 equals parameter 2. 
  5721.  
  5722.  + (ON) Parameter 1 is greater than parameter 2. 
  5723.  
  5724.  + (ON) Parameter 1 is smaller than parameter 2. 
  5725.  
  5726.  See also  Comp 
  5727.  
  5728.  
  5729. ΓòÉΓòÉΓòÉ 49.10. Decode ΓòÉΓòÉΓòÉ
  5730.  
  5731.  Description  Calculates the numeric value of a char string. 
  5732.  
  5733.  Identifier   Z-A,9-0. 
  5734.  
  5735.  Parameter 1  A char field which contains digits. 
  5736.  
  5737.  Identifier   None. 
  5738.  
  5739.  Parameter 2  None. 
  5740.  
  5741.  Identifier   Z-A,9-0. 
  5742.  
  5743.  Result variable  A field with the numeric value of the string. 
  5744.  
  5745.  Result flag 
  5746.  
  5747.  = (OFF) The calculation succeeded 
  5748.  
  5749.  +/- (ON) The calculation failed. 
  5750.  
  5751.  See also  Encode 
  5752.  
  5753.  
  5754. ΓòÉΓòÉΓòÉ 49.11. Diff-M ΓòÉΓòÉΓòÉ
  5755.  
  5756.  Description  Calculates the difference in months between two dates. 
  5757.  
  5758.  Identifier   Z-A,9-0. 
  5759.  
  5760.  Parameter 1  A date field. 
  5761.  
  5762.  Identifier   Z-A,9-0. 
  5763.  
  5764.  Parameter 2  A date field whose value will be reduced from the value of the 
  5765. date in parameter 1. 
  5766.  
  5767.  Identifier   Z-A,9-0. 
  5768.  
  5769.  Result variable  A numeric field that will receive the difference in months. 
  5770.  
  5771.  Result flag   Can have the following values: 
  5772.  
  5773.  = (OFF) Parameter 1 equals parameter 2. The difference = 0. 
  5774.  
  5775.  + (ON) Parameter 1 is greater than parameter 2 and the difference is positive. 
  5776.  
  5777.  - (ON) Parameter 1 is smaller than parameter 2 and the difference is negative. 
  5778.  
  5779.  See also-  Add,Diff-Y,  Sub 
  5780.  
  5781.  
  5782. ΓòÉΓòÉΓòÉ 49.12. Diff-Y ΓòÉΓòÉΓòÉ
  5783.  
  5784.  Description  Calculates the difference in years between two dates. 
  5785.  
  5786.   Identifier   Z-A,9-0. 
  5787.  
  5788.  Parameter 1  A date field.   Identifier   Z-A,9-0. 
  5789.  
  5790.  Parameter 2  A date field whose value will be reduced from the value of the 
  5791. date in parameter 1. 
  5792.  
  5793.   Identifier   Z-A,9-0. 
  5794.  
  5795.  Result variable  A numeric field which will receive the difference in years. 
  5796.  
  5797.  Result flag   Can have the following values: 
  5798.  
  5799.  = (OFF) Parameter 1 equals parameter 2 and the difference = 0. 
  5800.  
  5801.  + (ON) Parameter 1 is greater than parameter 2 and the difference is positive. 
  5802.  
  5803.  - (ON) Parameter 1 is smaller than parameter 2 and the difference is negative. 
  5804.  
  5805.  Also see  Add,Diff-M,Sub 
  5806.  
  5807.  
  5808. ΓòÉΓòÉΓòÉ 49.13. Delete ΓòÉΓòÉΓòÉ
  5809.  
  5810.  Description  Deletes a record from a file according to the current unique 
  5811. first key value. 
  5812.  
  5813.   Identifier   A-Z,9-1.  Table Identifier. 
  5814.  
  5815.  Parameter 1  None. 
  5816.  
  5817.   Identifier   None. 
  5818.  
  5819.  Parameter 2  None. 
  5820.  
  5821.   Identifier   None. 
  5822.  
  5823.  Result variable  None. 
  5824.  
  5825.  Result flag   Can have the following values: 
  5826.  
  5827.  = (OFF) The delete attempt succeeded. 
  5828.  
  5829.  +/- (ON) The delete attempt failed. 
  5830.  
  5831.  See also-  Rewrite,Write 
  5832.  
  5833.  
  5834. ΓòÉΓòÉΓòÉ 49.14. Display ΓòÉΓòÉΓòÉ
  5835.  
  5836.  Description  Displays a window or sub-screen.  The desired window must be 
  5837. defined before using the display command by the Put-Lin  command, or the Edit 
  5838. command. 
  5839.  
  5840.  Identifier   #,*. 
  5841.  
  5842.  Parameter1  A window or sub-screen name. 
  5843.  
  5844.  Identifier   None. 
  5845.  
  5846.  Parameter 2  None. 
  5847.  
  5848.  Identifier   None. 
  5849.  
  5850.  Result variable  None. 
  5851.  
  5852.  Result flag   Isn't effected. 
  5853.  
  5854.  See also-  Put-Lin,Accept,Display  ,  Edit 
  5855.  
  5856.  
  5857. ΓòÉΓòÉΓòÉ 49.15. Div ΓòÉΓòÉΓòÉ
  5858.  
  5859.  Description  The division of two numbers. 
  5860.  
  5861. In the case of division by zero, the result will be zero. 
  5862.  
  5863.  Identifier   Z-A,0-9,-,+. 
  5864.  
  5865.  Parameter 1  The divided . Can be a numeric constant , a local field, or a 
  5866. field from a file 
  5867.  
  5868.  Identifier   Z-A,0-9,-,+. 
  5869.  
  5870.  Parameter 2  The divider. 
  5871.  
  5872.  Identifier   Z-A,0-9. 
  5873.  
  5874.  Result variable  The division result.  Can be a local field or a field from a 
  5875. file. 
  5876.  
  5877.  Result flag   Can have the following values: 
  5878.  
  5879.  = (OFF)The division result equals - 0. 
  5880.  
  5881.  + (ON) The division result is greater than 0. 
  5882.  
  5883.  - (ON) The division result is smaller than 0. 
  5884.  
  5885.  See also  Add,Mult,Sub 
  5886.  
  5887.  
  5888. ΓòÉΓòÉΓòÉ 49.16. Edit ΓòÉΓòÉΓòÉ
  5889.  
  5890.  Description  The Edit command presents a window to be edited on screen and 
  5891. enables skipping the Put-Lin  This enables and supervises the EDIT operations 
  5892. defined for the window to be edited in the EDIT operations window.  At the 
  5893. beginning of this command, the following sequence of operations is performed, 
  5894. until either the edited window is filled or the records for presentation end: 
  5895. First 
  5896.  
  5897. ,Next 
  5898.  
  5899. ,Display 
  5900.  
  5901. ,Next 
  5902.  
  5903. ,Display  ... 
  5904.  
  5905.  The editing is done according to the requirements of the user and can be 
  5906. automatic, or as defined in the routine which the user programs in the EDIT 
  5907. commands window.  At the end of the EDIT command, the control returns to an 
  5908. EDIT operation which waits for the next user's selection.  The next command in 
  5909. the program after the Edit command will be executed only after the user selects 
  5910. the Exit  option. 
  5911.  
  5912.  Identifier   # 
  5913.  
  5914.  Parameter 1  The window name to be edited. 
  5915.  
  5916.  Identifier   None. 
  5917.  
  5918.  Parameter 2  None. 
  5919.  
  5920.  Identifier   0-9,A-Z,+ 
  5921.  
  5922.  Result variable  A numeric variable.  If the value in this variable is 0, the 
  5923. window will appear in its full size.  If the value is 1, the window will appear 
  5924. as an icon. 
  5925.  
  5926.  Result flag   Effected by the exit way chosen. 
  5927.  
  5928.  = (OFF) To exit the window, the Exit option has been selected. 
  5929.  
  5930.  + (ON) To exit the window, the Exit+ option has been selected. 
  5931.  
  5932.  - (ON) To exit the window, the Exit- option has been selected.  See a detailed 
  5933. explanation for each of the edit commands. 
  5934.  
  5935.  
  5936. ΓòÉΓòÉΓòÉ 49.17. Encode ΓòÉΓòÉΓòÉ
  5937.  
  5938.  Description  Transfers the value of a numeric field to a char field. 
  5939.  
  5940.  Identifier   Z-A,9-0. 
  5941.  
  5942.  Parameter 1  A numeric field whose value is converted to a string. 
  5943.  
  5944.  Identifier   None. 
  5945.  
  5946.  Parameter 2  None. 
  5947.  
  5948.  Identifier   Z-A,9-0. 
  5949.  
  5950.  Result variable  A char field that will receive a string representing the 
  5951. numeric value of a parameter 1. 
  5952.  
  5953.  Result flag  Can have the following values: 
  5954.  
  5955.  = (OFF) The transfer succeeded. 
  5956.  
  5957.  +/- (ON) The transfer failed. 
  5958.  
  5959.  See also-  Decode 
  5960.  
  5961.  
  5962. ΓòÉΓòÉΓòÉ 49.18. Ex-Sql ΓòÉΓòÉΓòÉ
  5963.  
  5964.  Description  Executes a command or a group of SQL commands defined in the SQL 
  5965. Query  . .  window. 
  5966.  
  5967.  Identifier   ? 
  5968.  
  5969.  Parameter 1  A label which characterizes a group of SQL commands defined under 
  5970. this label in the SQL queries window. 
  5971.  
  5972.  Identifier   ! 
  5973.  
  5974.  Parameter 2  Cursor.  Use of the cursor is necessary in the command which 
  5975. refers to a SELECT query, or in the CLOSE command.  The cursor is a char 
  5976. constant  which specifies a specific SELECT query, enabling you to call the 
  5977. same queries mo re than once, with different values in the selected ranges. 
  5978. The Fetch command refers to a specific query by the cursor. 
  5979.  
  5980. You can open up to 10 queries with different cursors at the same time. 
  5981.  
  5982.  Identifier   0-9,A-Z. 
  5983.  
  5984.  Result variable  A numeric field that will get the return code from the SQL 
  5985. server.  If the value of this field is 100 when the query is executed, and 
  5986. there is an error, the system error message wi ll be displayed. 
  5987.  
  5988.  Result flag   Can have the following values: 
  5989.  
  5990.  = (OFF) The query succeeded. 
  5991.  
  5992.  + (ON) The query was rejected by the server. 
  5993.  
  5994.  - (ON) There is no contact with the SQL server. 
  5995.  
  5996.  See also  Fetch 
  5997.  
  5998.  
  5999. ΓòÉΓòÉΓòÉ 49.19. Ext-Val ΓòÉΓòÉΓòÉ
  6000.  
  6001.  Description  Transfers a numeric value to the environment menu variable 
  6002. defined in the menu "Task" command, in order to enable the conditioning of a 
  6003. task execution. 
  6004.  
  6005.  Identifier   (A-Z,0-9) 
  6006.  
  6007.  Parameter 1  A whole numeric field which includes the value to be transferred. 
  6008.  
  6009.  Identifier   None. 
  6010.  
  6011.  Parameter 2  None. 
  6012.  
  6013.  Identifier   None. 
  6014.  
  6015.  Result variable  None. 
  6016.  
  6017.  Result flag   Can have the following values: 
  6018.  
  6019.  = (OFF) The execution succeeded. 
  6020.  
  6021.  +/- (ON) The execution failed. 
  6022.  
  6023.  
  6024. ΓòÉΓòÉΓòÉ 49.20. Fetch ΓòÉΓòÉΓòÉ
  6025.  
  6026.  Description  Transfers the data base value found by the SELECT query to the 
  6027. OpenWin variables. 
  6028.  
  6029.  Identifier   ? 
  6030.  
  6031.  Parameter 1  The SELECT query label performed from which you want to Fetch. 
  6032.  
  6033.  Identifier   ! 
  6034.  
  6035.  Parameter 2  Cursor.  A char constant 
  6036.  
  6037.  Identifier 
  6038.  
  6039. 0-9,A-Z. 
  6040.  
  6041.  Result variable 
  6042.  
  6043. A numeric field that gets the return code from the SQL server.  If the value of 
  6044. this field is 100 when the query is executed, and there is an error, the system 
  6045. error message will be displayed. 
  6046.  
  6047.  Result flag   Can have the following values: 
  6048.  
  6049.  = (OFF) The function succeeded. 
  6050.  
  6051.  + (ON) The function has been rejected by the server. 
  6052.  
  6053.  - (ON) There is no contact with the server 
  6054.  
  6055.  See also-  Ex-Sql 
  6056.  
  6057.  
  6058. ΓòÉΓòÉΓòÉ 49.21. Find ΓòÉΓòÉΓòÉ
  6059.  
  6060.  Description  Finds a record that fits a key value. 
  6061.  
  6062.  Identifier   the table Identifier  1-9,A-Z. 
  6063.  
  6064.  Parameter 1  A key name.  For Sequential, Temporary, Relative and Vector files 
  6065. the key name is always the reserved word RECORD. 
  6066.  
  6067.  Identifier   None. 
  6068.  
  6069.  Parameter 2  None. 
  6070.  
  6071.  Result variable  None. 
  6072.  
  6073.  Result flag   Can have the following values: 
  6074.  
  6075.  = (OFF) A record has been found. 
  6076.  
  6077.  + (ON) A record hasn't been found. 
  6078.  
  6079.  - (ON) There is no access to the record. 
  6080.  
  6081.  
  6082. ΓòÉΓòÉΓòÉ 49.22. Get-Day ΓòÉΓòÉΓòÉ
  6083.  
  6084.  Description  Calculates the day of the week for a specified date. 
  6085.  
  6086.  Identifier   A-Z,0-9. 
  6087.  
  6088.  Parameter 1  A date field. 
  6089.  
  6090.  Identifier   A-Z,0-9. 
  6091.  
  6092.  Parameter 2  A char field.  Will receive the name of the day of the week. 
  6093. Identifier   A-Z,0-9. 
  6094.  
  6095.  Result variable.   A numeric field.  Will get the day in the week as a number 
  6096. between 1 and 7. 
  6097.  
  6098.  Result flag   Always on in the + position.  (ON) 
  6099.  
  6100.  
  6101. ΓòÉΓòÉΓòÉ 49.23. Get-Dat ΓòÉΓòÉΓòÉ
  6102.  
  6103.  Description  Gets the date and hour synchronized with the system clock. 
  6104.  
  6105.  Identifier   A-Z,0-9. 
  6106.  
  6107.  Parameter 1  A date field.  Will receive the date from the system clock. 
  6108.  
  6109.  Identifier   A-Z,0-9. 
  6110.  
  6111.  Parameter 2  A time field.  Will receive the time from the system clock. 
  6112.  
  6113.  Identifier   None. 
  6114.  
  6115.  Result variable  None. 
  6116.  
  6117.  Result flag   Can have the following values: 
  6118.  
  6119.  = (OFF) The operation succeeded. 
  6120.  
  6121.  +/- (ON) The operation failed. 
  6122.  
  6123.  
  6124. ΓòÉΓòÉΓòÉ 49.24. Get-Prn ΓòÉΓòÉΓòÉ
  6125.  
  6126.  Description  Checks the printer number, if chosen at the beginning of the 
  6127. task. 
  6128.  
  6129.  Identifier   None. 
  6130.  
  6131.  Parameter 1  None.  Identifier   A-Z,0-9. 
  6132.  
  6133.  Parameter 2  Optional.  A char field which will receive the PRN file name, if 
  6134. a printer that prints to a file has been chosen 
  6135.  
  6136.  Identifier   A-Z,0-9. 
  6137.  
  6138.  Result variable  A numeric field that will receive the number of the printer 
  6139. selected. 
  6140.  
  6141.  Result flag   Can have the following values: 
  6142.  
  6143.  = (OFF) The printing is to the screen. 
  6144.  
  6145.  + (ON) The printing is to the printer. 
  6146.  
  6147.  
  6148. ΓòÉΓòÉΓòÉ 49.25. Get-Usr ΓòÉΓòÉΓòÉ
  6149.  
  6150.  Description  Gets the user's name. 
  6151.  
  6152.  Identifier   None. 
  6153.  
  6154.  Parameter 1  None. 
  6155.  
  6156.  Identifier   None. 
  6157.  
  6158.  Parameter 2  None. 
  6159.  
  6160.  Identifier   A-Z,0-9. 
  6161.  
  6162.  Result variable  A char field.  Will receive the name of the current user. 
  6163.  
  6164.  Result flag   Can have the following values: 
  6165.  
  6166.  = (OFF) A user name exists. 
  6167.  
  6168.  - (ON) A user name doesn't exist.. 
  6169.  
  6170.  
  6171. ΓòÉΓòÉΓòÉ 49.26. Goto ΓòÉΓòÉΓòÉ
  6172.  
  6173.  Description  Performs a diversion to a label. 
  6174.  
  6175.  Identifier   None. 
  6176.  
  6177.  Parameter 1  None. 
  6178.  
  6179.  Identifier   None. 
  6180.  
  6181.  Parameter 2  None. 
  6182.  
  6183.  Identifier   None. 
  6184.  
  6185.  Result variable  None. 
  6186.  
  6187.  Result flag   Isn't effected. 
  6188.  
  6189.  Label  A label to divert to. 
  6190.  
  6191.  See also-  Perform,Return 
  6192.  
  6193.  
  6194. ΓòÉΓòÉΓòÉ 49.27. Insert ΓòÉΓòÉΓòÉ
  6195.  
  6196.  Description  Transfers a char string to another string in a fixed location. 
  6197.  
  6198.  Identifier   !,Z-A,9-0. 
  6199.  
  6200.  Parameter 1  A char field to transfer into a result variable. 
  6201.  
  6202.  Identifier   A-Z,9-0. 
  6203.  
  6204.  Parameter 2  A numeric field.  The position of parameter 1 in the result 
  6205. variable. 
  6206.  
  6207.  Identifier   !,Z-A,9-0. 
  6208.  
  6209.  Result variable  A char field into which you insert parameter 1. 
  6210.  
  6211.  Result flag   Can have the following values: 
  6212.  
  6213.  = (OFF) The insertion succeeded. 
  6214.  
  6215.  + (ON) The insertion failed. 
  6216.  
  6217.  See also-  Moves,Substr,Strlen 
  6218.  
  6219.  
  6220. ΓòÉΓòÉΓòÉ 49.28. Lock ΓòÉΓòÉΓòÉ
  6221.  
  6222.  Description  Performs a unique locking of resources in a certain value. 
  6223.  
  6224.  Identifier   0,9,A-Z. 
  6225.  
  6226.  Parameter 1  A variable that contains the system code defined in the 
  6227. environment. 
  6228.  
  6229.  Identifier   % 
  6230.  
  6231.  Parameter 2  The name of the resource to be locked.  This resource must be 
  6232. defined in the work environment. 
  6233.  
  6234.  Identifier   A-Z,0-9. 
  6235.  
  6236.  Result variable  A unique value (a field or key) upon which the resource will 
  6237. be locked. 
  6238.  
  6239.  Result flag   Can have the following values: 
  6240.  
  6241.  = (OFF) Locking succeeded. 
  6242.  
  6243.  + (ON) The locking failed. 
  6244.  
  6245.  See also-  Share, Unlock, Get-Env 
  6246.  
  6247.  
  6248. ΓòÉΓòÉΓòÉ 49.29. Message ΓòÉΓòÉΓòÉ
  6249.  
  6250.  Description  Displays a message window. 
  6251.  
  6252.  Identifier   A-Z,0-9,-,+,!. 
  6253.  
  6254.  Parameter 1  The context of the message.  Usually is a char constant, but can 
  6255. also be a numeric constant, or a field. 
  6256.  
  6257.  Identifier   +,0-9,A-Z 
  6258.  
  6259.  Parameter 2  Numeric value.  Sets the user's requested way of reaction. 
  6260.  
  6261. 0 - OpenWin Help message is displayed and the user is asked to click on "ok". 
  6262.  
  6263. 1 - OpenWin Error message is displayed and the user is asked to click on "ok". 
  6264.  
  6265. 2 - The user is asked to choose between "yes" and "no". 
  6266.  
  6267. 3 - The user is asked to choose between "yes", "no" or "cancel". 
  6268.  
  6269.  Identifier   +,0-9,A-Z 
  6270.  
  6271.  Result variable  Numeric value.  The number of warning beeps to be sounded ( 9 
  6272. - 0 ). 
  6273.  
  6274.  Result flag   Can have the following values: 
  6275.  
  6276.  = (OFF) The user typed "yes". 
  6277.  
  6278.  + (ON) The user typed "No". 
  6279.  
  6280.  - (ON) The user typed "cancel". 
  6281.  
  6282.  
  6283. ΓòÉΓòÉΓòÉ 49.30. Move ΓòÉΓòÉΓòÉ
  6284.  
  6285.  Description  Enters a numeric value into a field. 
  6286.  
  6287.  Identifier   A-Z,0-9,-,+. 
  6288.  
  6289.  Parameter 1  The numeric value to be moved. 
  6290.  
  6291.  Identifier   None. 
  6292.  
  6293.  Parameter 2  None. 
  6294.  
  6295.  Identifier   A-Z,0-9. 
  6296.  
  6297.  Result variable  The field to which the numeric value will be moved. 
  6298.  
  6299.  Result flag   Can have the following values: 
  6300.  
  6301.  = (OFF) The transferred value equals 0. 
  6302.  
  6303.  + (ON) The transferred value is greater than 0 
  6304.  
  6305.  - (ON) The transferred value is smaller than 0. 
  6306.  
  6307.  See also-  Moves 
  6308.  
  6309.  
  6310. ΓòÉΓòÉΓòÉ 49.31. Moves ΓòÉΓòÉΓòÉ
  6311.  
  6312.  Description  Enters a char value into a field. 
  6313.  
  6314.  Identifier   A-Z,0-9,!. 
  6315.  
  6316.  Parameter 1  The value to be moved.  Can be a char constant, or a field that 
  6317. contains a string. 
  6318.  
  6319.  Identifier   A-Z,0-9,!. 
  6320.  
  6321.  Parameter 2  Optional.  A string that will be added to the right side of the 
  6322. string in parameter 1. 
  6323.  
  6324.  Identifier   A-Z,0-9. 
  6325.  
  6326.  Result variable  The field to which the string will be moved. 
  6327.  
  6328.  Result flag   Isn't effected. 
  6329.  
  6330.  See also-  Move 
  6331.  
  6332.  
  6333. ΓòÉΓòÉΓòÉ 49.32. Mult ΓòÉΓòÉΓòÉ
  6334.  
  6335.  Description  Multiplies two numbers. 
  6336.  
  6337.  Identifier   A-Z,0-9,-,+. 
  6338.  
  6339.  Parameter 1  The multiplied.  Can be a numeric constant or a numeric field. 
  6340.  
  6341.  Identifier   A-Z,0-9,-,+. 
  6342.  
  6343.  Parameter 2  The multiplier. 
  6344.  
  6345.  Identifier   A-Z,0-9. 
  6346.  
  6347.  Result variable  The product.  A numeric field that will receive the result of 
  6348. the multiplication. 
  6349.  
  6350.  Result flag   Can have the following values: 
  6351.  
  6352.  = (OFF) The product equals 0. 
  6353.  
  6354.  + (ON) The product is greater than 0. 
  6355.  
  6356.  - (ON) The product is smaller than 0. 
  6357.  
  6358.  See also-  Add,Div,  Sub 
  6359.  
  6360.  
  6361. ΓòÉΓòÉΓòÉ 49.33. New-Scr ΓòÉΓòÉΓòÉ
  6362.  
  6363.  Description  Presents a background screen.  This command is mandatory for 
  6364. screen commands, for example, Put-Lin and Edit. 
  6365.  
  6366. This command can be executed only once in a given task. 
  6367.  
  6368.  Identifier   None. 
  6369.  
  6370.  Parameter 1  None. 
  6371.  
  6372.  Identifier   None. 
  6373.  
  6374.  Parameter 2  None. 
  6375.  
  6376.  Identifier   0-9,A-Z,!. 
  6377.  
  6378.  Result variable  A variable used as a screen heading. 
  6379.  
  6380.  Result flag   Isn't effected. 
  6381.  
  6382.  See also-  Clr-lin 
  6383.  
  6384.  
  6385. ΓòÉΓòÉΓòÉ 49.34. Prev ΓòÉΓòÉΓòÉ
  6386.  
  6387.  Description  Reads the previous record in the table. 
  6388.  
  6389.  Identifier   A-Z,1-9. 
  6390.  
  6391.  Parameter 1  One of the following options:  A key name in a table. A record 
  6392. will be read with a key value previous to the current. 
  6393.  
  6394. For Sequential, Temporary, Relative and Vector files, the key name is the 
  6395. reserved word "RECORD" 
  6396.  
  6397.  Identifier   None. 
  6398.  
  6399.  Parameter 2  Optional.  The reserved word "NEXT", which is used for reading 
  6400. non-unique keys. 
  6401.  
  6402.  Identifier   None. 
  6403.  
  6404.  Result variable  None. 
  6405.  
  6406.  Result flag   Can have the following values: 
  6407.  
  6408.  = (OFF) The previous record has been found. 
  6409.  
  6410.  + (ON) The current record is the first in the table. 
  6411.  
  6412.  - (ON) There is no access to the record. 
  6413.  
  6414.  See also-  Read. 
  6415.  
  6416.  
  6417. ΓòÉΓòÉΓòÉ 49.35. Print ΓòÉΓòÉΓòÉ
  6418.  
  6419.  Description  Prints the contents of a window to the selected output device. 
  6420. Selection will be made during run time from the printers defined in the 
  6421. environment  printers section  . 
  6422.  
  6423.  Identifier   # 
  6424.  
  6425.  Parameter 1  The name of the window to be printed. 
  6426.  
  6427.  Identifier   None. 
  6428.  
  6429.  Parameter 2  None. 
  6430.  
  6431.  Identifier   None. 
  6432.  
  6433.  Result variable  None. 
  6434.  
  6435.  Result flag   Isn't effected. 
  6436.  
  6437.  
  6438. ΓòÉΓòÉΓòÉ 49.36. Put-Lin ΓòÉΓòÉΓòÉ
  6439.  
  6440.  Description  Prepares the window for presentation on the screen.  A New-Scr 
  6441. command must be performed once to enable this command. 
  6442.  
  6443.  Identifier   # 
  6444.  
  6445.  Parameter 1  Window name. 
  6446.  
  6447.  Identifier   None. 
  6448.  
  6449.  Parameter 2  None. 
  6450.  
  6451.  Identifier   +,0-9,A-Z. 
  6452.  
  6453.  Result variable  A numeric variable or a numeric constant.  If the value in 
  6454. this variable is 0, the window will appear on the screen in its full size.If 
  6455. its value is 1, the window will appear as an icon. 
  6456.  
  6457.  Result flag   Isn't effected. 
  6458.  
  6459.  See also-  New-Scr, Accept, Display,  Edit 
  6460.  
  6461.  
  6462. ΓòÉΓòÉΓòÉ 49.37. Range ΓòÉΓòÉΓòÉ
  6463.  
  6464.  Description  Activates a range check for the ranges defined in the Range 
  6465. section.  . 
  6466.  
  6467.  Identifier   None. 
  6468.  
  6469.  Parameter 1  A label representing a group of ranges defined in the range 
  6470. window. 
  6471.  
  6472.  Identifier   None. 
  6473.  
  6474.  Parameter 2  None. 
  6475.  
  6476.  Identifier   None. 
  6477.  
  6478.  Result variable  None. 
  6479.  
  6480.  Result flag   Will receive the following values: 
  6481.  
  6482.  = (OFF) The checked fields are in range. 
  6483.  
  6484.  + (ON) The checked fields are not in range. 
  6485.  
  6486.  See also-  Comp,Comps 
  6487.  
  6488.  
  6489. ΓòÉΓòÉΓòÉ 49.38. Read ΓòÉΓòÉΓòÉ
  6490.  
  6491.  Description  Reads the record following the current record in the table. 
  6492.  
  6493.  Identifier   A-Z,1-9. 
  6494.  
  6495.  Parameter 1  A key name in a table.  A record with a key value greater than 
  6496. the current key value will be read. 
  6497.  
  6498. For Sequential, Temporary, Relative and Vector files, the key name is the 
  6499. reserved word "RECORD" 
  6500.  
  6501.  Identifier   None. 
  6502.  
  6503.  Parameter 2  Optional.  The reserved word "NEXT", which is used for reading 
  6504. non-unique keys. 
  6505.  
  6506.  Identifier   None. 
  6507.  
  6508.  Result variable  None. 
  6509.  
  6510.  Result flag   Can receive the following values: 
  6511.  
  6512.  = (OFF) The next record has been found. 
  6513.  
  6514.  + (ON) The current record is the last in the table. 
  6515.  
  6516.  - (ON) There is no access to the record. 
  6517.  
  6518.  See also-  Prev, 
  6519.  
  6520.  
  6521. ΓòÉΓòÉΓòÉ 49.39. Reopen ΓòÉΓòÉΓòÉ
  6522.  
  6523.  Description  Closes a physical table and enables the opening of another 
  6524. physical table with a structure that fits the table definition specified in the 
  6525. table definition section. 
  6526.  
  6527.  Identifier   A-Z,1-9.  The Identifier  of a table defined in the table 
  6528. definition window.  Parameter 1  None. 
  6529.  
  6530.  Identifier   A-Z,0-9,!. 
  6531.  
  6532.  Parameter 2  To close a table, skip this parameter.  To open a table, choose a 
  6533. variable name which includes the name of the physical file to be opened.  Note 
  6534. that the file structure must be identical with that of the table defined in the 
  6535. table definition win dow. 
  6536.  
  6537.  Identifier   A-Z,0-9. 
  6538.  
  6539.  Result variable  To close a table, skip this parameter.  To open a table, 
  6540. choose a variable name which includes the extension of the physical table to be 
  6541. opened. 
  6542.  
  6543.  Result flag   Can receive the following values: 
  6544.  
  6545.  = (OFF) The table has been opened successfully. 
  6546.  
  6547.  +/- (ON) This physical table cannot be opened. 
  6548.  
  6549.  
  6550. ΓòÉΓòÉΓòÉ 49.40. Re-Start ΓòÉΓòÉΓòÉ
  6551.  
  6552.  Description 
  6553.  
  6554. Repeats the execution of a task from the beginning. 
  6555.  
  6556. This command cats like the last "Return" command in the task. It closes all the 
  6557. open "Breaks" if there are any and Print or display a report if the task is 
  6558. using printing commands. 
  6559.  
  6560. The values of local variables don't decrease to zero.  If you wish to 
  6561. initialize them , use the Move(s) commands. 
  6562.  
  6563.  Identifier   None. 
  6564.  
  6565.  Parameter 1  None. 
  6566.  
  6567.  Identifier   None. 
  6568.  
  6569.  Parameter 2  None. 
  6570.  
  6571.  Identifier   None. 
  6572.  
  6573.  Result variable  None. 
  6574.  
  6575.  Result flag   Isn't effected. 
  6576.  
  6577.  
  6578. ΓòÉΓòÉΓòÉ 49.41. Return ΓòÉΓòÉΓòÉ
  6579.  
  6580.  Description  Indicates the ending of a routine that was characterized at the 
  6581. beginning by a label, and returns the flow to the command that called this 
  6582. routine.  If this command ends a task that was called by a CALLERS command, the 
  6583. calling task will continue in the following command line. If the routine that 
  6584. ends the task is called from the Edit  command, the control will return to the 
  6585. Edit  command.  If the routine that ends the task is called by the Perform 
  6586. command, the flow will continue from the command following the calling of the 
  6587. perform command. 
  6588.  
  6589. The task routines - a Return  command at the end of a main routine (defined in 
  6590. the task General Parameters  )  ends the routine and starts executing the next 
  6591. routine.  After the execution of the last routine in the task, the task ends. 
  6592.  
  6593.  Identifier   None. 
  6594.  
  6595.  Parameter 1  None. 
  6596.  
  6597.  Identifier   None. 
  6598.  
  6599.  Parameter 2  None. 
  6600.  
  6601.  Identifier   None. 
  6602.  
  6603.  Result variable  None. 
  6604.  
  6605.  Result flag   Isn't effected. 
  6606.  
  6607.  See also-  Goto,Perform 
  6608.  
  6609.  
  6610. ΓòÉΓòÉΓòÉ 49.42. Rewrite ΓòÉΓòÉΓòÉ
  6611.  
  6612.  Description  Updates the contents of an existing record in a table. 
  6613.  
  6614.  Identifier   Table identifier, A-Z, 9-0. 
  6615.  
  6616.  Parameter 1  None.  The record with the current key value will be updated. 
  6617.  
  6618.  Identifier   None. 
  6619.  
  6620.  Parameter 2  None. 
  6621.  
  6622.  Identifier   None. 
  6623.  
  6624.  Result variable  None. 
  6625.  
  6626.  Result flag   Can receive the following values: 
  6627.  
  6628.  = (OFF) The record has been updated. 
  6629.  
  6630.  + (ON) There is no record with the key value. 
  6631.  
  6632.  - (ON) There is no access to this record. 
  6633.  
  6634.  See also-  Write 
  6635.  
  6636.  
  6637. ΓòÉΓòÉΓòÉ 49.43. Search ΓòÉΓòÉΓòÉ
  6638.  
  6639.  Description  Searches for a character string in another string. 
  6640.  
  6641.  Identifier   A-Z,0-9. 
  6642.  
  6643.  Parameter 1  A requested string. 
  6644.  
  6645.  Identifier   A-Z,0-9. 
  6646.  
  6647.  Parameter 2  A string in which to search. 
  6648.  
  6649.  Identifier   A-Z,0-9. 
  6650.  
  6651.  Result variable  Optional.  A numeric field that will get the location of the 
  6652. requested string in the string being searched. 
  6653.  
  6654.  Result flag   Can have the following values: 
  6655.  
  6656.  = (OFF) The requested string has been found. 
  6657.  
  6658.  + (ON) The string has not been found. 
  6659.  
  6660.  
  6661. ΓòÉΓòÉΓòÉ 49.44. Set-Scr ΓòÉΓòÉΓòÉ
  6662.  
  6663.  Description  Displays or Hide a sub-screen.  The desired sub-screen must be in 
  6664. a valid window previously defined using the display command by the Put-Lin 
  6665. command, or the Edit  command. 
  6666.  
  6667. You cannot display (using Display command) or input data (using Accept command) 
  6668. to a sub-screen that is in Hide status.   Identifier   *. 
  6669.  
  6670.  Parameter1  A sub-screen name. 
  6671.  
  6672.  Identifier   None. 
  6673.  
  6674.  Parameter 2  None. 
  6675.  
  6676.  Identifier   None. 
  6677.  
  6678.  Result variable 
  6679.  
  6680. Hide or Show 
  6681.  
  6682. Sets the sub-screen status. 
  6683.  
  6684.  Result flag   Isn't effected. 
  6685.  
  6686.  See also-  Put-Lin,Accept,Display  ,  Edit 
  6687.  
  6688.  
  6689. ΓòÉΓòÉΓòÉ 49.45. Seton ΓòÉΓòÉΓòÉ
  6690.  
  6691.  Description  Turns on a logical flag 
  6692.  
  6693.  Identifier   None. 
  6694.  
  6695.  Parameter 1  None. 
  6696.  
  6697.  Identifier   None. 
  6698.  
  6699.  Parameter 2  None. 
  6700.  
  6701.  Identifier   None. 
  6702.  
  6703.  Result variable  None. 
  6704.  
  6705.  Result flag   A logical flag  (A0-Z9).  Will turn on in the + position.  (ON) 
  6706.  
  6707.  Goto Label  Optional.  If defined, the task will be diverted to this label. 
  6708.  
  6709.  See also-  Setoff 
  6710.  
  6711.  
  6712. ΓòÉΓòÉΓòÉ 49.46. Setoff ΓòÉΓòÉΓòÉ
  6713.  
  6714.  Description  Turns off a logical flag 
  6715.  
  6716.  Identifier   None. 
  6717.  
  6718.  Parameter 1  None. 
  6719.  
  6720.  Identifier   None. 
  6721.  
  6722.  Parameter 2  None. 
  6723.  
  6724.  Identifier   None. 
  6725.  
  6726.  Result variable  None. 
  6727.  
  6728.  Result flag   A logical flag  (A0-Z9).  Will turn off in the = position. 
  6729.  
  6730.  See also-  Seton 
  6731.  
  6732.  
  6733. ΓòÉΓòÉΓòÉ 49.47. Share ΓòÉΓòÉΓòÉ
  6734.  
  6735.  Description  Executes a non-unique locking of resources with a certain value. 
  6736.  
  6737.  Identifier   A-Z, 9-0. 
  6738.  
  6739.  Parameter 1  A variable that contains the current environment code. 
  6740.  
  6741.  Identifier   % 
  6742.  
  6743.  Parameter 2  The name of the resource to be locked.  This resource must be 
  6744. defined in the working environment. 
  6745.  
  6746.  Identifier   A-Z,0-9. 
  6747.  
  6748.  Result variable  A field or a key with whose value the resource will be 
  6749. locked. 
  6750.  
  6751.  Result flag   Can receive the following values: 
  6752.  
  6753.  = (OFF) The locking succeeded. 
  6754.  
  6755.  + (ON) The locking failed. 
  6756.  
  6757.  See also-  Lock,Unlock 
  6758.  
  6759.  
  6760. ΓòÉΓòÉΓòÉ 49.48. Skip ΓòÉΓòÉΓòÉ
  6761.  
  6762.  Description  Form feeds one page in the printer. 
  6763.  
  6764.  Identifier   None. 
  6765.  
  6766.  Parameter 1  None. 
  6767.  
  6768.  Identifier   None. 
  6769.  
  6770.  Parameter 2  None. 
  6771.  
  6772.  Identifier   None. 
  6773.  
  6774.  Result variable  None. 
  6775.  
  6776.  Result flag   Isn't effected. 
  6777.  
  6778.  See also-  Print  command. 
  6779.  
  6780.  
  6781. ΓòÉΓòÉΓòÉ 49.49. Sshift ΓòÉΓòÉΓòÉ
  6782.  
  6783.  Description  Moves the contents of a string left or right by a given number of 
  6784. characters. 
  6785.  
  6786.  Identifier   Z-A,9-0. 
  6787.  
  6788.  Parameter 1  A char field whose contents must be moved. 
  6789.  
  6790.  Identifier   -,+. 
  6791.  
  6792.  Parameter 2  Numeric.  The number of characters to be moved. 
  6793.  
  6794.  Identifier   None. 
  6795.  
  6796.  Result variable  None.  The moving is done in parameter 1. 
  6797.  
  6798.  Result flag   Can receive the following values: 
  6799.  
  6800.  = (OFF) The moving succeeded. 
  6801.  
  6802.  +/- (ON) The moving failed. 
  6803.  
  6804.  Example-  A local field called "field" of Lf-T-Rgh Char type is given, with 
  6805. length 6 and contents "123456".  The command- "Sshift 0 field +3" will cause 
  6806. its contents to turn into "123".The command- "Sshift field -3" will convert it 
  6807. to "456". 
  6808.  
  6809.  
  6810. ΓòÉΓòÉΓòÉ 49.50. Stop ΓòÉΓòÉΓòÉ
  6811.  
  6812.  Description  Stops the execution of a task and returns the control to the 
  6813. level at which the task was called. 
  6814.  
  6815.  Identifier   None. 
  6816.  
  6817.  Parameter 1  None. 
  6818.  
  6819.  Identifier   None. 
  6820.  
  6821.  Parameter 2  None. 
  6822.  
  6823.  Identifier   None. 
  6824.  
  6825.  Result variable  None. 
  6826.  
  6827.  Result flag   None. 
  6828.  
  6829.  See also-  Return 
  6830.  
  6831.  
  6832. ΓòÉΓòÉΓòÉ 49.51. Strlen ΓòÉΓòÉΓòÉ
  6833.  
  6834.  Description  Calculates the length of a string. 
  6835.  
  6836.  Identifier   !,A-Z,0-9. 
  6837.  
  6838.  Parameter 1  A field whose length is to be calculated.  A char field. 
  6839.  
  6840.  Identifier   None. 
  6841.  
  6842.  Parameter 2  None. 
  6843.  
  6844.  Identifier   A-Z,0-9. 
  6845.  
  6846.  Result variable  The length of the string in parameter 1. A numeric file. 
  6847.  
  6848.  Result flag   Can receive the following values: 
  6849.  
  6850.  = (OFF) The calculation succeeded 
  6851.  
  6852.  + (ON) The calculation failed. 
  6853.  
  6854.  See also-  Insert 
  6855.  
  6856.  
  6857. ΓòÉΓòÉΓòÉ 49.52. Sub ΓòÉΓòÉΓòÉ
  6858.  
  6859.  Description  Subtracts numeric values.  Can also refer to date fields. 
  6860.  
  6861.  Identifier   A-Z,0-9,-,+. 
  6862.  
  6863.  Parameter 1  The subtracted.  A numeric field or a date field. 
  6864.  
  6865.  Identifier   A-Z,0-9,-,+. 
  6866.  
  6867.  Parameter 2  The subtraction. 
  6868.  
  6869.  Identifier   A-Z,0-9. 
  6870.  
  6871.  Result variable  The remainder.  Usually a numeric field.  If parameter 1 is a 
  6872. date and parameter 2 is a number, the result field has to be a date filed . If 
  6873. parameters 1 and 2 are date fields, the result field must be a numeric filed 
  6874. that will receive the difference in days between the dates. 
  6875.  
  6876.  Result flag   Can receive the following values: 
  6877.  
  6878.  = (OFF) The subtraction result equals 0. 
  6879.  
  6880.  + (ON) The subtraction result is greater than 0. 
  6881.  
  6882.  - (ON) The subtraction result is smaller than 0. 
  6883.  
  6884.  See also-  Add, Diff-M,Diff-Y,Div,  Mult 
  6885.  
  6886.  
  6887. ΓòÉΓòÉΓòÉ 49.53. Substr ΓòÉΓòÉΓòÉ
  6888.  
  6889.  Description  Cuts a sub-string out of a char string 
  6890.  
  6891.  Identifier   +,A-Z,0-9. 
  6892.  
  6893.  Parameter 1  The length of the requested sub-string.  A field or a numeric 
  6894. constant. 
  6895.  
  6896.  Identifier   +,A-Z,0-9. 
  6897.  
  6898.  Parameter 2  The location in the string from which the sub-string will be 
  6899. taken.  A field or a numeric constant. 
  6900.  
  6901.  Identifier   A-Z,0-9. 
  6902.  
  6903.  Result variable  The string from which you cut the sub-string.  The sub-string 
  6904. that is cut will change the contents of the string in this field.  The field 
  6905. can be a local field or a field from a table. 
  6906.  
  6907.  Result flag   Can receive the following values- 
  6908.  
  6909.  = (OFF) The cutting attempt succeeded. 
  6910.  
  6911.  + (ON) The cutting attempt failed. 
  6912.  
  6913.  See also-  Sshift 
  6914.  
  6915.  
  6916. ΓòÉΓòÉΓòÉ 49.54. Title ΓòÉΓòÉΓòÉ
  6917.  
  6918.  Description  Prints the title of a window.  The title will contain the field 
  6919. descriptions. 
  6920.  
  6921.  Identifier   # 
  6922.  
  6923.  Parameter 1  Window name. 
  6924.  
  6925.  Identifier   None. 
  6926.  
  6927.  Parameter 2  None. 
  6928.  
  6929.  Identifier   None. 
  6930.  
  6931.  Result variable  None. 
  6932.  
  6933.  Result flag   Isn't effected. 
  6934.  
  6935.  
  6936. ΓòÉΓòÉΓòÉ 49.55. Unlock ΓòÉΓòÉΓòÉ
  6937.  
  6938.  Description  Releases a resource lock with a specified value. 
  6939.  
  6940.  Identifier   A-Z, 9-0 
  6941.  
  6942.  Parameter 1  A field the contains the environment code. 
  6943.  
  6944.  Identifier   % 
  6945.  
  6946.  Parameter 2  Resource name. 
  6947.  
  6948.  Identifier   A-Z,0-9. 
  6949.  
  6950.  Result variable  The value in which the resource is locked and which you wish 
  6951. to release.  Can be a key or a field. 
  6952.  
  6953.  Result flag   Can receive the following values: 
  6954.  
  6955.  = (OFF) The release request succeeded. 
  6956.  
  6957.  + (ON) The release request failed. 
  6958.  
  6959.  See also-  Lock,Share 
  6960.  
  6961.  
  6962. ΓòÉΓòÉΓòÉ 49.56. Write ΓòÉΓòÉΓòÉ
  6963.  
  6964.  Description  Writes a new record into a table according to the main key value. 
  6965.  
  6966.  Identifier   A-Z,1-9.  The table Identifier  to which the record should be 
  6967. written to.  A record will be written with the current key value. 
  6968.  
  6969.  Parameter 1  None. 
  6970.  
  6971.  Identifier   None. 
  6972.  
  6973.  Parameter 2  None. 
  6974.  
  6975.  Identifier   None. 
  6976.  
  6977.  Result variable  None. 
  6978.  
  6979.  Result flag   Can receive the following values: 
  6980.  
  6981.  = (OFF) The writing succeeded. 
  6982.  
  6983.  - (ON) There is no access to the record. 
  6984.  
  6985.  + (ON) The record already exists. 
  6986.  
  6987.  See also-  Rewrite 
  6988.  
  6989.  
  6990. ΓòÉΓòÉΓòÉ 49.57. Perform ΓòÉΓòÉΓòÉ
  6991.  
  6992.  Description  Calls a routine identified by a label.  The routine ends with a 
  6993. return command which restores the flow to the command following the calling 
  6994. command. 
  6995.  
  6996.  Identifier   None. 
  6997.  
  6998.  Parameter 1  None. 
  6999.  
  7000.  Identifier   None. 
  7001.  
  7002.  Parameter 2  None. 
  7003.  
  7004.  Identifier   None. 
  7005.  
  7006.  Result variable  None. 
  7007.  
  7008.  Result flag   None. 
  7009.  
  7010.  Label  A label which identifies the addressed routine. 
  7011.  
  7012.  See also  Return,  Goto 
  7013.  
  7014.  
  7015. ΓòÉΓòÉΓòÉ 49.58. Get-Env ΓòÉΓòÉΓòÉ
  7016.  
  7017.  Description  Retrieves the current environment code.  Comes before a Lock 
  7018. command. 
  7019.  
  7020.  Identifier   None. 
  7021.  
  7022.  Parameter 1  None. 
  7023.  
  7024.  Identifier   None. 
  7025.  
  7026.  Parameter 2  None. 
  7027.  
  7028.  Identifier   A-Z,9-0 
  7029.  
  7030.  Result variable  A field that will receive the environment code. 
  7031.  
  7032.  Result flag   Can receive the following values: 
  7033.  
  7034.  = (OFF) An active environment was found. 
  7035.  
  7036.  + (ON) No active environment was found. 
  7037.  
  7038.  Label  A label which identifies the addressed routine. 
  7039.  
  7040.  See also  Lock Unlock Share 
  7041.  
  7042.  
  7043. ΓòÉΓòÉΓòÉ 49.59. VSetInx ΓòÉΓòÉΓòÉ
  7044.  
  7045.  Description  Sets and gets the current vector pointer (index) of a Local 
  7046. Variable   with a repetition factor greater than 1. 
  7047.  
  7048.  Identifier   0. 
  7049.  
  7050.  Parameter 1  The vector name. 
  7051.  
  7052.  Identifier   +,0-9,A-Z. 
  7053.  
  7054.  Parameter 2  Numeric.  The index value of the desired vector.. 
  7055.  
  7056.  Identifier   A-Z,9-0 
  7057.  
  7058.  Result variable  A field that will receive the current vector index value. 
  7059.  
  7060.  Result flag   Can receive the following values: 
  7061.  
  7062.  = (OFF) Command performed. 
  7063.  
  7064.  +/- (ON)Error. 
  7065.  
  7066.  See also  VSetInx VDelete VAdd VUpd VFind VSort 
  7067.  
  7068.  
  7069. ΓòÉΓòÉΓòÉ 49.60. VDelete ΓòÉΓòÉΓòÉ
  7070.  
  7071.  Description  Deletes a vector appearance. 
  7072.  
  7073.  Identifier   None. 
  7074.  
  7075.  Parameter 1  None. 
  7076.  
  7077.  Identifier   +,0-9,A-Z. 
  7078.  
  7079.  Parameter 2  Numeric.  The number of appearances to be deleted from the 
  7080. vector.  Deletion is done from the current vector index onward. 
  7081.  
  7082.  Identifier   0. 
  7083.  
  7084.  Result variable  The vector name. 
  7085.  
  7086.  Result flag   Can receive the following values: 
  7087.  
  7088.  = (OFF) Command performed. 
  7089.  
  7090.  +/- (ON) Error. 
  7091.  
  7092.  See also  VSetInx VDelete VAdd VUpd VFind VSort 
  7093.  
  7094.  
  7095. ΓòÉΓòÉΓòÉ 49.61. VAdd ΓòÉΓòÉΓòÉ
  7096.  
  7097.  Description  Add appearances to a vector. 
  7098.  
  7099.  Identifier   0-9,A-Z,!,+,-. 
  7100.  
  7101.  Parameter 1  A field to be added to the vector. 
  7102.  
  7103.  Identifier   +,-,0-9,A-Z. 
  7104.  
  7105.  Parameter 2  Numeric.  The number of appearances to be added.  If positive, 
  7106. after the current index; if negative, before the current index. 
  7107.  
  7108.  Identifier   0 
  7109.  
  7110.  Result variable  A vector name. 
  7111.  
  7112.  Result flag   Can receive the following values: 
  7113.  
  7114.  = (OFF) Command performed. 
  7115.  
  7116.  +/- (ON) Error. 
  7117.  
  7118.  See also  VSetInx VDelete VAdd VUpd VFind VSort 
  7119.  
  7120.  
  7121. ΓòÉΓòÉΓòÉ 49.62. VUpd ΓòÉΓòÉΓòÉ
  7122.  
  7123.  Description 
  7124.  
  7125. Same as VAdd, but updates the field appearances and does not add new ones. 
  7126.  
  7127.  See also  VSetInx VDelete VAdd VUpd VFind VSort 
  7128.  
  7129.  
  7130. ΓòÉΓòÉΓòÉ 49.63. VFind ΓòÉΓòÉΓòÉ
  7131.  
  7132.  Description  Finds a value in one of the vector appearances and sets the 
  7133. current vector pointer (index) 
  7134.  
  7135.  Identifier   0-9,A-Z,+,-,!. 
  7136.  
  7137.  Parameter 1  A field (value) to be found. 
  7138.  
  7139.  Identifier   +,0-9,A-Z. 
  7140.  
  7141.  Parameter 2  Numeric.  The number of identical subsequent appearances to look 
  7142. for. 
  7143.  
  7144.  Identifier   0 
  7145.  
  7146.  Result variable  Vector name. 
  7147.  
  7148.  Result flag   Can receive the following values: 
  7149.  
  7150.  = (OFF) Appearances were found. 
  7151.  
  7152.  +/- (ON) Appearances were not found. 
  7153.  
  7154.  See also  VSetInx VDelete VAdd VUpd VFind VSort 
  7155.  
  7156.  
  7157. ΓòÉΓòÉΓòÉ 49.64. VSort ΓòÉΓòÉΓòÉ
  7158.  
  7159.  Description  Sorts the vector appearances. 
  7160.  
  7161.  Identifier   None. 
  7162.  
  7163.  Parameter 1  None. 
  7164.  
  7165.  Identifier   +,-,0-9,A-Z. 
  7166.  
  7167.  Parameter 2  Numeric.  Positive or negative.  Sets the sorting order. 
  7168.  
  7169.  Identifier   0 
  7170.  
  7171.  Result variable  Vector name. 
  7172.  
  7173.  Result flag   Can receive the following values: 
  7174.  
  7175.  = (OFF) Command performed. 
  7176.  
  7177.  +/- (ON) Error. 
  7178.  
  7179.  See also  VSetInx VDelete VAdd VUpd VFind VSort 
  7180.  
  7181.  
  7182. ΓòÉΓòÉΓòÉ 49.65. For ΓòÉΓòÉΓòÉ
  7183.  
  7184.  Description 
  7185.  
  7186. Begins a "For" loop.  It has the following format: 
  7187.  
  7188. FOR <Range> <VarLoop> [<Step>] 
  7189.  
  7190. On the first step, this command checks the range's condition and, if its value 
  7191. is TRUE, it processes commands into the loop's block.  After the first step, 
  7192. the loop's step is added to its variable and after the range's condition is 
  7193. checked. If its value is TRUE, the loop's block is processed.  Otherwise, the 
  7194. loop's block is skipped. 
  7195.  
  7196. A "For" block begins at the "For" command and ends at the "EndBlck" command. 
  7197.  
  7198.  Identifier 
  7199.  
  7200. None. 
  7201.  
  7202.  Parameter 1 
  7203.  
  7204. <Range> - The loop's condition.  It must be a label from the "Range" section. 
  7205.  
  7206.  Identifier 
  7207.  
  7208. 0,1-9,A-Z. 
  7209.  
  7210.  Parameter 2 
  7211.  
  7212. <VarLoop> - The loop's variable.  It may be a numeric field, a table field, or 
  7213. a local variable. 
  7214.  
  7215.  Identifier 
  7216.  
  7217. 0,1-9,A-Z,+,-. 
  7218.  
  7219.  Result variable 
  7220.  
  7221. <Step> - The loop's step.  It may be a numeric field, a local variable, or a 
  7222. constant.  It is an optional parameter.  If it is left empty, the loop's step 
  7223. equals 1. 
  7224.  
  7225.  Result flag 
  7226.  
  7227.  = (OFF) Command performed. 
  7228.  
  7229.  +/- (ON) Error. 
  7230.  
  7231.  See also 
  7232.  
  7233. For, While, Until, QtLoop, EndBlck, 
  7234.  
  7235.  
  7236. ΓòÉΓòÉΓòÉ 49.66. While ΓòÉΓòÉΓòÉ
  7237.  
  7238.  Description 
  7239.  
  7240. Begins loop.  It has the following format: 
  7241.  
  7242. WHILE <Range> 
  7243.  
  7244. This command checks the range's condition and if its value is TRUE, the loop's 
  7245. block is processed.  If its value is FALSE, the loop's block is skipped. 
  7246.  
  7247. A "While" block begins at the "While" command and ends at the "EndBlck" 
  7248. command. 
  7249.  
  7250.  Identifier 
  7251.  
  7252. None. 
  7253.  
  7254.  Parameter 1 
  7255.  
  7256. <Range> - The loop's condition.  It must be a label from the "Range" section. 
  7257.  
  7258.  Identifier 
  7259.  
  7260. None. 
  7261.  
  7262.  Parameter 2 
  7263.  
  7264. None. 
  7265.  
  7266.  Identifier 
  7267.  
  7268.  Result variable 
  7269.  
  7270. None. 
  7271.  
  7272.  Result flag 
  7273.  
  7274.  = (OFF) Command performed. 
  7275.  
  7276.  +/- (ON) Error. 
  7277.  
  7278.  See also 
  7279.  
  7280. For, While, Until, QtLoop, EndBlck, 
  7281.  
  7282.  
  7283. ΓòÉΓòÉΓòÉ 49.67. Until ΓòÉΓòÉΓòÉ
  7284.  
  7285.  Description 
  7286.  
  7287. Begins loop.  It has the following format: 
  7288.  
  7289. UNTIL <Range> 
  7290.  
  7291. This command checks the range's condition and, if its value is FALSE, the 
  7292. loop's block is processed.  If its value is TRUE, the loop's block is skipped. 
  7293.  
  7294. An "Until" block begins at the "Until" command and ends at the "EndBlck" 
  7295. command. 
  7296.  
  7297.  Identifier 
  7298.  
  7299. None. 
  7300.  
  7301.  Parameter 1 
  7302.  
  7303. <Range> - The loop's condition.  It must be a label from the "Range"section. 
  7304.  
  7305.  Identifier 
  7306.  
  7307. None. 
  7308.  
  7309.  Parameter 2 
  7310.  
  7311. None. 
  7312.  
  7313.  Identifier 
  7314.  
  7315. None. 
  7316.  
  7317.  Result variable 
  7318.  
  7319. None. 
  7320.  
  7321.  Result flag 
  7322.  
  7323.  = (OFF) Command performed. 
  7324.  
  7325.  +/- (ON) Error. 
  7326.  
  7327.  See also 
  7328.  
  7329. For, While, Until, QtLoop, EndBlck, 
  7330.  
  7331.  
  7332. ΓòÉΓòÉΓòÉ 49.68. QtLoop ΓòÉΓòÉΓòÉ
  7333.  
  7334.  Description 
  7335.  
  7336. Break processing of "For", "While" and "Until" loops. 
  7337.  
  7338.  Identifier 
  7339.  
  7340. None. 
  7341.  
  7342.  Parameter 1 
  7343.  
  7344. None. 
  7345.  
  7346.  Identifier 
  7347.  
  7348. None. 
  7349.  
  7350.  Parameter 2 
  7351.  
  7352. None. 
  7353.  
  7354.  Identifier 
  7355.  
  7356. None. 
  7357.  
  7358.  Result variable 
  7359.  
  7360. None. 
  7361.  
  7362.  Result flag 
  7363.  
  7364.  = (OFF) Command performed. 
  7365.  
  7366.  +/- (ON) Error. 
  7367.  
  7368.  See also 
  7369.  
  7370. For, While, Until, QtLoop, EndBlck, 
  7371.  
  7372.  
  7373. ΓòÉΓòÉΓòÉ 49.69. EndBlck ΓòÉΓòÉΓòÉ
  7374.  
  7375.  Description 
  7376.  
  7377. Defines the last line of a "For", "While" and "Until" loop block. 
  7378.  
  7379.  Identifier 
  7380.  
  7381. None. 
  7382.  
  7383.  Parameter 1 
  7384.  
  7385. None. 
  7386.  
  7387.  Identifier 
  7388.  
  7389. None. 
  7390.  
  7391.  Parameter 2 
  7392.  
  7393. None. 
  7394.  
  7395.  Identifier 
  7396.  
  7397. None. 
  7398.  
  7399.  Result variable 
  7400.  
  7401. None. 
  7402.  
  7403.  Result flag 
  7404.  
  7405.  = (OFF) Command performed. 
  7406.  
  7407.  +/- (ON) Error. 
  7408.  
  7409.  See also 
  7410.  
  7411. For, While, Until, QtLoop, EndBlck, 
  7412.  
  7413.  
  7414. ΓòÉΓòÉΓòÉ 49.70. If ΓòÉΓòÉΓòÉ
  7415.  
  7416.  Description 
  7417.  
  7418. Begins conditional block.  It has the following format: 
  7419.  
  7420. IF <Range> 
  7421.  
  7422. This command checks the range's condition and, if its value is TRUE, commands 
  7423. between "If" and "Else" (if they exist), or between "If" and "EndIf" (if an 
  7424. "Else" command doesn't exist), are processed.  Then, the next command after 
  7425. "EndIf" is processed. 
  7426.  
  7427. If the range's condition value is FALSE, commands between "If"and "Else" (if 
  7428. they exist), or between "If" and "EndIf" (if an "Else command doesn't exist), 
  7429. are skipped and the next command after "EndIf," or after "Else" (if one 
  7430. exists), is processed. 
  7431.  
  7432.  Identifier 
  7433.  
  7434. None. 
  7435.  
  7436.  Parameter 1 
  7437.  
  7438. <Range> - The "If" condition.  It must be a label from the "Range" section. 
  7439.  
  7440.  Identifier 
  7441.  
  7442. None. 
  7443.  
  7444.  Parameter 2 
  7445.  
  7446. None. 
  7447.  
  7448.  Identifier 
  7449.  
  7450. None. 
  7451.  
  7452.  Result variable 
  7453.  
  7454. None. 
  7455.  
  7456.  Result flag 
  7457.  
  7458.  = (OFF) Command performed. 
  7459.  
  7460.  +/- (ON) Error. 
  7461.  
  7462.  See also 
  7463.  
  7464. If, Else, EndIf, 
  7465.  
  7466.  
  7467. ΓòÉΓòÉΓòÉ 49.71. Else ΓòÉΓòÉΓòÉ
  7468.  
  7469.  Description 
  7470.  
  7471. Ends a true's conditional block within an If block and begins a false's 
  7472. conditional block. 
  7473.  
  7474.  Identifier 
  7475.  
  7476. None. 
  7477.  
  7478.  Parameter 1 
  7479.  
  7480. None. 
  7481.  
  7482.  Identifier 
  7483.  
  7484. None. 
  7485.  
  7486.  Parameter 2 
  7487.  
  7488. None. 
  7489.  
  7490.  Identifier 
  7491.  
  7492. None. 
  7493.  
  7494.  Result variable 
  7495.  
  7496. None. 
  7497.  
  7498.  Result flag 
  7499.  
  7500.  = (OFF) Command performed. 
  7501.  
  7502.  +/- (ON) Error. 
  7503.  
  7504.  See also 
  7505.  
  7506. If, Else, EndIf, 
  7507.  
  7508.  
  7509. ΓòÉΓòÉΓòÉ 49.72. EndIf ΓòÉΓòÉΓòÉ
  7510.  
  7511.  Description 
  7512.  
  7513. Ends an If  block. 
  7514.  
  7515.  Identifier 
  7516.  
  7517. None. 
  7518.  
  7519.  Parameter 1 
  7520.  
  7521. None. 
  7522.  
  7523.  Identifier 
  7524.  
  7525. None. 
  7526.  
  7527.  Parameter 2 
  7528.  
  7529. None. 
  7530.  
  7531.  Identifier 
  7532.  
  7533. None. 
  7534.  
  7535.  Result variable 
  7536.  
  7537. None. 
  7538.  
  7539.  Result flag 
  7540.  
  7541.  = (OFF) Command performed. 
  7542.  
  7543.  +/- (ON) Error. 
  7544.  
  7545.  See also 
  7546.  
  7547. If, Else, EndIf, 
  7548.  
  7549.  
  7550. ΓòÉΓòÉΓòÉ 49.73. Switch ΓòÉΓòÉΓòÉ
  7551.  
  7552.  Description 
  7553.  
  7554. Begins switch's block.  It has the following format: 
  7555.  
  7556. Switch <VarSwitch> 
  7557.  
  7558. This command begins a switch block and defines the switch variable. 
  7559.  
  7560. There may be many Case  blocks within a switch block. 
  7561.  
  7562. A "Switch" block ends with an EndSwch  command. 
  7563.  
  7564.  Identifier 
  7565.  
  7566. 0,1-9,A-Z. 
  7567.  
  7568.  Parameter 1 
  7569.  
  7570. <VarSwitch> - The switch variable.  It may be a field or local variable. 
  7571.  
  7572.  Identifier 
  7573.  
  7574. None. 
  7575.  
  7576.  Parameter 2 
  7577.  
  7578. None. 
  7579.  
  7580.  Identifier 
  7581.  
  7582. None. 
  7583.  
  7584.  Result variable 
  7585.  
  7586. None. 
  7587.  
  7588.  Result flag 
  7589.  
  7590.  = (OFF) Command performed. 
  7591.  
  7592.  +/- (ON) Error. 
  7593.  
  7594.  See also 
  7595.  
  7596. Switch, Case, QtSwtch, EndSwch, 
  7597.  
  7598.  
  7599. ΓòÉΓòÉΓòÉ 49.74. Case ΓòÉΓòÉΓòÉ
  7600.  
  7601.  Description 
  7602.  
  7603. Begins case block.  It has the following format: 
  7604.  
  7605. Case <CaseValue> 
  7606.  
  7607. <CaseValue> - field, local variable, or constant.  Its type must corresponded 
  7608. to link type switch's variable. 
  7609.  
  7610. This command checks the value of the switch variable.  If it equals the case 
  7611. value, all commands after this CASE, up to the QtSwtch  command, or the EndSwch 
  7612. command, will be processed. 
  7613.  
  7614.  Identifier 
  7615.  
  7616. 0,1-9,A-Z,+,-. 
  7617.  
  7618.  Parameter 1 
  7619.  
  7620. <CaseValue> - field, local variable or constant.  Its type must corresponded to 
  7621. link type switch's variable. 
  7622.  
  7623.  Identifier 
  7624.  
  7625. None. 
  7626.  
  7627.  Parameter 2 
  7628.  
  7629. None. 
  7630.  
  7631.  Identifier 
  7632.  
  7633.  Result variable 
  7634.  
  7635. None. 
  7636.  
  7637.  Result flag 
  7638.  
  7639.  = (OFF) command performed. 
  7640.  
  7641.  +/- (ON) Error. 
  7642.  
  7643.  See also 
  7644.  
  7645. Switch, Case, QtSwtch, EndSwch, 
  7646.  
  7647.  
  7648. ΓòÉΓòÉΓòÉ 49.75. QtSwtch ΓòÉΓòÉΓòÉ
  7649.  
  7650.  Description 
  7651.  
  7652. Breaks the processing of a switch's block. 
  7653.  
  7654. This command switches control to the first command after the end of the switch 
  7655. block. 
  7656.  
  7657.  Identifier 
  7658.  
  7659. None. 
  7660.  
  7661.  Parameter 1 
  7662.  
  7663. None. 
  7664.  
  7665.  Identifier 
  7666.  
  7667. None. 
  7668.  
  7669.  Parameter 2 
  7670.  
  7671. None. 
  7672.  
  7673.  Identifier 
  7674.  
  7675.  Result variable 
  7676.  
  7677. None. 
  7678.  
  7679.  Result flag 
  7680.  
  7681.  = (OFF) Command performed. 
  7682.  
  7683.  +/- (ON) Error. 
  7684.  
  7685.  See also 
  7686.  
  7687. Switch, Case, QtSwtch, EndSwch, 
  7688.  
  7689.  
  7690. ΓòÉΓòÉΓòÉ 49.76. EndSwch ΓòÉΓòÉΓòÉ
  7691.  
  7692.  Description 
  7693.  
  7694. Ends a switch's block. 
  7695.  
  7696.  Identifier 
  7697.  
  7698. None. 
  7699.  
  7700.  Parameter 1 
  7701.  
  7702. None. 
  7703.  
  7704.  Identifier 
  7705.  
  7706. None. 
  7707.  
  7708.  Parameter 2 
  7709.  
  7710. None. 
  7711.  
  7712.  Identifier 
  7713.  
  7714.  Result variable 
  7715.  
  7716. None. 
  7717.  
  7718.  Result flag 
  7719.  
  7720.  = (OFF) Command performed. 
  7721.  
  7722.  +/- (ON) Error. 
  7723.  
  7724.  See also 
  7725.  
  7726. Switch, Case, QtSwtch, EndSwch, 
  7727.  
  7728.  
  7729. ΓòÉΓòÉΓòÉ 49.77. Dialog ΓòÉΓòÉΓòÉ
  7730.  
  7731.  Description 
  7732.  
  7733. As you know, the  Acceptcommand enables the input of data to a field or to a 
  7734. number of fields to be grouped by a sub-screen. 
  7735.  
  7736. The dialog command enables you to activate more than one Accept simultaneously. 
  7737. To do this, you define a dialog group, beginning with a dialog command and 
  7738. ending at the E-Dialg command. 
  7739.  
  7740. Within this group, you can define many Accept commands and their related 
  7741. commands, for example: 
  7742.  
  7743. When a program meets a dialog command, it activates all the Accept commands 
  7744. within the Dialog group. 
  7745.  
  7746. The Dialog ends when one of the Accepts ends. 
  7747.  
  7748. When the dialog ends, the task flow continues from the active Accept command. 
  7749.  
  7750. In the above example there is a "While" loop that loops when any of the 
  7751. sub-screen fields is empty. 
  7752.  
  7753. Within this loop there is a dialog group with two Accept commands.  Both 
  7754. Accepts will be activated until all the fields are filled by the user. 
  7755.  
  7756.  Identifier 
  7757.  
  7758. 0,1-9,A-Z,+,-. 
  7759.  
  7760.  Parameter 1 
  7761.  
  7762. A numeric field or a local variable. 
  7763.  
  7764. If its value is positive, it indicates the Accept within the Dialog group which 
  7765. will be in focus.  The number should be the relative number of the Accept 
  7766. command after the Dialog command.  To set the second Accept to be in focus, the 
  7767. value of this parameter should be 2, etc. 
  7768.  
  7769. If its value is zero, the last sub-screen Accept that was in focus will get the 
  7770. focus. 
  7771.  
  7772. If its value is -1, none of the Accepts will get the focus.  The focus is set 
  7773. by the user when he clicks with the mouse on the selected sub-screen. 
  7774.  
  7775.  Identifier 
  7776.  
  7777. None. 
  7778.  
  7779.  Parameter 2 
  7780.  
  7781. None. 
  7782.  
  7783.  Identifier 
  7784.  
  7785.  Result variable 
  7786.  
  7787. None. 
  7788.  
  7789.  Result flag 
  7790.  
  7791.  = (OFF) Command performed. 
  7792.  
  7793.  +/- (ON) Error. 
  7794.  
  7795.  See also 
  7796.  
  7797. E-Dialg 
  7798.  
  7799.  
  7800. ΓòÉΓòÉΓòÉ 49.78. E-Dialg ΓòÉΓòÉΓòÉ
  7801.  
  7802.  Description 
  7803.  
  7804. Ends a Dialog's block. 
  7805.  
  7806.  Identifier 
  7807.  
  7808. None. 
  7809.  
  7810.  Parameter 1 
  7811.  
  7812. None. 
  7813.  
  7814.  Identifier 
  7815.  
  7816. None. 
  7817.  
  7818.  Parameter 2 
  7819.  
  7820. None. 
  7821.  
  7822.  Identifier 
  7823.  
  7824.  Result variable 
  7825.  
  7826. None. 
  7827.  
  7828.  Result flag 
  7829.  
  7830.  = (OFF) Command performed. 
  7831.  
  7832.  +/- (ON) Error. 
  7833.  
  7834.  See also 
  7835.  
  7836. Dialog 
  7837.  
  7838.  
  7839. ΓòÉΓòÉΓòÉ 49.79. Ckpw ΓòÉΓòÉΓòÉ
  7840.  
  7841.  Description 
  7842.  
  7843. Checks the user's Access Permission for a specified job. 
  7844.  
  7845.  Identifier 
  7846.  
  7847. 0-9,A-Z,!. 
  7848.  
  7849.  Parameter 1 
  7850.  
  7851. The job name as it is defined in the user's permission utility. 
  7852.  
  7853.  Identifier 
  7854.  
  7855. None. 
  7856.  
  7857.  Parameter 2 
  7858.  
  7859. None. 
  7860.  
  7861.  Identifier 
  7862.  
  7863.  Result variable 
  7864.  
  7865. None. 
  7866.  
  7867.  Result flag 
  7868.  
  7869. Returns the Access code as defined in the user's permission utility. 
  7870.  
  7871.  See also 
  7872.  
  7873.  Get-Usr 
  7874.  
  7875.  
  7876. ΓòÉΓòÉΓòÉ 50. U.D.R.  Libraries ΓòÉΓòÉΓòÉ
  7877.  
  7878. If you have purchased the mathematics library or the statistics library, you 
  7879. will be able to use their functions as new commands. 
  7880.  
  7881. User-defined routines are used just like regular OpenWin commands, but before 
  7882. using them you have to do some preliminary work in order to integrate them 
  7883. within your specific application.  To do so, you need some specific 
  7884. information.  First, you have to know the exact name of the routine(s) you 
  7885. intend to use.  Second, you have to know the names of the server(s) which 
  7886. executes those routines. 
  7887.  
  7888. Once you've got this information, you have to supply it your application 
  7889. environment by using the  Define Environment module. 
  7890.  
  7891. This module contains a section called User Defined Routines  . 
  7892.  
  7893. Enter the Command and Server names you wish to use as explained. 
  7894.  
  7895. When concluding this work, you may use these routines in the  Logical flow of 
  7896. your task as if they were OpenWin commands with the same format. 
  7897.  
  7898.  SERVER NAMES 
  7899.  
  7900. Two servers are available, one for mathematics routines (named MTHLAN) and the 
  7901. other for statistic routines (named STTLAN). 
  7902.  
  7903. IMPORTANT ! 
  7904.  
  7905. 1) The parameter for routines returning numeric results MUST BE of the data 
  7906. type Float. 
  7907.  
  7908. 2) For all routines, the flag is = - success, or + failure.  In case of 
  7909. failure, an appropriate error message is printed. 
  7910.  
  7911. STATISTICS ROUTINE NAMES( SERVER NAME STTLAN) 
  7912.  
  7913. SAMPLE Samples a new value to a given group. 
  7914.  
  7915.  Parameter 1 Alphanumeric, has the group name into which the value has to be 
  7916. sampled . 
  7917.  
  7918.  Parameter 2 Numeric, the value to be sampled. 
  7919.  
  7920.  Result None. 
  7921.  
  7922. DESAMP Deletes last sample made on the given group. 
  7923.  
  7924.  Parameter 1 Alphanumeric, the group name. 
  7925.  
  7926.  Parameter 2 None. 
  7927.  
  7928.  Result None. 
  7929.  
  7930. RESAMP Deletes all the samples made on the given group. 
  7931.  
  7932.  Parameter 1 Alphanumeric, the group name. 
  7933.  
  7934.  Parameter 2 None. 
  7935.  
  7936.  Result None. 
  7937.  
  7938. SIGMA Gives sum of up-to-date sample values on the given group. 
  7939.  
  7940.  Parameter 1 Alphanumeric, the group name. 
  7941.  
  7942.  Parameter 2 None. 
  7943.  
  7944.  Result Numeric, the sum. 
  7945.  
  7946. PI Gives multiplication of up-to-date sample values on the given group. 
  7947.  
  7948.  Parameter 1 Alphanumeric, the group name. 
  7949.  
  7950.  Parameter 2 None. 
  7951.  
  7952.  Result Numeric, the multiplication. 
  7953.  
  7954. AVRG Gives average value of a given sample-group. 
  7955.  
  7956.  Parameter 1 Alphanumeric, the group name. 
  7957.  
  7958.  Parameter 2 None. 
  7959.  
  7960.  Result Numeric, the average. 
  7961.  
  7962. STDEV Gives standard deviation of a given sample-group. 
  7963.  
  7964.  Parameter 1 Alphanumeric, the group name. 
  7965.  
  7966.  Parameter 2 None. 
  7967.  
  7968.  Result Numeric, the standard deviation. 
  7969.  
  7970. COVAR Gives coverage of two sample-groups. 
  7971.  
  7972.  Parameter 1 Alphanumeric, the first sample-group name. 
  7973.  
  7974.  Parameter 2 Alphanumeric, the second sample-group name. 
  7975.  
  7976.  Result Numeric, the coverage. 
  7977.  
  7978. COREL Gives correlation coefficient of two sample-groups. 
  7979.  
  7980.  Parameter 1 Alphanumeric, the first sample-group name. 
  7981.  
  7982.  Parameter 2 Alphanumeric, the second sample-group name. 
  7983.  
  7984.  Result Numeric, the correlation coefficient. 
  7985.  
  7986.  Return codes, in case of failure, which may occur within error messages 
  7987.  
  7988. -1 Server inactive for input 
  7989.  
  7990. -2 Unable to create input communication with server 
  7991.  
  7992. -3 Server inactive for output 
  7993.  
  7994. -4 Unable to create output communication with server 
  7995.  
  7996. -5 Failed to send request to server 
  7997.  
  7998. -6 Failed to receive result from server 
  7999.  
  8000. -11 Unknown routine name 
  8001.  
  8002. -12 Failed to convert parameter to a double-precision floating point number 
  8003.  
  8004. -13 Invalid sample-group name 
  8005.  
  8006. -14 No more memory left for a new sample-group 
  8007.  
  8008. -15 No more space left within a sample-group for a new value 
  8009.  
  8010. -16 Unable to process computation on an un existing sample-group 
  8011.  
  8012. -17 The two sample-groups do not have same number of elements (relevant for 
  8013. COVAR and COREL routines) 
  8014.  
  8015. MATHEMATICS ROUTINE NAMES (MATH SERVER NAME MTHLAN) 
  8016.  
  8017. POWER Returns Parameter 1** Parameter 2. 
  8018.  
  8019.  Parameter 1 Numeric, the base number. 
  8020.  
  8021.  Parameter 2 Numeric, the power. 
  8022.  
  8023.  Result Numeric, Parameter 1** Parameter 2. 
  8024.  
  8025. SQURT Returns square root of value. 
  8026.  
  8027.  Parameter 1 Numeric, the input value. 
  8028.  
  8029.  Parameter 2 None. 
  8030.  
  8031.  Result Numeric, square root of Parameter 1. 
  8032.  
  8033. EXP Returns exponential function of value. 
  8034.  
  8035.  Parameter 1 Numeric, input value. 
  8036.  
  8037.  Parameter 2 None. 
  8038.  
  8039.  Result Numeric, E** Parameter 1. 
  8040.  
  8041. LAN Return natural logarithm of value. 
  8042.  
  8043.  Parameter 1 Numeric, input value. 
  8044.  
  8045.  Parameter 2 None. 
  8046.  
  8047.  Result Numeric, log-E( Parameter 1). 
  8048.  
  8049. LOG Returns base 10 logarithm of value. 
  8050.  
  8051.  Parameter 1 Numeric, input value. 
  8052.  
  8053.  Parameter 2 None. 
  8054.  
  8055.  Result Numeric, log-10( Parameter 1). 
  8056.  
  8057. ABS Returns absolute value of input. 
  8058.  
  8059.  Parameter 1 Numeric, input value. 
  8060.  
  8061.  Parameter 2 None. 
  8062.  
  8063.  Result Numeric, ABS( Parameter 1). 
  8064.  
  8065. FLOOR Returns highest integer less than or equal to input value. 
  8066.  
  8067.  Parameter 1 Numeric, input value. 
  8068.  
  8069.  Parameter 2 None. 
  8070.  
  8071.  Result Numeric, FLOOR( Parameter 1). 
  8072.  
  8073. CEIL Returns lowest integer greater than or equal to input value. 
  8074.  
  8075.  Parameter 1 Numeric, input value. 
  8076.  
  8077.  Parameter 2 None. 
  8078.  
  8079.  Result Numeric, CEIL( Parameter 1). 
  8080.  
  8081. MOD Returns remainder of division of two values. 
  8082.  
  8083.  Parameter 1 Numeric, first input value. 
  8084.  
  8085.  Parameter 2 Numeric, second input value. 
  8086.  
  8087.  Result Numeric, remainder of 
  8088.  
  8089.  Parameter 1/ Parameter 2. 
  8090.  
  8091. RANDOM Returns a random value. 
  8092.  
  8093.  Parameter 1 None. 
  8094.  
  8095.  Parameter 2 None. 
  8096.  
  8097.  Result Numeric random value. 
  8098.  
  8099. TRUNC Truncates a number to a given position after decimal point. 
  8100.  
  8101.  Parameter 1 Numeric, the value to be truncated. 
  8102.  
  8103.  Parameter 2 Numeric, the position number. 
  8104.  
  8105.  Result Numeric, TRUNC( Parameter 1). 
  8106.  
  8107.  Return codes, in case of failure, which may occur within error messages 
  8108.  
  8109. -1 Server inactive for input 
  8110.  
  8111. -2 Unable to create input communication with server 
  8112.  
  8113. -3 Server inactive for output 
  8114.  
  8115. -4 Unable to create output communication with server 
  8116.  
  8117. -5 Failed to send request to server 
  8118.  
  8119. -6 Failed to receive result from server 
  8120.  
  8121. -11 Unknown routine name 
  8122.  
  8123. -12 Failed to convert parameter to a double-precision floating point number 
  8124.  
  8125. -13 and -14 inconsistent parameters to routine requirements 
  8126.  
  8127. -15 A very high result value 
  8128.  
  8129.  
  8130. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8131.  
  8132. Choose this option to save all changes made.  If you exit the Window Design 
  8133. without pressing OK, no changes will be saved. 
  8134.  
  8135.  
  8136. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8137.  
  8138. Choose this option to cancel the last changes made. 
  8139.  
  8140.  
  8141. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8142.  
  8143.  The window name 
  8144.  
  8145. All references to the window are made by writing the name of the window.  This 
  8146. name defines the window exclusively. 
  8147.  
  8148.  
  8149. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8150.  
  8151.  Style 
  8152.  
  8153. Select the style of the window requested. Different types of windows are 
  8154. presented below: 
  8155.  
  8156.  
  8157. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8158.  
  8159.  Background color 
  8160.  
  8161. This color is the color of the window's background. 
  8162.  
  8163.  
  8164. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8165.  
  8166.  Heading 
  8167.  
  8168. You can define the title for a window by entering a field Identifier  and 
  8169. another field to be used as a title. 
  8170.  
  8171.  
  8172. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8173.  
  8174.  Icon's name 
  8175.  
  8176. You must type in the name of an icon (a .bmp file without the .bmp extension) 
  8177. which will be presented when the window is reduced to its minimum size. 
  8178.  
  8179.  
  8180. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8181.  
  8182.  Icon Position 
  8183.  
  8184. The icon position is set by writing the coordinates of the bottom left corner. 
  8185. The position includes two parameters:  the deviation from the X axis and the 
  8186. deviation from the Y axis. 
  8187.  
  8188.  
  8189. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8190.  
  8191.  Icon Dimensions 
  8192.  
  8193. The icon dimensions are set by writing down its width (X) and height (Y). 
  8194.  
  8195.  
  8196. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8197.  
  8198. Delete Window 
  8199.  
  8200. This option will delete the window definition and remove the window from the 
  8201. screen.  The window fields must be deleted first. 
  8202.  
  8203.  
  8204. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8205.  
  8206. Windows List 
  8207.  
  8208. Choose this option to call up a window by selecting it from the window list. 
  8209.  
  8210.  
  8211. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8212.  
  8213. Delete Field 
  8214.  
  8215. This option will delete a field from the window definition and remove the field 
  8216. from the window. 
  8217.  
  8218.  
  8219. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8220.  
  8221. Object Details 
  8222.  
  8223. This option will open a window and display object details such as the field 
  8224. type or format, location , etc. 
  8225.  
  8226.  
  8227. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8228.  
  8229.  Screen name 
  8230.  
  8231. A window name to which this field belongs. 
  8232.  
  8233.  
  8234. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8235.  
  8236.  Presentation/Output field 
  8237.  
  8238. The field name and the field Identifier  which you relate to the window. 
  8239. Display and input operations in this field relate to this field value. 
  8240.  
  8241.  
  8242. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8243.  
  8244.  Input (Choice value) field 
  8245.  
  8246. When you define a field in a way which enables you to select from the list, for 
  8247. example List Box, you must enter the field from which the selection will be 
  8248. made.  This should be a multiple factor field. 
  8249.  
  8250. If you don't wish to choose a field from the list, enter the name of any DUMMY 
  8251. field. 
  8252.  
  8253. If the field is a Push Button, the value of the field is displayed. 
  8254.  
  8255.  
  8256. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8257.  
  8258.  Style 
  8259.  
  8260. A field can take different forms.  You must select the desired form for 
  8261. display. 
  8262.  
  8263.  
  8264. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8265.  
  8266.  Background color 
  8267.  
  8268. The background color of the field presented. 
  8269.  
  8270.  
  8271. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8272.  
  8273.  Foreground (letters) color 
  8274.  
  8275. The color in which the context of the field will be presented. 
  8276.  
  8277.  
  8278. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8279.  
  8280.  Title Place 
  8281.  
  8282. You may define the title of a field.  The title is taken from the field 
  8283. description. 
  8284.  
  8285.  
  8286. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8287.  
  8288.  SubScreen name 
  8289.  
  8290. In order to refer to a field in an input/output procedure you must relate it to 
  8291. a sub-screen.  You can refer a number of fields to the same sub-window and join 
  8292. them to a single input/output group. 
  8293.  
  8294.  
  8295. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  8296.  
  8297.  ID and Help field 
  8298.  
  8299. You may define a numeric field.  If you press F1 during run time while 
  8300. performing an input operation on this field, you will begin the search for a 
  8301. help panel with this number as resource ID at the help file. 
  8302.  
  8303.