home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
clarion
/
ptcmenu.zip
/
PTCMENU.DOC
< prev
Wrap
Text File
|
1990-02-27
|
3KB
|
59 lines
PTCMENU.DOC for PTCMENU 02/27/90
===============================================================================
The attached files illustrate a simple technique for passing conditional
information between programs by using the DOS Error Level Code. A controlling
Batch File can be used to capture and interpret the passed Error Level Code
and conditionally branch to the desired program or routine.
Files:
MENU.BAT - the controlling Batch File, use CEDT to edit.
PTCMENU.CLA - the Menu Selection Source Code (requires DOS1.BIN LEM).
PTCMENU.DAT - the Menu Item Descriptions File, use CSCN to edit.
PTCMENU.DOC - this file.
History:
I originally began using this Batch File technique in 1986, using a compiled
program written in Microsoft QuickBASIC. I have over 300 installations of the
orignal in daily use! I have re-written this version of PTCMENU in Clarion to
illustrate a simple method of providing you and your clients with a simple
System Menu front-end.
About MENU.BAT:
1) Arrange all "IF ERRORLEVEL . . ." traps in descending order.
2) The first "IF ERRORLEVEL . . ." should be one higher than the highest
Error Level Code you wish to trap.
3) Include a " GOTO label" after the lowest desired Error Level Code to trap
ERRORLEVEL = 0.
4) The Error Level Code can be from 0 to 255.
5) Each "GOTO label" subroutine is, in effect, a Batch File within a Batch
File. The last line of each subroutine should be "GOTO START", this will
return control to the ":START" postion.
About PTCMENU.DAT:
This is a Menu Item File that contains descriptions of each menu item choice.
Please use as follows:
1) The ENCRYPT Password is "ROSEBUD".
2) This file consists of exactly 20 records, no more or no less!
3) Each Record Number corresponds to a Menu Item ,e.g. Record #1 = Menu Item #1.
4) Use Scanner to modify the Menu Item Descriptions.
5) Do not DELETE any records! If you wish to remove a Menu Item, then blank
out that field.
About PTCMENU:
Since this technique results in "0K RAM" , there is none of the overhead
associated with using the Clarion "RUN" command. Some commercial menu programs
require as much as 70K of precious RAM. This becomes a problem when RAM is
scarce, such as on a network station. Also, menu selections appear to execute
faster because unlike the "RUN" command, a memory image dump file does not have to
be written to the disk. Once you grasp the basics of PTCMENU, you can use your
creativity to enhance and customize your own System Menu, e.g. add Help files,
utilities, mutiple menus, etc.
===============================================================================
Randy Goodhew
PROFESSIONAL TECHNOLOGIES CONSULTANTS
508 Greenup Street
Covington, Kentucky 41011
Phone: (606) 491-3020
FAX and Modem available.