home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / datamage.zip / DOCS.ZIP / APCNMAKR.DOC next >
Text File  |  1991-07-22  |  71KB  |  1,308 lines

  1.                          DATAMAGE - APPLICATIONS MAKER
  2.  
  3.  
  4. INTRODUCTION:
  5.  
  6. There  are those who would call doing what you may do with APPLICATIONS  MAKER,
  7. as  what you can do with dBase, etc. PROGRAMMING.  These people, evidently,  do
  8. not  know  what  programming  is.  I do.  And I  would  liken  both  dBase  and
  9. APPLICATIONS  MAKER to writing batch files for MS-DOS.  Placing a  band-aid  on
  10. a cut on your head does not make you a brain surgeon.  Folding a piece of paper
  11. into an "airplane" and flinging it does not make you a engineer/pilot, etc.
  12.  
  13. This is not to say that programs like APPLICATIONS MAKER have no validity; were
  14. that true I would not have taken the time to write it.  The facility of such  a
  15. program   is  the  origination  of  small,  inconsequential   (though   useful)
  16. APPLICATIONS  without taking the time to write a real program, or to learn  how
  17. to use a real programming language.
  18.  
  19. Let's  take  a typical application as a case in point.  It  loads  a  datafile,
  20. allows the user to select a MARKER file, then creates a simple report from  the
  21. records in the marker.  Let's say that you are a professional programmer,  like
  22. myself.  Just for the sake of argument.
  23.  
  24. Though  I  have  megabytes of code I have already written it would  take  me  a
  25. couple  hours to produce a program to do what the sample application  does.   I
  26. would  need  to "round up" code to load a file, control the  screen,  load  the
  27. marker, and finally write a little code to print the report.  Then I would need
  28. to compile, test and debug it.  Not to mention having the SKILLS to do same.
  29.  
  30. Working  with APPLICATIONS MAKER I would be able to originate the  application,
  31. test  and  complete it within ten minutes.  After you master  this  DECEPTIVELY
  32. easy applications generator you will be able to do the same, in the same time.
  33.  
  34. Going on the assumption that your are not a programmer APPLICATIONS MAKER  will
  35. prove to be all or (more likely) MORE than you can handle.  Though there is  no
  36. syntax  to  learn, no text file to write and no compiler to  master,  you  will
  37. STILL need to organize what you want to do and initialize input/report items to
  38. get your job done.  I have made it as easy for you as I can.  But, in order  to
  39. give  you what you need I have been obliged to give you the ability to  totally
  40. ruin your datafiles.  There's NO WAY to have the former without the latter.
  41.  
  42. MODES OF OPERATION and COMMAND LINE ARGUMENTS:
  43.  
  44. APP  MAKER  can be started with the full pathname of  it's  target  application
  45. following  the  program name on the MS-DOS command line.  If it is it  will  go
  46. directly into execution mode.  When the APP runs to completion or ends with  an
  47. error the program will terminate.
  48.  
  49. This will facilitate the use of APP MAKER from a batch file or as a menu option
  50. of  your fave menuing system.  It will also deny keypunch help the  opportunity
  51. to enter the edit mode and, perhaps, ruin your application.
  52.  
  53. The  remainder  of the command line arguments pertain to the  handling  of  the
  54. screen.   If  you  don't want color use the BW (or bw) argument.   All  of  the
  55. arguments can be in either case, in any order.
  56.  
  57. If  you  will  be running APPLICATIONS MAKER  under  a  multi-tasker  (windows,
  58. double-dos  etc.) you will need to use the NO argument.  This will disable  the
  59. writing  of data directly into the video ram, which would mess up  your  pretty
  60. screen.
  61.  
  62. If you are using a C.G.A. display you will need to use the CGA argument.  These
  63. old-style  color  displays need special treatment when placing  data  into  the
  64. screen memory, and this argument enables it.  The NO argument above  over-rides
  65. the CGA argument, you need not use them both.
  66.  
  67. When  APPLICATIONS  MAKER  is started from the GO program  it  will  pass  this
  68. information  along.  You supply the command line arguments to GO,  it  supplies
  69. them to APPLICATIONS MAKER, which is the only program in the system that  makes
  70. use of them.
  71.  
  72. If  you are obliged to use these special-purpose arguments all the time it  may
  73. become  rather borsome.  You can make a batch file to do it for you.   Call  it
  74. GO.BAT.  If there is a program and a batch file with the same name MS-DOS  will
  75. pick the batch file to execute.
  76.  
  77. Let's say you need the BW argument to run APPLICATIONS MAKER on your monochrome
  78. computer.  You would enter COPY CON GO.BAT and press return.  Then enter GO.EXE
  79. BW, followed by holding the control key down and pressing the Z key.  Then  hit
  80. return.   MS-DOS responds 1 FILE(S) copied.  Now, when you type GO,  the  batch
  81. file executes, executing GO with the command line argument.
  82.  
  83. You  must  take care never to suply command line arguments to GO that  are  not
  84. listed  above,  i.ie  BW, NO or CGA.  If you do this and opt to  run  the  BASE
  85. program  the illegal argument will be interpreted as the name of a MACRO to  be
  86. executed.
  87.  
  88. PROBLEMS WITH I.O.C.B. ALLOCATION IN LARGE APPLICATIONS:
  89.  
  90. An I.O.C.B. is an input-output control block.  This is an area reserved in  low
  91. memory, for the use of MS-DOS.  These areas are used for open files, and  their
  92. number is controlled by the FILES command in your CONFIG.SYS file.  Simply put,
  93. it is necessary to have an available I.O.C.B. for each open file.
  94.  
  95. APPLICATIONS  MAKER can have up to thirty-four files open at once.   But  we'll
  96. also  need  an  I.O.C.B.  for both screens, the  keyboard,  each  line  printer
  97. attached  to  the system and each of the devices attached to  com  ports  (like
  98. modems, laser printers, mice etc.).  And one to load/save the application,  and
  99. to read any menu files you may choose to create/use.
  100.  
  101. The  default  value for the FILES command is eight in DOS 3.3.  To  allow  your
  102. computer to open more files you either create or modify your CONFIG.SYS file to
  103. contain  the  FILES command.  To use APPLICATIONS MAKER at it's  full  capacity
  104. (which,  in many cases, is not necessary) you would include these two lines  in
  105. your CONFIG.SYS file:
  106.  
  107. FILES=40
  108. BUFFERS=40
  109.  
  110. Don't  over-do it, here.  Use only the number of files based on what  you  will
  111. need,  as  increasing  the capacity for open files also  decreases  the  memory
  112. available for your programs and data.
  113.  
  114. The  CONFIG.SYS  file  is  read as the final stage in  the  BOOT  (or  startup)
  115. process.   The computer allocates it's I.O.C.B.s and buffers  accordingly,  and
  116. there is no way to change these parameters once the system is up and running.
  117.  
  118. HOW THE PROGRAM WORKS:
  119.  
  120. In  any  program such as APPLICATIONS MAKER the general idea is to  write  some
  121. EXTREMELY  generic  functions  and  allow the user  to  call  them  and  supply
  122. parameters to them.  The user originates only the top-level control  structure,
  123. the  rest is supplied to him.  This is why applications take up over twice  the
  124. program  space required by a real program, and why a real program will  execute
  125. up to ten times faster than an application.
  126.  
  127. All  the other applications generators, like dBase, require you to learn  their
  128. (would-be) language, and to write a syntactically correct text file in order to
  129. do  the most rudimentary things.  The amount of "dues" you have to  pay  before
  130. you can get anything from such a system is totally out of line with what can be
  131. done  with it.  And such a format bars all but the most patient  and  computer-
  132. literate from making use of the system.
  133.  
  134. DATAMAGE,  on the other hand, does most things with no setup at all.  There  is
  135. NEVER a syntax to learn, nor a text file to write.  These requirements make  it
  136. more  difficult for me, the author, and FAR EASIER for you, the  user.   That's
  137. all right - I ENJOY doing this.  Different strokes, for different folks.
  138.  
  139. If you can read this text you already understand the format of the applications
  140. you will originate.  You started reading this at the top, working your way down
  141. from  left to right, line by line.  And that's EXACTLY how  APPLICATIONS  MAKER
  142. will  execute your application.  By making use of a format with which  you  are
  143. already familiar you are freed of most of the work of learning the system,  and
  144. you may concentrate on the logic of your application.
  145.  
  146. This  not to say that you will need to learn nothing before using  APPLICATIONS
  147. MAKER.   You will need to know many things:  What a datafile is, what a  record
  148. and a field are, the details of YOUR datafiles and the information they hold.
  149.  
  150. DATAMAGE is designed to teach you this BASIC knowledge as you use it.  That's a
  151. lot  better  than your having to learn it BEFORE you can use it!  If  you  have
  152. mastered  the  BASE program you already know what you need.  If you  have  not,
  153. please  stop,  here, and start there.  Any attempt to  use  APPLICATIONS  MAKER
  154. without a thorough knowledge of datafiles, etc. is bound to fail.
  155.  
  156. APPLICATIONS  MAKER uses two screens.  The initial screen displayed  holds  the
  157. functions you use, in the order that you use them.  The secondary screen  holds
  158. the report items you select, in the order in which they will be executed.   The
  159. report is optional - you don't have to print anything.
  160.  
  161. There  are  twenty-six basic functions on the input  screen.   These  functions
  162. range  in  scope and complexity from the simple placement of a heading  on  the
  163. input or report screen to the finding of a record in a file.  There is  nothing
  164. here that you can't understand.  From my point of view, this program is so easy
  165. as to be comical.  You may find the going tough.
  166.  
  167. The  key,  here, as in LIFE in general, is to believe in yourself.   You  don't
  168. have to be a programmer.  You don't even need to be particularly intelligent.
  169.  
  170. Just  start  off by doing the simple things you found in the  tutorial.   Then,
  171. working  from there, experiment around a while.  As you do this you will  learn
  172. what  a  datafile is, how it's organized, how to use the FILE indexes  to  find
  173. records, how to select records on the basis of their content, etc.
  174.  
  175. With  DATAMAGE you work your way up through the system.  APPLICATIONS MAKER  is
  176. the  top level.  It's successful use depends upon your having learned what  the
  177. preceding parts of the system have to teach.  Your knowledge is like a snowball
  178. rolling donwhill.  It can't help but grow!
  179.  
  180. APPLICATIONS MAKER took two years to implement.  It could have been done in two
  181. months, were a lesser program acceptable.  There are many features included  in
  182. the  program to make it usable by the neophyte.  There is always a  prompt,  in
  183. plain  english.  Provided you have familiarized yourself with the rest  of  the
  184. system you should be able to originate applications without reading these docs.
  185.  
  186. There  is  nothing new, here, in terms of function.  All  the  capabilities  of
  187. APPLICATIONS  MAKER appear in other programs, with the possible  exceptions  of
  188. menu fields, browse keys and the ability to make use of multiple printers.
  189.  
  190. In  terms  of  methodology,  however, APPLICATIONS MAKER  is  totally  new  and
  191. radically different.  If there is a program that you can use, this is it.
  192.  
  193. INITIALIZING YOUR SCREENS:
  194.  
  195. The size of both screens is specified during the definition of the application,
  196. but they are initialized a little differently one from another.  The INPUT sub-
  197. screens are of a fixed width: seventy-eight characters.  You may use up to  one
  198. hundred sub-screens in your application, and direct control into any of them.
  199.  
  200. The REPORT, however, does not have a fixed width.  You may have a wide-carriage
  201. printer; you may opt to use different print pitches.  If your printer  supports
  202. fifteen  characters  per inch and your paper is eight inches wide  your  report
  203. could  be one hundred twenty characters in width.  The report width can be  set
  204. to whatever value you desire.
  205.  
  206. When  you begin a new application you will be prompted for the number  of  SUB-
  207. SCREENS  comprising the INPUT screen, and the number of COLUMNS on  the  report
  208. screen.  These may be INCREASED at any time by editing the application, but the
  209. screens can never get any smaller.
  210.  
  211. In  order  to quickly display and use your screens they are  created  when  the
  212. application  starts.  This necessitates the provision of a space to  store  the
  213. screens.  Storage of screens is usually done in the computer's memory in  order
  214. to provide quick access to the data.
  215.  
  216. The  screens  may  be up to 7,800 characters in width  and  1,900  lines  tall.
  217. Each  character requires a byte to hold it plus a byte to hold it's  attribute.
  218. Simple  multiplication  of  these three numbers gives us  29,640,000  bytes  of
  219. storage space for EACH screen.  Since PC hardware running MS-DOS provides  only
  220. 655,360 bytes of memory it is easy to see that storing the screens in memory is
  221. impossible.   But  if  you have a 60 megabyte hard disk to spare  you  can  use
  222. APPLICATIONS MAKER to it's  full potential.
  223.  
  224. Most  real-life  applications  use no more than ten  screens  horizontally  and
  225. vertically.  Most computers can furnish 592,800 bytes of disk space.  Since you
  226. may use the same screen files for all of your applications this is a  realistic
  227. situation, and you won't find yourself out of disk space.
  228.  
  229. When you begin a new application you must enter a path/filename for the  screen
  230. files,  which will be kept on disk.  Suggested is the /MAGE/DBSEFILE  directory
  231. created  by the DATAMAGE installation process to hold data imported from  dBase
  232. formatted  datafiles.   If  you  have  a  RAM  DISK  on  your  AT  system,   in
  233. expanded/extended  memory, you can make good use of it to store  your  screens.
  234. This will result in very fast screen access.
  235.  
  236. As  of version 3.5 DATAMAGE does NOT have multi-user capabilities.  This  means
  237. that the system runs on ONE computer and the programs within the system can NOT
  238. handle the access of datafiles by more than one user in a simultaneous  manner.
  239. Multi-user capabilities are planned for version 4.0.
  240.  
  241. For  now, all of your applications can use the same screen files.  These  files
  242. will  be  of the size of your largest application, and if they are used  by  an
  243. application that requires less disk space then only the first part of the  file
  244. will  be used.  Doing this will save you lots of disk space if you run  several
  245. applications.
  246.  
  247.  
  248. USING APPLICATION MAKER SCREENS:
  249.  
  250. The  screen is divided into two windows: the upper data display area,  and  the
  251. lower  dialog box.  In the dialog box you will see information relevant to  the
  252. operation  of  the  program.   In the data display  area  you  will  find  your
  253. application; this is where the work will be done.
  254.  
  255. While  running  the program you will often see choices in the  dialog  box.   A
  256. brief  heading will be on the left, then the choices available will  be  listed
  257. with one choice highlighted.  You may press the number key associated with your
  258. desired choice, or use the arrow keys to highlight the item, then hit return.
  259.  
  260. At  times the program will display options in the dialog box.  An  example  is:
  261. Insert   Delete   Write  Quit.  To select one of these options  you  press  the
  262. capitalized first letter of the option; to get Quit press Q.
  263.  
  264. NAVIGATING IN THE SCREENS:
  265.  
  266. APPLICATIONS  MAKER uses your standard PC editing keys to navigate.   The  four
  267. arrow  keys will move one position in any direction.  When the control  key  is
  268. held  down  and  an  arrow key is hit you will move  one  full  screen  in  any
  269. direction.   When the shift key is held down and an arrow key is hit  you  will
  270. move approximately one quarter screen in any direction.
  271.  
  272. CHANGING SCREENS:
  273.  
  274. Pressing S or s will TOGGLE THE SCREEN.  This switches the display between  the
  275. INPUT  and  REPORT screens.   The  screens are just alike, so  be  certain   to
  276. check  the upper left corner of the dialog box before taking action.  Help  for
  277. the report screen is available by pressing H from there.
  278.  
  279. MAKING and TESTING YOUR APPLICATIONS:
  280.  
  281. Your  method of origination not withstanding, it is necessary to create a  test
  282. environment in which to test and debug ANY new program/application.
  283.  
  284. Right  now  there  is a 720K disk in my drive B: that is  being  used  to  test
  285. APPLICATIONS  MAKER.  It is my test environment.  I can totally blow this  disk
  286. away  and I won't care at all.  I will just re-format it, copy the datafiles  I
  287. am  using  onto it, and start again.  No damage done.
  288.  
  289. If  I  blew  out my hard drive I would need to spend several  hours  after  re-
  290. formatting it to replace my compilers, libraries, source code, word  processor,
  291. com  program  etc.  OF COURSE it's all backed up - my father raised  no  fools!
  292. But, who needs the grief?
  293.  
  294. What  I do with the C language and what you may do with APPLICATIONS MAKER  are
  295. two VERY different things.  I will not give you the ability to zap your  disks.
  296. But  your DATAFILES are another story.  Whether or not they will survive is  up
  297. to you.  IF they do it will be because of care and planning on your part.
  298.  
  299. CREATING YOUR TEST ENVIRONMENT:
  300.  
  301. NOBODY  (including myself) writes code or makes applications that  work,  first
  302. time,  requiring  no testing/debugging, etc.  And nobody in  their  right  mind
  303. tests  programs/applications that change the data in their source datafiles  on
  304. their  only copy of a real datafile.  It just isn't done.  Try it,  and  you'll
  305. find out why very quickly!
  306.  
  307. Do you have car insurance?  Fire/theft insurance on your home/possessions?  YOU
  308. BET  you  do!   Everyone makes a mistake, and  things  happen.   Your  car/home
  309. represent a major investment on your part, as the data in your files  represent
  310. the  investment  of someone's time to enter it.  DATAFILE  insurance  costs  no
  311. money, just a little time.  PLEASE take the time to "buy" it!
  312.  
  313. To  make  a test floppy simply take a blank floppy and make directories  on  it
  314. that  share the names of the directories holding the actual datafiles  on  your
  315. hard  drive holding the data you will access with your application.  Let's  say
  316. you have a CUSTOMER file and a INVNTORY file, in directories with those names.
  317.  
  318. Place  the  blank floppy in a drive.  Make that drive the default.   If  you're
  319. using  drive  A:, then enter A:.  Now, from the A: prompt, enter  MD  CUSTOMER,
  320. then MD INVNTORY.  Enter DIR.  You should see two directories on the floppy.
  321.  
  322. Now,  depending upon the capacity of your disk and the size of your  datafiles,
  323. you may not be able to write the entire datafile onto the test floppy.
  324.  
  325. If  your files are few and small, or your disk capacity is large, simply  enter
  326. COPY    C:\MAGE\CUSTOMER\*.*   A:CUSTOMER,   and   COPY    C:\MAGE\INVNTORY\*.*
  327. A:\INVENTORY.  You just copied the datafiles onto the floppy, and you are ready
  328. to go.  Your test disk now holds all you need to do your application.
  329.  
  330. In  the case where the total disk space occupied by all your  target  datafiles
  331. exceeds the total space available on the floppy you can use the BASE program to
  332. select  a  group of records in the files that you feel are  representative  and
  333. will  fit on the floppy.  The fewer these records the better.  As  you  develop
  334. and  test  your  new application it will run faster, reports  will  waste  less
  335. paper, etc.
  336.  
  337. To   do  this,  enter  COPY  C:\MAGE\CUSTOMER\*.SAD  A:\CUSTOMER,   then   COPY
  338. C:\MAGE\INVNTORY\*.SAD   A:\INVNTORY.   You  have  just  moved   the   datafile
  339. DEFINITIONS  onto  the floppy.  Now, start DATAMAGE in the  normal  manner  and
  340. select option four, POWER COPY.  Select CUSTOMER as the SOURCE file and opt  to
  341. move  records in a marker file.  Select your marker made for this purpose,  opt
  342. for automatic segment pairing on absolute field numbers, then hit F9 to execute
  343. the move.  A datafile on the floppy with only the records in the marker will be
  344. created.  Repeat this process for the second datafile, and so on.
  345.  
  346. CREATING AN APPLICATION:
  347.  
  348. It's  REAL  handy to have a FILE MAP of each of the datafiles you will  use  at
  349. hand  while originating the application.  APP MAKER displays the fields in  the
  350. file and allows you to choose one MOST of the time.  The exception to this rule
  351. is when you are entering a formula.  Since you may use any field in any file in
  352. your formula it is, at that point, impractical to display the files window.
  353.  
  354. To  make a FILE MAP you simply load the target file with the BASE program,  hit
  355. F3,  ready your printer and remove the paper.  If you have taken my advice  and
  356. created a test environment on a floppy you need not load the file on the floppy
  357. to  make  the file map.  Making one from the real file on the  hard  disk  will
  358. produce the same results, except for the pathname atop the printout.
  359.  
  360. Now,  at long last, you are ready to start the APPLICATIONS MAKER program.   To
  361. do so, start DATAMAGE in the normal manner.  Select option six from the  system
  362. menu.   After the program loads you will see the initial menu.   Select  option
  363. two, create application.
  364.  
  365. The program will read the datafiles it finds on drive C:.  The entire point  of
  366. making  the test environment is NOT to use these files.  So, press your  escape
  367. key.   The screen will clear and you will be prompted for the path of the  data
  368. which  you wish to access.  Enter A:.  The program will display a menu  of  the
  369. datafiles it finds on your test floppy.  Select the files you will use, in  any
  370. order.
  371.  
  372. When  you have selected all your files, or have selected the maximum  of  eight
  373. files, your screen will clear and you may start work on your application.  When
  374. you  save the screen the names of the files you loaded will be the first  thing
  375. written  to disk, followed by your input screen items, then your report  screen
  376. items.  You should save your application often while making it.
  377.  
  378. You can test-execute your application right from the edit screen by pressing  T
  379. or t.  The test will allow you to verify that things are happening as you wish.
  380. You will also need to exit the APPLICATIONS MAKER environment and use the  BASE
  381. program  to  verify that any/all file updates or records  created  contain  the
  382. correct  data.  Please check your applications over carefully as to verify  the
  383. validity of your processes.
  384.  
  385. When you are CERTAIN that your application works as you desire you copy the APL
  386. file you made into one of the datafiles on drive C:.  To select the application
  387. from then on you first select that datafile, then select the application from a
  388. menu of the applications recorded in that datafile.
  389.  
  390. The first time you access the application from the hard drive you will need  to
  391. change  the  path/file names of the datafiles you are using.  As you  may  have
  392. noticed, this facility is provided as the files are loaded by the edit option.
  393.  
  394. As  each of your files appears on the screen opt to edit the filename.  It  the
  395. example  above  the name of the first file will appear in the dialog  box.   It
  396. will  read A:\CUSTOMER, or A:CUSTOMER.  Press home to move your cursor  to  the
  397. first of the string, then replace the A: with C:\MAGE\.  After converting  your
  398. filenames press W to save your application.  Now your application will run  the
  399. datafiles on drive C:.
  400.  
  401. INITIALIZING INPUT ITEMS:
  402.  
  403. To  place an item on the input screen you use your arrow keys,  page-up,  page-
  404. down,  home and end to locate the cursor at the position  on the  screen  where
  405. you wish the item to appear, then press return.
  406.  
  407. To  edit/move/delete an item on the input screen you place the  cursor  in  any
  408. space occupied by that item and press return.  You may also view the status  of
  409. any screen item in this manner.
  410.  
  411. Here  is a listing of the functions available.  These are the  building  blocks
  412. from which you may construct your applications.
  413.  
  414. INPUT ITEM TYPES:
  415.  
  416. The input screen can initialize five types of items:
  417.  
  418. DATA, HEADING, CONTROL, FILE and MISCELLANEOUS.
  419.  
  420. DATA TYPES:
  421.  
  422. If  you  opt to initiate an item of type data the program  reacts  by   opening
  423. a window and displaying the files you loaded in your application.  By selecting
  424. a  file  from  this   menu  you  are specifying  to  the   program   that   the
  425. data  entered/placed  into this input item is to be written into  the  file  in
  426. the field you choose from the next window.
  427.  
  428. You   may have input  items that are not written into the new   record.   These
  429. items may be for the purpose of display, calculation, or  data written  into  a
  430. relational  file.   To bypass the selection of a  field in  the  main  datafile
  431. press escape.
  432.  
  433. At   this  point  the program must determine the type of input  item   you  are
  434. initiating.  If you selected a file and a field this information is at hand and
  435. already  in the computer's memory.  If  you pressed escape to signify  an  item
  436. not  written  into  a file the program will prompt you for the  type  of  item.
  437. After   nailing down the type of input item the program displays  the   options
  438. available for that item.
  439.  
  440. DATE ITEM OPTIONS:
  441.  
  442. ENTRY: User enters date.
  443.  
  444. READ:   Date  is  read into item from relational file.  Before readn and the program will continue.
  445.  
  446. If  your user fills a field or fields declared as indexed NON-UNIQUE,  or  some
  447. but  not all of the fields declared as CROSS-INDEXED and a match is  found  the
  448. record will be displayed on a screen similar to the record access screen in the
  449. BASE  program.  Your user will then view the record.  After pressing Q to  quit
  450. the record your user will have the option of accepting the record displayed, or
  451. continuing the search for the desired record.
  452.  
  453. If  a record is not found the program will offer your user the option to  retry
  454. the search, or to quit.  If your user opts to quit the search the program  will
  455. offer to find the record on any of the modes above.  If your EXPANDED KEY  item
  456. has  a label to handle bypasses your user will have the option to continue,  if
  457. not the continue option will be replaced by the option to abort.  If the  abort
  458. option is selected the APPLICATION will end with an error.
  459.  
  460. KEYS NOT FOUND:
  461.  
  462. Any  of the KEY TYPES may fail.  Your user may enter data into a key item  that
  463. is  not  found  in the target file.  Or your user may BYPASS the  key  item  by
  464. simply pressing return on it.
  465.  
  466. The  KEY ITEMS have the built-in option to handle bypasses by either  branching
  467. to  a  label,  or  aborting  the  application.   This  is  defined  during  the
  468. initialization of the KEY item.
  469.  
  470. In the event of your user entering data that is not found the program will  not
  471. halt,  but  will  display  five options to deal  with  the  situation:   RETRY,
  472. CONTINUE/ABORT, EXPAND, BROWSE and ENTER RECORD.  If your KEY ITEM has a  label
  473. to go to on the bypass of that item the second option offered to your user will
  474. be CONTINUE, else the second option will be ABORT.
  475.  
  476. RETRY will allow your user to try the KEY entry again.
  477.  
  478. ABORT will end the application and CONTINUE will bypass the item.
  479.  
  480. EXPAND  Will allow your user the option to search the file on RECORD   NUMBERS,
  481. or  the FILE INDEXES.  If the FILE INDEX option is selected ALL of the  indexes
  482. will be available as search targets.
  483.  
  484. BROWSE  will produce and fill the BROWSE WINDOW, and allow your user to  video-
  485. select his record from the file.
  486.  
  487. ENTER  RECORD will allow your user to enter a new record into the target  file.
  488. This  record will then become the source of the data read/written to/from  that
  489. file.
  490.  
  491. KEYS, WRAP-UP:
  492.  
  493. As you can see, APPLICATIONS MAKER provides many ways to do a LOOKUP.  There is
  494. NO  other  data program that offers this power and  flexibility  while  finding
  495. records in relational files.
  496.  
  497. STATIC:   A static string field is left alone.  It is the equivalent of a  COMP
  498. field in the numeric type.  You may use this type of string field as the target
  499. of a string formula, covered under it's own heading later on.
  500.  
  501. NUMERIC ITEM OPTIONS:
  502.  
  503. ENTRY:  User enters number.
  504.  
  505. READ:  Number is read into item from a relational file.
  506.  
  507. AUTO-FILL:  A value entered during setup is placed in the item.
  508.  
  509. AUTO-INCREMENT:  All  records in the target datafile are read to determine  the
  510. highest  value stored and the value found is incremented by a value entered  at
  511. setup.  The item is filled with the result.
  512.  
  513. MENU:   The  numeric  menus  are just like the string  menu  items;  see  above
  514. description.   The  only  difference  being that  the  second  value  for  each
  515. selection, which is returned to the application, must be a number.
  516.  
  517. FORMULA:  If  you  initialized  a numeric field you will  have  the  option  of
  518. applying   a  formula to it.  The formulas all start  with  the   value  placed
  519. into  the  item,  be  it a keyboard  entry,  a  read  from  a relational   file
  520. or the content of another field, perhaps itself  the product of a formula.
  521.  
  522. If  a formula field is declared as editable the edit will take  place after the
  523. formula  has  been executed.  Formulas are covered under their  own  heading  a
  524. little later in these docs.
  525.  
  526. COMP:  Comp fields are left alone.  They may be filled via a formula.
  527.  
  528. DATA TYPES, WRAP UP:
  529.  
  530. READ ONLY ITEMS:
  531.  
  532. All  types except entry can be protected from edit by the user.   You will   be
  533. prompted  for the accessibility of each  new  item  as  you initialize it.
  534.  
  535. RELATIONAL WRITES:
  536.  
  537. When  a  relational  write  is  used the data it  contains  is  stored  in  the
  538. computer's memory.  It remains there until a REL WRITE input item is  executed.
  539.  
  540. This is necessary as your application may be aborted by the user, encounter  an
  541. error, etc.  If your application terminates (or is terminated) prematurely  you
  542. would have a merry old time finding and backing off the changes you made to the
  543. relational files!
  544.  
  545. All  DATA  types can be written into up to ten relational files.  You  will  be
  546. prompted  during the initialization of the data items for the file,  the  field
  547. and the write mode.  The writing of relational items to VARIABLE fields  within
  548. a  file is also supported via the placement of the desired field number  in  an
  549. element  of the USER NUMERIC ARRAY.  This comes in handy for  doing  relational
  550. writes from within loops.
  551.  
  552. READ/WRITE MODES:
  553.  
  554. The  string mode can either over-write and destroy the current content  of  the
  555. target field or be appended (added to the end) to the  current entry.
  556.  
  557. The     numeric   mode   allows   for   addition   to,    subtraction     from,
  558. multiplication or division by and replacement of the current value.
  559.  
  560. In   order  to be certain what will be written into a write   field   you  must
  561. remember that the write takes place when fill the item.  So, whatever is stored
  562. in  the  file buffer when the item is executed is what will be written  to  the
  563. record in the relational file.
  564.  
  565. PRINTING DATA ITEMS ON YOUR REPORTS:
  566.  
  567. Input DATA items may be placed on the report.  The final  prompt in the process
  568. of  initializing a screen  item  provides this  ability.  If you opt  to  print
  569. the  screen  item your screen  will TOGGLE  into the report  display  and  your
  570. cursor will be full like it is when you are moving an item.
  571.  
  572. The  items can also be moved to the report by pressing return with  the  cursor
  573. located anywhere on the desired item, then pressing 6.
  574.  
  575. To  place the input item on the report all you need do is position  the  cursor
  576. where  you want the item to print and  press  return.   After placing the  item
  577. you  will specify right or left justification of  the data  within  the   space
  578. you  have  provided for it.   String  data  is usually  left  justified,  while
  579. numerics right.
  580.  
  581. HEADING TYPE:
  582.  
  583. Opting  for  a  heading causes the program to allow the  entry  of  a  heading.
  584. The  heading  and it's location are stored as a screen  item and the  count  of
  585. screen items selected is incremented by one.
  586.  
  587. CONTROL TYPES:
  588.  
  589. LABEL ITEMS:
  590.  
  591. The labels establish a position on the screen to which you may go.  The  labels
  592. can  be  duplicated.  If you use a GOTO ITEM to branch forward to a  label  the
  593. program  will search for that label from wherever you are on the input  screen.
  594. If  it  is not found the application will end with an error.  The  same  for  a
  595. GOBACK ITEM, but the search is done BACKWARD from wherever you are.
  596.  
  597. GOTO  ITEMS:
  598.  
  599. The gotos cause the screen to branch FORWARD to a label.  BREAK items will also
  600. be found by forward gotos, but GOBACK items will find only labels.
  601.  
  602. GOBACK ITEMS:
  603.  
  604. The gobacks cause the screen to branch BACKWARD to a label.  These items,  when
  605. used  in  conjunction with or as an argument of an IF ITEM, will allow  you  to
  606. create loops.  In the jargon of programming a LOOP is a series of  instructions
  607. that  are repeated while/until a test evaluates true/false.  LOOPS can be  very
  608. useful.  They can also create LOCKUP if their test never evaluates as  planned.
  609. If this happens to you just hit your escape key to halt the application.
  610.  
  611. IF ITEMS:
  612.  
  613. The  IF  ITEMS  provide  the ability to do a set of  operations  IF  a  certain
  614. requirement  is met.  The targeted data is TESTED to determine whether  or  not
  615. the  requirement is met.  If it is the IF is said to EVALUATE as true  and  the
  616. operations are executed; if not the IF is said to EVALUATE as false and the set
  617. of operations will not be executed.  This is known as CONDITIONAL processing.
  618.  
  619. STRUCTURE:
  620.  
  621. The structure of the IF ITEMS is identical to the same structures in any  other
  622. program.  In the jargon of the programmer, ARGUMENTS are parameters supplied to
  623. a  function.  The ARGUMENTS for the IF ITEMS consist of a CONDITIONAL  argument
  624. which defines the test to be done, and up to ten EXECUTION ARGUMENTS which  are
  625. to be carried out if the test evaluates as true.
  626.  
  627. DEFINING THE CONDITION TO BE MET:
  628.  
  629. The  IF ITEMS can compare any of the three basic data types in DATAMAGE  files.
  630. You may compare numbers to numbers (dollar-formatted fields are numbers), dates
  631. to  dates or numbers or strings to strings.  All three data types may  also  be
  632. compared  to CONSTANTS, which are values that you include in the IF ITEM.   You
  633. may NOT, however, compare dates or numbers to strings, or vice-versa.
  634.  
  635. SYNTAX OF THE CONDITIONALS:
  636.  
  637. Yes,  this  is one of two places within the DATAMAGE system where you  will  be
  638. required to enter SYNTAX, or commands that conform to a specified format.   But
  639. the claim that a DATAMAGE user need NEVER learn SYNTAX is not false; the SYNTAX
  640. is  supplied  to  you  on your screen during the entry  of  the  IF  ITEMS  and
  641. FORMULAS.   Your entries are SYNTAX-CHECKED during both entry and execution  of
  642. the  IFs and FORMULAS, and appropriate error messages are displayed should  you
  643. make a mistake or, for example, attempt the division of zero.
  644.  
  645. COMPARING NUMERIC DATA:
  646.  
  647. Numeric  data may be stored in a field within a file, an element of  the  USER-
  648. ARRAY, or included in the IF ITEM.  You may compare any of the above to any  of
  649. the above targeting on equal, less than, greater than, or not equal.
  650.  
  651. COMPARING DATE DATA:
  652.  
  653. When  we begin comparing dates we have a slight problem.  You may be  prone  to
  654. enter dates in the formats: MM/DD/YYyy (normal) or DD/MM/YYyy (military).  When
  655. entering  dates  into  DATAMAGE fields the format is  displayed  for  you,  and
  656. detectable errors are met with a beep, and the return to the entry of the date.
  657. When creating your IF ITEMS this is, of course, not available.
  658.  
  659. This situation will NOT DO!
  660.  
  661. When  dates are compared within the DATAMAGE system the software converts  them
  662. into  numbers.  You may have noticed that the BASE program can sort a  datafile
  663. on  a  date  field  in a hurry; this is how it's done.   This  date  format  is
  664. commonly called a METRIC date.
  665.  
  666. Let's  consider the date: 01/02/91.  If it was stored in a field  whose  format
  667. was  MM/DD/YY, this date would represent Jan. 1, 1989.  On the other  hand,  if
  668. this  date were recorded in a field whose format was DD/MM/YY, this date  would
  669. represent Feb. 1, 1991.
  670.  
  671. Note that omitting the first two digits of the year will cause the software  to
  672. assume  that  you  mean 1,900 and whatever is present.   For  this  reason  the
  673. DATAMAGE  system  is  no  good for recording dates before  the  year  100  a.d.
  674. (Sorry, history buffs.)
  675.  
  676. In  order to convert this date to an ABSOLUTE value we first process the  year.
  677. The 91 is stripped from the end and, since it is less than 100, 1,900 is  added
  678. to it.  the result of this is 1991.  Now, the software selects the month, be it
  679. in position 1 and 2 or 4 and 5.  Assuming the more common MM/DD/YY format,  the
  680. O1 is added to the end of the 1991, giving 199101.  Now, we do the same for the
  681. day, giving 19910102.  Finally, this string is converted to a number.
  682.  
  683. When you enter date CONSTANTS within your IF ITEMS you MUST use the METRIC date
  684. format.   This may be a small inconvenience for the short period that it  takes
  685. to get used to it, but it will save many errors.  It should be noted that  this
  686. is  necessary  only  when CREATING an application, and is  not  supported  when
  687. entering data into the program.
  688.  
  689. You  may  also compare date fields to values in the USER-ARRAY.   These  values
  690. must also be in the METRIC format.  You can use a numeric field with the  auto-
  691. fill option to get the date into the USER-ARRAY, where it becomes available for
  692. use  as  a  target of date or numeric comparisons.  This  process  may  be  the
  693. ARGUMENT  of  an IF ITEM, giving you the ability to  use  different  comparison
  694. dates as needed.
  695.  
  696. COMPARING STRINGS:
  697.  
  698. Strings  may be compared in all the normal manners:  equal, greater than,  less
  699. than  and  not equal, plus one more that is unique to the  string  comparisons:
  700. contains.   If the contains operator ( is used it always looks for  the  second
  701. string (on the right of the operator) within the first string.
  702.  
  703. If the greater than or less than options are used the result will be  according
  704. to  alphabetic  order.   No,  you can't use APPLICATIONS  MAKER  to  sort  your
  705. datafiles  - the BASE program performs that function rather handily upon up  to
  706. eight  targets of the same or mixed data types.  You may then create  a  MARKER
  707. FILE that makes the product of the sort available to APPLICATIONS MAKER.
  708.  
  709. CONSTANTS  may  also be incorporated into your string IF ITEMS, but  the  space
  710. provided  for them is significantly less than the maximum length of a  DATAMAGE
  711. string  field, which is 250 characters.  In the rare case of needing to  use  a
  712. string CONSTANT that is longer than the space provided you're out of luck.
  713.  
  714. When  comparing strings APPLICATIONS MAKER always removes all the  spaces  from
  715. both  targets and converts all the upper case letters to lower  case.   Thereby
  716. using the CONTENT of the string and ignoring it's case and spacing.
  717.  
  718. EXECUTED ARGUMENTS:
  719.  
  720. Legal  EXECUTED  ARGUMENTS  for IFs are EXECUTE FORMULA, DO,  DO  PRINT,  GOTO,
  721. GOBACK,  ABORT and KILL RELATIONAL WRITES.  The GOTOs, GOBACKs and ABORTs  must
  722. be  the LAST argument of the IF item as they terminate the IF.   Any  arguments
  723. following these items will NOT be executed.
  724.  
  725. Care  should  be taken in using the ABORT option of the IF  items.   This  will
  726. abort the application!  If you have used the REL WRITES item to store interfile
  727. updates  they will NOT be executed.  If your application keeps  running  totals
  728. etc. they will not be listed.  The application will stop dead.
  729.  
  730. If  you desire only to abort the current iteration of a repetitive  application
  731. (such as one that enters records) you should simply branch to a label past your
  732. write  record and rel writes.  This should offer the user the option  to  enter
  733. another  record  (by  entering 1), or to quit (enter 2).  The  result  of  this
  734. numeric  screen item should be placed in an element of the user  numeric  array
  735. via a formula, then tested with an IF item.
  736.  
  737. The KILL relational writes argument is provided for this eventuality.  If  your
  738. application has made use of the REL WRITE item to store interfile updates to be
  739. executed at a later time (when the record is completed) you will need to delete
  740. these  relational  writes  when  you  branch to  the  next  iteration  of  your
  741. repetitive application in order to prevent their execution the next time a  REL
  742. WRITE item is encountered.
  743.  
  744. The  KILL argument will also obviate any/all DO statements in effect.   If  the
  745. KILL  is encountered within a DO statement the program will need to negate  the
  746. effect  of  that DO so that the next BREAK item will not send control  of  your
  747. application  back to the item proceeding the DO.  This will work no matter  how
  748. many levels of DO are currently in effect, including recursive DOs.
  749.  
  750. If there is any possibility of branching to the next iteration of a  repetitive
  751. application  you should also take care concerning whatever running  totals  you
  752. are  keeping.   This can be accomplished by placing the data  for  the  running
  753. totals into another element of the user numeric array, then adding it into  the
  754. running  total  after  the last possibility of aborting  the  record  has  been
  755. executed.
  756.  
  757. Compound IFs, block IFs and IFs with ELSE arguments all evaluate to a series of
  758. simple  IF/GOTO operations, as do SWITCH (C), SELECT CASE (BASIC) and  CASE  OF
  759. (PASCAL).  If you do not understand what I am talking about, here, don't  worry
  760. about  it.  If you do then you should already know how to do  these  constructs
  761. with IF/GOTO.
  762.  
  763. Simply put, there are many times when you want to execute operations only if  a
  764. multiple test evaluates true.  For example, you might wish to update a file  if
  765. the  record being entered is a sale AND the purchase is being charged.   To  do
  766. this you might reverse your tests.  The first IF might test for the record  NOT
  767. being  a  sale, then branch around the file update.  The second IF  might  test
  768. that the purchase is NOT a charge, then branch around the file update.
  769.  
  770. There  are also many times you want to execute an operation if one  of  several
  771. tests  evaluate true.  You might wish to abort a record if it is a  charge  and
  772. the customer has no credit OR is at/over his credit limit.  This is easily done
  773. by testing for no credit, branching to the abort.  Use a second if to test  for
  774. over  credit limit, branching to the abort.  Or reverse your tests  and  branch
  775. around the abort.
  776.  
  777. There may be times when you wish to get at the ABORT and KILL options without a
  778. test.   These  items  are  almost always the result  of  a  condition  in  your
  779. application, but, due to the structure of your logic, they may occasionally  be
  780. needed as stand-alone functions.  To do this you must initiate an IF, as  these
  781. items are available only as arguments to IFs.  Just type as the test of the IF:
  782. U1=U1.   The  first element of the user numeric array will  (hopefully)  always
  783. equal itself, so the arguments will always be executed.
  784.  
  785. I  am  not  writing  a textbook on programming here, nor ever  will  I  do  so.
  786. APPLICATIONS MAKER is written for those who need to produce simple applications
  787. in  order  to  do  their work and are possessed of  little  or  no  programming
  788. ability.   By  providing  and explaining the more intricate  features  of  real
  789. programming languages I would totally confuse such a person.
  790.  
  791. If  you are a programmer you should look in the \MAGE\DOCS directory  and  find
  792. sample source code, in BASIC and C, to process DATAMAGE files.  Due to it's six
  793. byte reals PASCAL is not equipped to handle these files.
  794.  
  795. DO ITEMS:
  796.  
  797. The  DOs  cause the screen to start execution at the first  occurrence  of  the
  798. target label, and to continue until a BREAK ITEM is encountered.
  799.  
  800. The DO and DO PRINT items will start looking for the label at the beginning  of
  801. their  respective screens.  When you define a DO item on the input  screen  you
  802. are, in effect, defining a FUNCTION that your "program" may call from  anywhere
  803. within the input screen, including from within the function itself.  A function
  804. that  calls  itself,  in the jargon of the programmer, is  called  a  RECURSIVE
  805. function.  Many real programming languages do not allow this.
  806.  
  807. If  you  are  going to use DO items to create and  call  functions,  especially
  808. recursive  ones, a programming method called "top down" is highly  recommended.
  809. To do this you define all functions before they are called.  Just place a  GOTO
  810. item as your first screen item, and use as it's target label the place in  your
  811. screen  where  you wish execution of your "program" to start.  And  place  that
  812. label at the start of your control routine.
  813.  
  814. Between  the initial GOTO item and it's target label place all your  functions.
  815. When  you use a DO item to call a function you will go to the FIRST  occurrence
  816. of that label.  If it's atop the screen you may re-use that label later without
  817. worrying about losing control.
  818.  
  819. Each  time a DO item is encountered the program uses a little memory to  record
  820. DO's  location  so  you can return when the BREAK item is  executed.   If  your
  821. computer  has less than the full compliment of 640K, or your  applications  are
  822. extremely  large  you should watch using recursive DO functions,  as  they  may
  823. cause  you to run out of memory.
  824.  
  825. If  this  happens the program will recover by displaying the (DREADED)  out  of
  826. memory error, and terminating your application.  This has yet to happen, but it
  827. could easily occur on a computer with 384K, and might happen up to 512K.
  828.  
  829. DO PRINT ITEMS:
  830.  
  831. The  DO  PRINTS  cause  the  screen to start  report  execution  at  the  first
  832. occurrence of the target label on the report screen and continue until a  BREAK
  833. ITEM is encountered in the report, or until the report ends.
  834.  
  835. BREAK ITEMS:
  836.  
  837. The  BREAKs  will  cause the screen to return to the item after  the  DO  which
  838. caused  their execution.  If the DO was an argument to an IF the  remainder  of
  839. the  arguments to the if will be executed.  If no DO is in effect when a  BREAK
  840. item  is  executed  it will be ignored.  BREAK items are  also  the  target  of
  841. forward gotos.  BREAK items appear on both the input and report screens.
  842.  
  843. END ITEMS will halt execution of the application.
  844.  
  845. LOCATE   ITEMS:   With  the  LOCATE  ITEMS  you  may  control   your   screens.
  846. APPLICATIONS  MAKER screens may be up to 100 screens wide.  You may  choose  to
  847. use implement an application that uses ten horizontal screens.
  848.  
  849. Each  of your ten horizontal screens might be a task within  your  application.
  850. You  will need to be able to control the execution of your application so  that
  851. it  goes to the start of the desired sub-screen, and then works it's  way  down
  852. while  staying  within that horizontal boundary.  This is the  purpose  of  the
  853. LOCATE ITEMS.
  854.  
  855. The first option of the LOCATE items is to BEGIN or RELEASE the enforcement  of
  856. the horizontal boundaries.
  857.  
  858. If you use a DO to execute a function in your application and that function  is
  859. located  outside  the horizontal boundary you have specified you will  need  to
  860. release  the  LOCATE  ITEM currently in effect.  When  you  complete  the  task
  861. associated  with the horizontal section of the application you may wish  to  go
  862. back  to the first screen and display a menu item so that the user  may  select
  863. another task, or exit.  Again, you will need to release the current LOCATE.  If
  864. you do not the application will end with a LABEL NOT FOUND error.
  865.  
  866. Whey you BEGIN a LOCATE you enter the vertical row and the horizontal column of
  867. the  upper left corner of the screen you desire to execute.  The  program  then
  868. displays your screen, at that row and column.
  869.  
  870. The  LOCATE  ITEM also causes the program to ignore any LABELS not  within  the
  871. horizontal  limits you specify.  If you use GOTO, GOBACK or DO items they  will
  872. not find LABELS whose horizontal position in the application is not within  the
  873. boundaries specified.
  874.  
  875. Your  screen WILL find items whose vertical position in the application is  not
  876. on  the  same visible screen as your starting point.  So, you  may  scroll  the
  877. screen  vertically  to any position you wish within the horizontal  limits  you
  878. set.
  879.  
  880. FILE ITEMS:
  881.  
  882. GET RECORD ITEMS:
  883.  
  884. The GET RECORDs will cause the next available record in the targeted file to be
  885. read  into the file's buffer.  The data it contains will then be available  for
  886. use.   If you have loaded no MARKER FILE these items will read all the  records
  887. in  the file.  If you have used the LOAD MARKER ITEM (below) these  items  will
  888. read the records in the MARKER FILE, in whatever order they're in.
  889.  
  890. The  GET RECORD ITEMS take a label as an argument.  When all the  records  have
  891. been  processed (end of file or marker) the GET RECORD ITEM will do  a  forward
  892. goto, branching to that label.
  893.  
  894. WRITE RECORD ITEMS:
  895.  
  896. The WRITE RECORDs will cause the data in the buffer of the targeted file to  be
  897. written  to disk into the record from which it came.  These items  differ  from
  898. the  RELATIONAL  WRITES  in  that  the  write  happens  whenever  the  item  is
  899. encountered  and an entire record is written instead of a single field.   Their
  900. use can cause you trouble if your application terminates prematurely due to  an
  901. error.  Your file has been updated and the rest of your application, after  the
  902. error  occurred,  did  not happen.  So, place WRITE RECORD  items  as  near  as
  903. possible to the end of your application.
  904.  
  905. NEW RECORD ITEMS:
  906.  
  907. The NEW RECORDs will trigger the creation of a new record in the targeted file.
  908. Your user will need to select, or allow the program to select, a record  number
  909. for the new record.
  910.  
  911. The  NEW RECORD item MUST be used in applications that write new  records  into
  912. datafiles.  Failure to do so will cause the first or current record in the file
  913. to be over-written when the write is executed.
  914.  
  915. When  NEW  is  used  the first available hole in the  file  (caused  by  record
  916. deletion)  or new disk space for the record is read into the file's buffer  and
  917. any data it may contain is replaced by spaces or zero.
  918.  
  919. So,  use NEW items at the top of your screen, or at the top of the  segment  of
  920. your "program" that creates a new record.  The NEW must be executed before  any
  921. of the fields in the new record are filled.  Using NEW after some of the fields
  922. are  filled will WIPE THEM OUT.  Use a WRITE RECORD item when you  have  placed
  923. the necessary data into the record, to record it to disk.
  924.  
  925. RELATIONAL WRITE ITEMS:
  926.  
  927. The RELATIONAL WRITEs will cause the execution of the relational writes  stored
  928. in memory for the targeted file.  These relational writes are created when  the
  929. WRITE  TO ANOTHER DATAFILE option within data items is used.  Unlike the  WRITE
  930. RECORD  item,  these items will not be executed until the RELATIONAL  WRITE  is
  931. encountered,  presumably  as the last step in your process, and only  a  single
  932. field is written as opposed to an entire record.  So, if your application  ends
  933. with an error, nothing is changed.
  934.  
  935. If you update file five, field seven, then use that file/field again before you
  936. execute  the  RELATIONAL  WRITE  the new value will be  used  as  the  list  of
  937. relational writes is searched before data is read from disk.
  938.  
  939. Like the DO items the RELATIONAL WRITEs use memory to store their file,  field,
  940. new  value  and update mode.  And they could exhaust available  memory  if  not
  941. properly  managed.   So, if your application is cyclic and  updates  files  via
  942. these items you should place a RELATIONAL WRITE item for each file updated near
  943. the end of the cycle to conserve memory.  If the application bombs these writes
  944. will not be executed, and you're in trouble again.
  945.  
  946. RESET FILE ITEMS:
  947.  
  948. The  RESET FILEs will cause the file to be reset to the first record.   If  you
  949. have  used the LOAD MARKER FILE item to load a marker for the file  the  marker
  950. file will be closed, and you will be able to load another marker or process all
  951. records.  It is not necessary to use this item just to close a marker.
  952.  
  953. LOAD MARKER ITEMS:
  954.  
  955. The  LOAD MARKERs will cause the loading of a MARKER FILE written by  the  BASE
  956. program  in  the  targeted file.  These MARKER FILES give you  the  ability  to
  957. process a pre-defined group of records in a pre-defined order.  After executing
  958. a  LOAD MARKER the GET RECORD items will fetch the next record from the  marker
  959. instead of the file.
  960.  
  961. When initializing a LOAD MARKER item you may select a MARKER FILE from the menu
  962. of  the markers present.  You may also press escape to bypass  file  selection.
  963. You  will then have the option to allow the user of your application to  select
  964. the a marker from that same menu.  This is handy to do a report or operation on
  965. a group of records selected at runtime.
  966.  
  967. MISCELLANEOUS ITEMS:
  968.  
  969. CHECK INPUT ITEMS:
  970.  
  971. The  CHECK  INPUTs will cause the program to display the input screen  for  the
  972. user.  The page-up, page-down (etc.) keys will be active and the user can  view
  973. the  entire  input screen via their use.  No changes can be made to  the  input
  974. screen.  The user may opt for OK or ABORT.
  975.  
  976. The  CHECK INPUT items take a label as an argument.  If the user opts to  abort
  977. the input, presumably due to a keying error, the application will do a  forward
  978. goto to that label.
  979.  
  980. BLANK INPUT ITEMS:
  981.  
  982. BLANK  INPUT  ITEMS:  With the BLANK INPUTs the input screen will  be  renewed.
  983. The  data entered will be replaced by the squares you see when the  application
  984. is loaded.
  985.  
  986. You  may  wish  to balnk only a certain portion  of  your  application's  input
  987. screen.  To support this you will be prompted for the beginning and ending line
  988. (vertical)  and  screen  (horizontal),  thusly  creating  a  box  within   your
  989. application in which all items will be renewed.
  990.  
  991. CHECK REPORT ITEMS:
  992.  
  993. The CHECK REPORTs will display the report as the CHECK INPUT items display  the
  994. input.  As with the CHECK INPUT items, a label on the input screen is  required
  995. as an argument.  The application branches to this label if the user aborts  the
  996. report.   These  items also take a label on the report screen.  The  report  is
  997. made  starting  at this label and continues until the next break  item  on  the
  998. report screen or the end of the report.
  999.  
  1000. If  the  user OKs the report it will be printed from the CHECK  REPORT  screen.
  1001. There is no need to use a DO PRINT item after the CHECK REPORT item, unless you
  1002. want two copies of the report.
  1003.  
  1004. BLANK REPORT ITEMS:  With the BLANK REPORTs the report screen will be  renewed.
  1005. The data on the report screen will be replaced with the spaces you see when the
  1006. application is loaded.
  1007.  
  1008. Like  the  BLANK  INPUT items you may specify vertical  and  horizontal  limits
  1009. within  which to blank your report.  Unlike the input screen, the report is  of
  1010. varying  width.   Therefore you will need to specify the beginning  and  ending
  1011. COLUMN (vertical) of the area to blank.
  1012.  
  1013. It  should be noted that each item on the report screen is blanked with  SPACES
  1014. just  before it is filled by the program.  If your report uses GOTOs to  branch
  1015. around  some of it's items you will need to use a BLANK REPORT item  to  remove
  1016. the  data  they  may  contain from the preceding report, as  they  may  not  be
  1017. executed.
  1018.  
  1019. DEBUG ITEMS:
  1020.  
  1021. The DEBUG ITEMS are for the purpose of halting your application during  testing
  1022. and  displaying the contents of the USER ARRAY or the USER STRING ARRAY.  These
  1023. storage  areas, or arrays of VARIABLES, are covered in detail in  a  proceeding
  1024. section.  They are used to store your data in the computer's memory.
  1025.  
  1026. There are many times while doing a program or application when something  isn't
  1027. coming out right and you wish you could see what one of your variables contains
  1028. at a certain point.  You can always initialize a data item and set it equal  to
  1029. the  desired  variable,  then place another data item directly  after  it  that
  1030. requires you to press return to continue, thereby stopping the application.
  1031.  
  1032. But, depending upon how you have organized your screens, there may not be  room
  1033. for  this method and it requires more work than simply placing a DEBUG ITEM  at
  1034. the place in your application where you wish to view your variables.
  1035.  
  1036. The  DEBUG items are meant to be used during development.  Presumably you  will
  1037. remove them from your finished application.  Each DEBUG ITEM allows you to view
  1038. the  contents of and give names to the variables in the USER NUMERIC  ARRAY  or
  1039. the USER STRING ARRAY.  If you wish to view/edit both arrays you may place  two
  1040. debug items, back to back.
  1041.  
  1042. The  DEBUG  ITEMS  are  also available from the edit  screen  as  a  keystroke.
  1043. Pressing D will display the contents of the variables after the  test-execution
  1044. of your application.
  1045.  
  1046. COLOR ITEMS:
  1047.  
  1048. With  the  COLOR ITEMS you may create a rectangular area on your  input  screen
  1049. that  displays  the foreground and background colors of your  choice,  provided
  1050. that  you have a machine that can display color and that you have  not  started
  1051. the program with the BW command line argument.
  1052.  
  1053. The  COLOR  ITEMS are unique in that they are ignored during the  execution  of
  1054. your   application.   They  are  executed  only  during  the  LOADING  of   the
  1055. application,  and can NOT be used to change the color of an area on the  screen
  1056. while  running  your  application.  For your convenience the  COLOR  ITEMS  are
  1057. placed  on  the  screen  when initialized, and removed  from  the  screen  when
  1058. deleted.  You should take care when using these items.
  1059.  
  1060. If  you define a small color box, then a larger color box than  infringes  upon
  1061. or covers it you will spoil the first box.  You need to define your color areas
  1062. so  that any boxes within boxes are found during loading after the larger  box.
  1063. Failure  to  do  so  will  result  in a mess.   As  in  the  execution  of  the
  1064. applications, the loading takes place from top to bottom, right to left.
  1065.  
  1066. You  should define your color boxes first, then place your  data/heading  items
  1067. within  them.  You CAN do it the other way, but it will be more  difficult  and
  1068. take  more of your time.  If you wish to add color areas to an application  you
  1069. may  locate your cursor on the items they contain, opt to MOVE them then  press
  1070. return  with  the  cursor  in  the same  position.   You  will  then  have  the
  1071. opportunity to adjust the color of the item without re-initializing it.
  1072.  
  1073. NUMERIC STORAGE AND CALCULATIONS:
  1074.  
  1075. THE USER NUMERIC ARRAY:
  1076.  
  1077. One  of  the  major  differences  between  an  applications  generator  and   a
  1078. programming  language  (in my mind, at least) it the ability  to  allocate  the
  1079. computer's memory to store data.  APP MAKER is of the former type, but you  may
  1080. use two thousand six hundred and eighty bytes.
  1081.  
  1082. This  user memory is divided into two sections, the first to store numbers  and
  1083. the  second to store string data.  You may not specify how many items  you  can
  1084. store, nor the type of data they will hold.
  1085.  
  1086. An  ARRAY is like a pile of papers.  With APP MAKER numeric array you have  one
  1087. hundred  and  fifty pieces of paper, neatly stacked.  But they are  small,  big
  1088. enough to write down only one number on each sheet.
  1089.  
  1090. To  determine WHICH piece of paper you will write to/read from it is  necessary
  1091. to use a SUBSCRIPT.  The subscript is, itself, a number.  In this case it  must
  1092. be between one and one hundred fifty.
  1093.  
  1094. It  matters not if you conceptualize this as the first piece of paper being  on
  1095. top,  or on the bottom, as long as you don't change your mind after you  decide
  1096. which way you will look at it.  The subscript 1 will access the first piece  of
  1097. paper, and 45 the forty-fifth.
  1098.  
  1099. The  user array can be accessed only via the formulas, but any element  thereof
  1100. may be placed on the report screen.  To set user array element 20 you would use
  1101. a formula item on the input screen, say "=#8>u20".  This would place the  value
  1102. now  stored  in file one, field eight into the twentieth element  of  the  user
  1103. array.   You could also use >+ to add the value to the current content of  this
  1104. element, >- to subtract it, etc.
  1105.  
  1106. To  use  the data contained in the user array you must, again, use  a  formula.
  1107. The formula "=U45>f5#9" would fetch the number stored on the forty-fifth  sheet
  1108. and place it in file five, field nine.  As before, you could use >+ to add this
  1109. value to the field's current content, and so on.
  1110.  
  1111. NUMERIC FORMULAS:
  1112.  
  1113. The  formulas available for crunching numbers are business oriented,  and  lack
  1114. the  ability to do fancy math which seldom, if ever, has any relevance  in  the
  1115. processing of accounting-oriented data.  The idea, here, is to give you  access
  1116. to  each and every numeric item while making it as easy and  understandable  as
  1117. possible.  This is the hallmark of the DATAMAGE system.
  1118.  
  1119. The  formulas  may contain two basic types of items, as well as  user  supplied
  1120. literals.  The formula items are: OPERATORS and IDENTIFIERS.  The former causes
  1121. something to happen, the latter defines on what data processes are carried out.
  1122.  
  1123. IDENTIFIERS: #, Uu, Cc.
  1124.  
  1125. #:   The  pound  (or  number) character is used to  denote  a  field  within  a
  1126. datafile.   By placing #22 in a formula you direct input/output  from/to  field
  1127. twenty-two.  WHICH file the program will act upon will be covered shortly.
  1128.  
  1129. Uu:   The  U  identifier directs input/output from/to an element  of  the  user
  1130. numeric  array.   By  placing U22 in a formula you  specify  the  twenty-second
  1131. element of the user numeric array as target of the operation.  Legal  arguments
  1132. to the U operator range from one to one hundred fifty, as there are one hundred
  1133. fifty elements in the user array.
  1134.  
  1135. Cc:   The  C  operator accesses one of the two possible counters  that  may  be
  1136. stored  in  a MARKER file written by the BASE program.  In order to  use  these
  1137. values you must, of course, load a marker file containing counters, then read a
  1138. record from that marker file.
  1139.  
  1140. OPERATORS: + - * / > Ff.
  1141.  
  1142. The first four operators should be familiar to you, with the possible exception
  1143. of the *, which has replaced the X as the symbol for multiplication.
  1144.  
  1145. The > operator, in this case, does NOT relate to comparison based on the second
  1146. value being greater than the first.  The formulas do no comparisons; the IFs do
  1147. that and, in an IF, the > sign means what you're used to.  In the formulas  the
  1148. >  is the symbol to direct output.  It can be used anywhere in the formula,  as
  1149. many times as you like.
  1150.  
  1151. The F operator might be considered an identifier except for the fact that  it's
  1152. affect  remains  until you use another F operator, or the formula  ends.   With
  1153. APPLICATIONS  MAKER you may load and process up to eight datafiles.  You  will,
  1154. then, need a way to specify which of the files you wish to access at any  given
  1155. time, and this is the purpose of the F operator.
  1156.  
  1157. If you omit the F you are going to use the first file loaded.  After  including
  1158. an  F  in  your formula it sets the file.  By placing F4 in  your  formula  you
  1159. select  the  forth  file loaded.  Any # or C identifiers  placed  after  the  F
  1160. operator  will operate from the fourth file.  To specify different  files  just
  1161. use another F operator.
  1162.  
  1163. EXAMPLE:  =#4+u34+c2*F4#3/8>+F2#2
  1164.  
  1165. This  formula  would fetch the value of the current record in file  one,  field
  1166. four,  add to it the thirty-fourth element of the user array, add to  that  the
  1167. value stored in counter two of the current record in file one, multiply that by
  1168. field three in the currently loaded record in file four, divide that by  eight,
  1169. add that to the second field in the currently loaded record in file two.
  1170.  
  1171. As  you  enter  your  formulas  you will see a  screen  that  lists  the  above
  1172. information.   After you press return your formula will be checked.  If it  has
  1173. detectable  errors  an  appropriate message will appear  and  you  will  resume
  1174. editing  your formula string.  If you need to give up just hit escape to  blank
  1175. the input, then press return on an empty string.
  1176.  
  1177. You  should  have  at  hand a FILE MAP for the files  you  are  using  in  your
  1178. application.   In this way you'll know where your data is.  The file  maps  are
  1179. printed  by loading the file into the BASE program and pressing F3.  They  will
  1180. save you a lot of grief.
  1181.  
  1182. STRING STORAGE AND MANIPULATION:
  1183.  
  1184. THE USER STRING ARRAY:
  1185.  
  1186. The  string  storage space works like the numeric array except that  there  are
  1187. twenty elements having a maximum length of seventy-four characters.  Twenty may
  1188. not  seem  like  many, but the APPLICATIONS MAKER program  operates  with  that
  1189. number of general-purpose string areas.
  1190.  
  1191. The  string space is provided for you to combine and process strings.  You  may
  1192. have a datafile that holds three fields: city, state and zip code.  If you were
  1193. obliged  to  print these areas individually you would have  undesirable  spaces
  1194. between  them.   By  applying  a STRING FORMULA you may  create  a  field  that
  1195. contains all three of their values without the intervening spaces.
  1196.  
  1197. STRING FORMULAS:
  1198.  
  1199. The  string  formulas  are  as above, but, obviously,  you  can  not  subtract,
  1200. multiply  or  divide strings.  You may add them to the current content  of  the
  1201. target, or you may replace the current content of the target.
  1202.  
  1203. Your  target  may be a field in a datafile or an element of the  string  array.
  1204. You  may  place your string array element on your reports by  positioning  your
  1205. cursor on the report screen and option for data, then selecting the user string
  1206. array as the source of the item.  It may appear left or right justified.
  1207.  
  1208. You  may encounter errors when processing strings.  Perhaps the most common  is
  1209. field  overflow.   If you add one string to another and  the  resulting  string
  1210. exceeds  the seventy-four character limit your application will crash  with  an
  1211. error  message.   If you attempt to place a string into a field in  a  datafile
  1212. that  is longer than the field you will copy only the allowable  length.   This
  1213. will NOT cause an error, as it is sometimes desirable.
  1214.  
  1215. You might also attempt to place a string on your report that exceeds the  space
  1216. you  have  allotted for it.  This, as the overflow, is an error that  will  not
  1217. happen every time, in every record.  Some records containing shorter strings in
  1218. their fields than others will cause them to work OK.  But, when you run into  a
  1219. record or records that have the full allowable strings stored your  application
  1220. will crash.  Please see the section above on testing.
  1221.  
  1222. APPLICATION REPORTS:
  1223.  
  1224. To   help   you keep  track of your applications the  program  prints  a  handy
  1225. little report detailing input screen if activated from the input screen or  the
  1226. report screen if activated from there.  This printout details each of the items
  1227. you  have selected, in the order found.  The data for each is the same that  is
  1228. displayed when you place the cursor on that item and opt for status.
  1229.  
  1230. SCREEN COLORS:
  1231.  
  1232. When  creating or editing an application on a machine that has the  ability  to
  1233. display color and provided you have not started the program with the BW command
  1234. line  argument, you will have an opportunity to select the default  colors  for
  1235. the screen border and data display area, and the dialog box.
  1236.  
  1237. The  program clears the data display area and fills it with the words: THIS  IS
  1238. WHAT THE TEXT WILL LOOK LIKE.  The dialog box will hold the instructions on how
  1239. to  change the colors, which is accomplished via the arrow keys.  You may  also
  1240. use the B key to select/deselect bright text.
  1241.  
  1242. Applications  that have been created with the use of color may be  executed  on
  1243. computers  that can not display color, in which case they will appear in  black
  1244. and white.  They can be edited and re-saved.  When moved back to a machine that
  1245. can  display color the colors you selected will still be present.  The  colors,
  1246. of course, can NOT be edited on a machine that can not display color.
  1247.  
  1248. BEYOND THE CAPABILITIES OF APPLICATIONS MAKER:
  1249.  
  1250. This program, like any other of it's ilk, will take you only so far.  There are
  1251. many things that it will not do, many processes that it will not support.
  1252.  
  1253. It  is  designed  for the purpose of allowing the  user  to  implement  simple,
  1254. mundane  processes.   It is not a programming language by ANY  stretch  of  the
  1255. imagination.  It is a simple and easy applications generator, that's ALL.
  1256.  
  1257. Unlike  the rest, DATAMAGE does not limit you to what may be done  from  within
  1258. the system.  In the C:\MAGE\DOCS directory you will find sample source code, in
  1259. BASIC and C, that addresses the loading and processing of DATAMAGE files.
  1260.  
  1261. First  off, you learned the BASE program.  But it wouldn't allow you to  design
  1262. your screen, or to produce a custom report.
  1263.  
  1264. It  wouldn't allow you NOT to write a new record into a file, to  make  process
  1265. loops,  to  directly place data from the relational files onto your  screen  or
  1266. report, or to control what happened and when in many cases.
  1267.  
  1268. So, you moved up to APPLICATIONS MAKER.  And there is only so much that can  be
  1269. done  with  it.   Each  step  of  the way LESS  was  done  FOR  you,  and  more
  1270. power/responsibility was placed into your hands.
  1271.  
  1272. There is yet another level.  It is REAL COMPUTER PROGRAMMING.  And the DATAMAGE
  1273. comes complete with some code with which you may start.  It's not as hard, dry,
  1274. or  booring  as  some  might  have you believe.  I  find  it  to  be  the  most
  1275. fascinating and truly addictive thing my life has revealed.
  1276.  
  1277. WRAP-UP:
  1278.  
  1279. Like I've said before in these docs:  I'm not about to try and teach you how to
  1280. "program."  WHY is that?  Well, first off, I'm too busy trying to teach myself,
  1281. and probably will be until the day I die.  But there is more to it than that.
  1282.  
  1283. My mind is not your mind.  My logic is not your logic.  I can take you only  so
  1284. far.  I can flap my wings like crazy and you will notice that my body lifts off
  1285. the  nest.  But, when it comes time for YOU to fly, you're just plain going  to
  1286. have to do it for yourself.  You are going to have to do it YOUR WAY!
  1287.  
  1288. I  could easily have invented some jobs, then written MY WAY of doing  them  as
  1289. THE WAY to do them.  That would be a lie, and very counter-productive, as well.
  1290. There  are  as many ways to write a "program" as there are  people  capable  of
  1291. writing it.  What is the best way?  THE WAY THAT WORKS FOR YOU!
  1292.  
  1293. ONE MORE THING: (a personal comment)
  1294.  
  1295. Recycled computer paper has recently become available in all shapes and  sizes.
  1296. I  am  using  it, it works, and other than it's vanilla color  (caused  by  NOT
  1297. bleaching  it  and,  thereby, not making dioxin to poison  our  planet)  it  is
  1298. exactly the same as the virgin paper I used to use.
  1299.  
  1300. When  I  am  done with it I carry it to the recycler.  I  refuse  their  paltry
  1301. payment.  Let them keep the money and become more profitable.
  1302.  
  1303. PLEASE, please, please use recycled paper!  There are only so many trees and we
  1304. are  now taking them down far faster than they can replicate  themselves.   The
  1305. trees  separate  the carbon dioxide from the oxygen in our air -  they  recycle
  1306. these gases for us so we can live.
  1307.  
  1308. Might we not do the same for them?