home *** CD-ROM | disk | FTP | other *** search
Clarion Help | 1989-09-13 | 28.0 KB | 463 lines |
- Generating Program Source
- Language statements appear here
- Compiling Program Source
- EMPLOYEE.CLA
- 149k Available memory
- pLoading Compiler
- Employee Phone Directory
- 9/13/89
- Show People By Name
- Show People By Dept
- Print People By Name
- Print People By Dept
- The CLARION Personal Developer
- ASSETS
- - Home Inventory
- - Club Membership Roster
- LIBRARY - Books, Video Tapes, and Music
- MEMOS
- - Interoffice Memo Writer
- ORDER
- - Order Entry System
- PHONES
- - Personal Telephone Directory
- TEACHER - Grading and Class Organization
- TRACKING - Sales Tracking
- QDesign New Application
- :Run
- Modify
- Create
- Options
- Import/Export
- Tutorial
- Update People
- NAME:
- EXT :<<#
- DEPT:
- BLDG:
- ! Report Header
- A Page
- Header
- Print People By Name
- nNAME
- EXT DEPT
- xPEO:NAME
- Group Header
- E Body
- <<#
- "PEO:NAME
- Group Footer
- A Grand Totals
- A Page
- Footer
- tPAGE <<#
- Body 1:1
- -LIN OVR
- CAP NUM SCR
- ! Report Header
- A Page
- Header
- Print People By Dept
- lNAME
- EXT DEPT
- xPEO:DEPT
- Group Header
- E Body
- <<#
- "PEO:DEPT
- Group Footer
- A Grand Totals
- A Page
- Footer
- vPAGE <<#
- Body 1:1
- -LIN OVR
- CAP NUM SCR
- Application: EMPLOYEE
- Files
- Procedures
- MEMORY
- MAIN_MENU (Menu) - Main Menu
- PEOPLE
- SHO_NAME (Table) - Show People By Name
- UPD_PEOPLE (Form) - Update People
- SHO_DEPT (Table) - Show People By Dept
- UPD_PEOPLE (Form) - Update People
- RPT_NAME (Report) - Print People By Name
- RPT_DEPT (Report) - Print People By Dept
- RETURN
- Ins to Add
- Enter to Change
- Del to Delete
- The CLARION Personal Developer
- ASSETS
- - Home Inventory
- - Club Membership Roster
- EMPLOYEE - Employee Phone Directory
- LIBRARY - Books, Video Tapes, and Music
- MEMOS
- - Interoffice Memo Writer
- ORDER
- - Order Entry System
- PHONES
- - Personal Telephone Directory
- TEACHER - Grading and Class Organization
- TRACKING - Sales Tracking
- QRun Selected Application
- 8Run
- Modify
- Create
- Options
- Import/Export
- Tutorial
- Use Quick Start?:Yes Yes No
- Quick Start
- Application:
- Description:
- Filename
- Fields
- Type
- Picture
- Character
- Numeric
- Yes - Unique
- Yes - Non-Unique
- Total Digits : 0
- Decimal Digits:
- Picture
- Subtotal Field:No
- Yes No
- Total Field
- Yes No
- Ready:Yes Yes No
- Employee Phone Directory
- mm/dd/yy
- Show People By Name
- Show People By Dept
- Print People By Name
- Print People By Dept
- Show People By Name
- LOCATE:
- <<#
- Ins to Add
- Enter to Change
- Del to Delete
- Ctrl-Esc to Exit
- Show People By Dept
- "<<#" is a representation of how a @n3 picture will
- appear on a screen or a report. "<" symbolizes a
- numeric digit with leading zeros blanked. "#"
- symbolizes a numeric digit with zero displayed.
- Personal Developer provides two methods of creating
- applications: the Quick Start method and the Custom method.
- This tutorial will show you how to use Quick Start. The
- steps in this tutorial match closely the tutorial you will
- find in Chapter Two of your user's manual.
- Quick Start is a fast way to create a simple application.
- In only a few minutes you can create a complete running
- application. In some cases, Quick Start will be all that
- you need to accomplish your goals. Or, you can use Quick
- Start to get started quickly, then expand your application
- using the Custom method.
- The "Picture area" is where we define the way this field
- is to appear. In the case of a character field, all we
- need to specify is the number of characters (or field
- "length"). In our example, we want the NAME field to
- be 20 characters in length. So here we type "20" and
- then press Enter.
- Next, the Key Selection window appears. Our
- application requires that the NAME field be a
- key for the PEOPLE file, and in this case, we
- would like to be sure that no employee appears
- in the file more than once. Therefore, we
- must define the NAME field to be a "unique"
- key. We use Cursor down to select
- "Yes - Unique" and then press Enter.
- Now that we've completed defining the NAME field, let's
- define the EXT field. We begin by typing the name of the
- field, "EXT", and then pressing Enter.
- Once again, the Field-type Selection window appears. We would like the EXT
- field to be "Numeric". A numeric field is made up exclusively of numeric
- digits ("0" through "9"). A numeric field can contain up to fifteen digits.
- We use the Cursor down key to select "Numeric" and then press Enter.
- Since we chose "Numeric" as the
- type for the EXT field, the
- Numeric Picture window appears.
- At the "Total Digits:" line we
- specify the total number of
- digits (up to 15) the EXT field
- is allowed to have. Since our
- phone extensions have 3 digits,
- we type 3 and press Enter.
- The "Decimal Digits:" line is where we can specify how
- many digits are to the right of the decimal point in our
- number. (Money numbers usually have 2 decimal digits.)
- Our phone extension has no decimal digits, so here we
- simply press Enter and bypass this line.
- The "Picture:" line allows us additional control over how our number is to
- look when it appears on a screen or in a report. The symbol "@n3" is a
- "picture token". Picture tokens describe how a number is to be "formatted".
- The "@" simply begins the picture. The "n" means that this is a numeric
- picture. The "3" means that there are three numeric positions. The number
- will be "justified" to the right, and leading zeros will show as spaces.
- The number "2" will be formatted by the "@n3" picture to appear as " 2"
- (space space 2). We will press Enter to accept this default picture.
- The "Subtotal Field:" line and
- the "Total Field:" line are used
- to specify that a field is to be
- totalled in printed reports. In
- our example, phone extensions
- would not need to be totalled,
- so we will answer "No" to both
- lines. We simply press Enter
- twice and complete the Numeric
- Picture window.
- Once again, we see the Key Selection window.
- In our example, we choose not to make EXT a key
- (we can always change it to be a key later), so
- we press Enter to select "No".
- Next, we'll define the DEPT field. We type 'DEPT'
- and then press Enter.
- We are going to show you how to create a simple program:
- an employee phone directory which we will call EMPLOYEE.
- The EMPLOYEE application will build and maintain a data
- file called PEOPLE. The application will contain six
- procedures: a menu, two tables, a form, and two reports.
- We begin the Quick Start process by pressing Enter at the
- [Create] option on Personal Developer's Base window.
- DEPT, the employee's department, is a character field, so
- we press Enter to select "Character".
- For our purposes in this example, ten characters should
- be a sufficient length for the DEPT field.
- The Key Selection window appears. Since we
- want to create a table that displays a roster
- of each department, the DEPT field will be a
- key. So, using the Cursor down key to select
- "Yes - Non-Unique" to make the DEPT field a key
- field. We make this key "non-unique" because
- more than one record will have the same
- department.
- Now, finally, we create the BLDG field (the
- building in which the employee works). We
- type 'BLDG' and then press Enter.
- BLDG is a character field, so we press Enter to
- select 'Character'.
- Ten characters should be an adequate length for
- the BLDG field. We type '10' and press Enter.
- At this time our needs do not require ordering
- the employees by the building in which they
- work, so we will not designate BLDG as a key.
- We select "No" by pressing Enter.
- At this point we have now defined all of the fields for the
- PEOPLE file and we have indicated which fields are to be
- keys. We inform Personal Developer that we are through
- defining keys by pressing Enter on a blank Fields line.
- The Ready window appears. Personal Developer wants to know
- if we are ready to create this application. We are, so we
- select "Yes" by pressing Enter.
- After generating the basic design of our program, the
- Application Summary window appears and displays a
- schematic of the files and procedures.
- When you select the Create option, the Quick Start option window appears and
- asks you if you want to use Quick Start.
- To bypass Quick Start, press the Right arrow key to select [No], and then
- press Enter. To choose Quick Start, press Enter with [Yes] selected.
- The program begins with MAIN_MENU,
- a menu procedure that is also the
- "base procedure".
- MAIN_MENU will offer a choice of
- five menu items. Each menu item
- correlates to a procedure that
- will be called if that item is
- picked. SHO_NAME and SHO_DEPT are
- table procedures. RPT_NAME and
- RPT_DEPT are report procedures.
- RETURN will end the program.
- Both SHO_NAME and SHO_DEPT name
- UPD_PEOPLE as an "update
- procedure". The tables provide
- two ways of locating employees.
- SHO_NAME displays a scrolling
- list of employees in name order.
- SHO_DEPT displays a similar
- list in department sequence.
- UPD_PEOPLE is a form procedure
- used to add, revise, or delete
- employee records and it can be
- called from either table.
- We are now in the "Modify" option of Personal Developer. We could
- make changes or enhancements to our basic design. To go with what
- we have, the next step is to actually generate the application from
- the basic design. To perform this step, we must first leave Modify
- and return to the Base window of Personal. We do this by pressing
- [Ctrl-Enter]. Hold down the [Ctrl] key and press [Enter].
- We now see that our new application, EMPLOYEE, has joined
- the list of applications that are found in this directory.
- With the application selector on the EMPLOYEE line, and
- the option selector on "Run", we are ready to create our
- finished application by simply pressing Enter.
- First, Personal Developer generates Clarion language source
- statements for the application.
- Next, Personal Developer compiles the program statements into a
- file called "EMPLOYEE.RUN", the running version of our program.
- When the compiling step completes, Personal Developer runs
- the finished application. The creation/compilation steps
- will only occur when Personal Developer senses that you
- have worked on the design of your program using the Modify
- option.
- The first time you run the program, select "Show People by Name." The
- table will appear and then immediately the "Update People" form will
- appear. This is because the PEOPLE data file has no records as yet.
- The SHO_NAME table procedure senses this and automatically calls the
- update procedure UPD_PEOPLE in "add a record" mode.
- After entering a record, we see that the table now shows one employee.
- Pressing enter will select this employee. If we press the [Ins] key,
- the SHO_NAME procedure will again call the UPD_PEOPLE procedure in
- "Add a record" mode. In this manner, we can add data to our file.
- We can continue to enter records. This table shows the
- records ordered by name, so as each record is added it will
- appear in the table in its proper place.
- The blinking cursor on this screen is a "locator" field. A
- locator allows you to type the first few characters of a key
- field. As each letter is typed, the selector bar will
- position automatically on the nearest matching record. Just
- one more fantastic Personal Developer feature.
- The Quick Start window appears. This is where you will name
- your application and its filename, fields, and keys.
- We want to name this application EMPLOYEE, therefore, we type
- "EMPLOYEE" on the [Application:] line and then press Enter.
- You've just seen how fast and easy it is to create a running
- application using Quick Start. You will find this same
- tutorial in Chapter Two of your user's manual, along with
- additional information about "totals" and "subtotals".
- We encourage you to actually follow the steps described in
- this tutorial. Create your own running version of the
- EMPLOYEE application and then run the program. Add a number
- of records to the PEOPLE file. Revise and delete some
- records as well. If you have a printer, try printing the
- reports. If you feel ready, try adding something to the
- application using the Modify option.
- This completes the Quick Start tutorial.
- Notice that an extension of ".APP" is automatically supplied
- for you.
- The [Description:] line is an optional field for describing
- the application. Here we enter "Employee Phone Directory"
- and then press Enter.
- The [Filename:] line is used to name the data file to be
- used in the application. Using the Quick Start method,
- you can create one file per application. The file in our
- example is PEOPLE, so we simply type "PEOPLE" and press
- Enter.
- Using the Quick Start method, our data file can
- contain up to ten fields. (We can add additional
- fields later using the Custom Method if needed.)
- Note that a three-letter "prefix" has been attached
- to the beginning of each field name that will be
- defined. The prefix is the first three letters of
- the filename. Prefixes help identify the file that
- the field belongs to.
- For the EMPLOYEE application, we will create four
- fields: the NAME field, the EXT field (phone
- extension), the DEPT field, and the BLDG field
- (building).
- First we type "NAME" in the [Fields] area and then
- press Enter.
- Next, the Field-type Selection window appears. This is where we will define
- the type of the field that we just named. A "Character" type field is an
- item of data comprised of a sequence of characters (letters, numbers, spaces,
- etc.). We want NAME to be a character field, so we press Enter.
- Show People By Name
- LOCATE:
- Ins to Add
- Enter to Change
- Del to Delete
- Ctrl-Esc to Exit
- The CLARION Personal Developer
- Options
- Directory Name
- :C:\PCLARION\TUTOR\
- Create Listings
- Yes No
- Set Keyboard Locks
- Yes No
- Enhanced Keyboard
- Yes No
- Set Quick Start Colors:No
- Yes No
- Display Description
- Yes No
- Display Sign-on Screen:No
- Yes No
- Press F1 for Help
- Update People
- Record will be Added
- NAME:
- EXT : 0
- DEPT:
- BLDG:
- BLACK
- BLINK a
- COMPILER
- GRAY 2
- LOADING
- MAIN_MEN
- QUICK1
- QUICK10 }
- QUICK11
- QUICK12
- QUICK13
- QUICK14 '
- QUICK2
- QUICK3 }
- QUICK4 .
- QUICK5
- QUICK6
- QUICK7
- QUICK8 :
- QUICK9 k
- QUICK9A >#
- QUIK_17Aj#
- QUIK_W1
- QUIK_W10
- QUIK_W11N)
- QUIK_W12O+
- QUIK_W13=,
- QUIK_W14
- QUIK_W15
- QUIK_W1611
- QUIK_W17]4
- QUIK_W18b6
- QUIK_W19q7
- QUIK_W2
- QUIK_W20
- QUIK_W21
- QUIK_W22U;
- QUIK_W23R=
- QUIK_W24
- QUIK_W25
- QUIK_W26@?
- QUIK_W27H@
- QUIK_W28
- QUIK_W29|B
- QUIK_W3 [C
- QUIK_W30
- QUIK_W31vH
- QUIK_W32
- QUIK_W33
- QUIK_W34
- QUIK_W35BP
- QUIK_W36
- QUIK_W37tR
- QUIK_W38NT
- QUIK_W39
- QUIK_W4 0X
- QUIK_W40
- QUIK_W5
- QUIK_W6 t^
- QUIK_W7
- QUIK_W8
- QUIK_W9 `c
- SHO_NAME
- TEMP >h
- UPD_PEOP
-