APG The Automatic Program Generator From S&M Software Installation Note: No installation program is required. Simply create a directory and copy all of the files contained within the ZIP file. A separate directory is recommended to prevent the possible erasure of other files unrelated to APG. By the way, we included a sample series of programs which we compiled to help with you understanding of their capabilities. General babble and other nonsense: The purpose of APG is to allow for the simple and easy creation of programs that create, maintain and print data files. Also Inquiry programs may by created to display the data on the monitor. These maintenance programs do not contain fancy graphics or other useless "whistle and bells" found in typical PC based programs. In fact, they were designed after Input screens found on mini and main frame computers. They feature several important functions: Numerics are declared to your desired length saving space in the file and on print or screen reports. The numeric inputs are bullet proof. Auto placement of the decimal is included. The fields are numerically maintainable. For example suppose you had to change the area code for part of your data base. You would call up the first record, enter 17 (if the area code field was the seventeenth field) and change the area code. Page Down and your cursor remains in field seventeen of the next record. Compare this to most PC programs that would require you to Tab or Enter seventeen times in each record to get to the desired field. Deleted records are not displayed but can be restored in case of error. The above features ensure the building of Input screens for professional use by operators who are required to be fast. Most important, the entire output of this program is in Microsoft QuickBASIC or QBASIC. If you program, you can modify any part of this code to suit your individual need. Use APG to do the grunt work to develop an application program of almost any type. For example using APG to create a simple inventory program (with an inventory, history, customer, ship to, and vendor files and a dozen print programs) would save you from typing approximately 6000 lines of QuickBASIC code. There are three steps before running the QuickBASIC compiler or QBASIC interrupter. First, enter information about the new program title(s), data file name, and the exit program. Then enter specific information about each field that will be displayed. This information must include the size of the field, type (string or numeric) and the screen location. Then if desired, you can specify up to 9999 separate print reports and inquiry programs. The definition process allows you to specify which fields and in what order they should be printed or displayed. It allows for multiple field sorting as well as specifications for sub-totals and totals. Basic program operations support field numbers. Just enter the number of the field that you wish to maintain. The Export option will create a comma delimited file with the extension "EXP". This file is suitable for import to many applications. APG is a copyrighted program and is owned by S&M Software. You are granted a license to use the software and the derivative program(s) for a period of thirty days. After the thirty day period, if you continue to use APG or the derivative programs you must remit to S&M Software the current license amount. Failure to remit the license when you continue to use these programs is a violation of Federal law and deprives S&M Software of their hard earned money. You may not distribute any of the derivative programs unless you remit the license fee under any circumstance. Users who have remitted the license fee may distribute any application they create using APG including the programs PRINTER.EXE, MENU.EXE, MAINT.EXE and HP.EXE. You assume all risk by using APG and under no circumstances will S&M Software be responsible or liable for any damages or loss which may result from the use of APG. You may contact S&M Software at 708-485-4910 The current license amount is $39.95 and a check may be sent to: S&M Software 8844 W 47th Street Brookfield, IL 60513 APG MAIN SELECTOR This is the opening screen. From this screen you may access all of APG's functions. Use the arrow keys to make your selection. Form Specification Use this selection to create or edit forms. If the form is new you will prompted to enter general information about the form and it's database. If the form exists you will proceed to the field entry/editing screen. The editing screen is used to determine where on the form fields should be placed and describes the characteristics of the field. Report Specification This selection is used for specifying reports that will use the data created by the form. Once having mastered forms creation this step will be simply. Reports include advanced record selection which can be specified at run time. Inquiry Specification. This selection will allow you to create inquiries from the data created by the form. 3GL Language Routines Use this selection to create you own QuickBASIC language enhancement that will be compiled directly into the forms or reports which you have created. The purpose of this section is to allow programmers some measure of control over the capabilities of the finished program. You must enter the name of your data base when using this feature. A file will be created with the name entered plus the extension INC and various labels created, finally the QuickBASIC editing program will be called. The various labels and the entry points are described in this file. APG System Setup This feature is used to customize APG to your individual requirements. APG SETUP Qbasic Path Enter the complete path to the Qbasic interpreter. It is a part of the DOS operating system and generally found in the directory named DOS. If you have the QuickBASIC compiler the is no need to enter anything in this field. QB.Exe Path Enter the path to the QuickBASIC compiler. Note if you haven't purchased the compiler do not enter anything in this field. APG will work fine using the Qbasic interrupter just fine. Exit Program Enter the name of a BATch file or program that should be run by the finished programs. The word DOS will make the completed program exit to the DOS Command prompt. Author Name Your name here or anything thing else will be written into the source code. It has no effect other than documentation. Data Extension The characters entered in this field will be used during the generation process to name the new database file name. The default is DAT and unless you understand DOS naming conventions accept the default. Source Extension The characters entered in this field will be used during the generation process to name the new source file name. The default is S&M and unless you understand DOS naming conventions accept the default. Compressed On Enter the escape code to enable your printer to enter compressed mode printing. Compressed mode printing allows for 132 columns to be printed on 8.5" wide paper. Compressed Off Enter the escape code to enable your printer to enter resume normal mode printing. Note while these code are compiled into the finished print programs a special program (PRINTER.EXE) is supplied to override these values to accommodate various printers. This program may be distributed to others that may use you new programs provided you are a licensed user of APG.. NOTE NO OTHER APG PROGRAM MAY BE SUPPLIED TO ANYONE WHO HAS NOT REMITTED THE LICENSE AMOUNT. Make Merge File If this option is enabled a small code stub will be created that defines the records and fields. Very useful if you want to write you own program using an APG database. APG Exe Location This feature allow you to use APG in directories other than the APG program directory. This feature is very useful to keep separate projects in unique directories. To use simply add the APG program directory to your PATH statement in AUTOEXEC.BAT, create the new project directory, run APG. You will be prompted to enter the to the APG files. ENTER DATA BASE NAME This screen will initially appear the first each time you run APG. This name will establish the critical names for your new database including the program names. Once established during a session this name is fixed unless altered by the user. To alter press the left arrow key until this form is displayed. Action: Enter a name and press . A few general notes. The three specification areas are forms, reports, inquiries. In each of these areas there are several steps. For a new data base each step will be run sequentially beginning will global program specification. The steps vary for the other areas but in each case the various steps nay be accessed by using the right or left arrow keys. This method of selecting the various areas is important for you to understand and once mastered makes for very easy navigation between functional areas of APG. DON'T forget APG attempts to inform you of the available options at each step by the status bar located on the bottom of the screen. Symbols are often used to indicate the arrow keys and they look similar to these (left arrow and right arrow) GLABAL PROGRAM DEFINATION The fields on this screen are easy to understand their function with the exception of field 07 . This field will resort all records purging deleted record each time you have finished with a program. This enables other programs to access the data already sorted decreasing the amount of time required for the program because they don't need to sort the data. Action: Enter appropriate information and press the right arrow key to advance to the next step. DATA BASE FIELD DEFINATION This screen determines where on the completed form fields of information will be displayed. Prompt Number This field is for references individual records its use is mandatory and may be used to directly recall existing fields. A special feature is . It's use will automatically increment the number for each new record. Display Row The value entered in this filed determines which row the prompt will be displayed PC screens in standard text mode have 24 row with row one at the top of the screen. Enter any value from 2 to 20. The other rows are reserved for special APG functions. Display Column Valid columns of PC screen range from 1 to 80 you may enter any value in the field. Prompt Width This field determines how wide the displayed prompt will be. You should select a value large enough to support the longest name you will be using. Generally a prompt width will be in the range of 5 to 25 characters long. Hint: Better looking forms are created using a fixed length for all prompts. Prompt Name The name of the prompt is important. This will be what you will see when running your finished program. Use meaningful name in the field for better looking and easy use. Variable Name This field is used to describe the placeholder for the data you will be entering in the finished program. Non-technical user by press and APG will determine a appropriate name. Numbers or Letters This field determines the type of data for this prompt. APG allows you to specify whether the prompt should be numeric (numbers which could be acted upon arithmetically) or Letters sometimes refers to as strings or alphanumeric. Variable Length This field is used for determining the length of the prompt. If you enter in this field the finished program would allow only one character to be entered for this filed. A value of 10 will allow up to ten characters to be entered. Fractional Digits If field <07> if set for numbers you must determine the number of fractional digits. If the field you are working is currency generally you would use the number 2 to indicate the there will be two places to the right of the decimal. Report Title This field is the name of the field which will print at the top of each page of inquires and reports. Prompt Attributes This important field allow you to specify special characteristics for this prompt. The types supported are: DATE [format] See date list below for format types TIME [format] See time list below for format types RANGE [low, high] Example 100,200 would set the range between 100 and 200 NOMAINT Will not allow maintenance of this field LIMIT [values] Example YN would limit the entry to a Y or N. UPPERCASE Converts all letters to uppercase LOWERCASE Converts all letters in the filed to lower case PROPER capitalize on the first letter only RIGHTJUSTIFY Adjusts the field to the right with leading spaces DEFINE Allows the entry of filed used for calculation but does not display Date formats: MMDDYY, MMDDYYYY, MM-DD-YY, MM-DD-YYYY, YYYYMMDD, YYMMDD, JULIAN, ELAPSED or DATESTAMP Note you must ensure the length is set large enough to accommodate the format desired example mm-dd-yy requires variable length 8 to operate correctly. Elapsed will calculate the number of days elapsed from the beginning of the year requires a variable length of 10 and the input form is mm-DD-yyyy or 01- 01-1994 and JULIAN requires the same length but calculated the number of days elapsed since 1900. Time formats: HHMM, HH:MM, HHMMSS, HH:MM:SS, TIMESTAMP Press enter at this prompt and APG will create the QuickBASIC source code for your new program. If for any reason you don't want to create the program at this point simply press the left arrow. APG will now display a progress screen while creating the source code. Upon completion ae summary screen display will appear. Press the right arrow key to compile or run the program. REPORT DEFINATION You determine the report name, fields to be printed the sort order, fields which should be totaled and those fields which should cause sub-totals to be reported. Use the on-line help box for more information. A interactive report screen will appear when in field 5 and higher. Notice that all of the fields from the data base are displayed in the top window and pseudo image of the report layout appears in the bottom window. Simply by changing the field number will alter which fields and their order on the finished report. When satisfied with the report press the Right arrow key to create the source code. The inquiry screen allow you to determine the fields. the sort and the display order for each inquiry. Simply changing the field number(s) will alter the pseudo inquiry. Make any changes until satisfied then press the right arrow to create the source code.