<<Templates: the 3.0 Compatibility Set>>
Templates: the 3.0 Compatibility Set

This set of templates is provided for compatibility with
applications created using Clarion for Dos 3.0 (formerly called
Clarion Database Developer 3.0). For new applications, we recomend
you use the 3.1 Template set (CD31.TPL).

For help on specific templates, press the sections button.

<<Global Settings>>
Global Settings

The information you provide in the prompt fields on the Global
Settings window are used throughout the application. These affect
source code generation for the Global CODE section of the
application, and the generated source code for all procedures.

<Global Properties>
Global Properties

<  Enable Shared Files>
 [ ] Enable Shared Files

Check this box to indicate that the application will be used in a
multi-user environment. This could be a Network, Multi- user
operating system, or a single-user Multi-tasking operating system.
When checked, all data files in the application are OPENed in shared
access mode 42h (Read/Write, Deny None) instead of exclusive access
mode 22h (Read/Write, Deny Write).

<  Enable Mouse Support >
Enable Mouse Support

Check this box to indicate that the application will allow the user
to use a mouse. This places a SETMOUSE(1,1) statement in the Global
CODE section.

<  Enhanced Background? >
Enhanced Background?

Check this box to indicate that the application will be run on an
EGA, VGA, or SVGA monitor which allows the Blink bit to be used as
background color Enhance bit (see SETNOBLINK in the Language
Reference).

<  Close Unused Files?>
Close Unused Files?

Check this box to indicate that each procedure should close the data
files which it opens. When this box is checked, CheckOpen() is
generated as a FUNCTION returning one (1) if it actually opened the
file, or zero (0) if the file was already open or unable to be
opened. If not checked, CheckOpen is generated as a PROCEDURE.

The return value from the CheckOpen() function is saved in a local
variable by each procedure. That saved value is checked just before
RETURN to its calling procedure _ if the procedure opened the file,
it also closes the file.

<  If File Not Found    >
If File Not Found

Select the action to take when the application attempts to open a
non-existing data file. Create  Attempts to CREATE the file Halt
displays a warning then returns to DOS.

<  Program Author:      >
Program Author:

Enter the programmer's name for documentation purposes.

Note: When using the 3.0 template set, do not use the Files button.
This accesses the global file settings, which the 3.0 template set
does not use.

<Embedded Source Code Points>
Embedded Source Code Points

<  Inside Global MAP    >
Inside Global MAP

In the Global data section of the program at the end of the MAP
structure. Use this point to declare any Global procedure prototypes
(or INCLUDE a file containing them) that the Application Generator
does not automatically include in the MAP.

<  Before File Declarations     >
Before File Declarations

In the Global Data section of your program, after the MAP and
%GlobalData (data declared through the Data Button of Application
Properties), and before the file declarations. This source can be
used to declare any variables that you didn't declare as part of
%GlobalData, or variables that don't need to be visible in the
Application Generator.  The placement of this #EMBED allows the
declarations made here to be visible to your File Declarations.

For example, suppose you have twenty files, each of which uses a
variable as the file location. You could either declare each
variable in the Global Data button, or use this EMBED to write one
declaration, copy it 20 times, and make the modifications to the
copies.

<  Data Section>
Data Section

In the Global data section of the program after Global data and all
data file definitions. This may be used to declare any Global data
which you may want to use only in your embedded source code.

<  Setup Program        >
Setup Program

Immediately after the CODE statement.

<  Before Return to DOS >
Before Return to DOS

After the call to the first procedure and immediately before the
RETURN statement which takes the user back to DOS.

<  CheckOpen: Setup Procedure   >
CheckOpen: Setup Procedure

In the CheckOpen (either the PROCEDURE or FUNCTION) immediately
after the CODE statement.

<  CheckOpen: No Error>
CheckOpen: No Error

In the CheckOpen (either the PROCEDURE or FUNCTION) CASE ERRORCODE()
immediately following OF NoError (No Error Occurred).

<  CheckOpen: File Open Error   >
CheckOpen: File Open Error

In the CheckOpen (either the PROCEDURE or FUNCTION) CASE ERRORCODE()
immediately following OF IsOpenErr (File Already Open).

<  CheckOpen: No File Error     >
CheckOpen: No File Error

In the CheckOpen (either the PROCEDURE or FUNCTION) CASE ERRORCODE()
immediately following OF NoFileErr (File Not Found).

<  CheckOpen: Invalid File Error        >
CheckOpen: Invalid File Error

In the CheckOpen (either the PROCEDURE or FUNCTION) CASE ERRORCODE()
immediately following OF InvalidFileErr (Invalid Record
Declaration).

<  CheckOpen: Bad Key Error     >
CheckOpen: Bad Key Error

In the CheckOpen (either the PROCEDURE or FUNCTION) CASE ERRORCODE()
immediately following OF BadKeyErr (Key file must be rebuilt).

<  CheckOpen: Directly Before Return    >
CheckOpen: Directly Before Return

In the CheckOpen (either the PROCEDURE or FUNCTION) CASE ERRORCODE()
immediately before the RETURN statement.

<  DiskErr: Setup Procedure     >
DiskErr: Setup Procedure

In the DiskError FUNCTION immediately after the CODE statement.

<  DiskErr: Directly Before Return      >
DiskErr: Directly Before Return

In the DiskError FUNCTION immediately before the RETURN statement.

<  ShowWarning: Setup Procedure >
ShowWarning: Setup Procedure

In the ShowWarning PROCEDURE immediately after the CODE statement.

<  ShowWarning: Before Screen Opening   >
ShowWarning: Before Screen Opening

In the ShowWarning PROCEDURE immediately before the OPEN(Screen)
statement.

<  ShowWarning: After Accept    >
ShowWarning: After Accept

In the ShowWarning PROCEDURE immediately after the ACCEPT statement.

<  ShowWarning: Directly Before Return  >
ShowWarning: Directly Before Return

In the ShowWarning PROCEDURE immediately before the RETURN statement.

<<The Batch Template>>

The Batch template generates a procedure which loops through a file
and performs an operation on each record. This template is designed
to allow changing or deleting a group of records with no hand
coding. However, there are many embedded source code points to give
the programmer maximum flexibility.

Tip: It is a very good idea to make a backup copy of your data files
before running a batch Change or Delete and NEVER test these
procedures on live data without first making a backup.

<Formatter Support>
Formatter Support

The Screen Formatter contains a default screen design containing two
display fields, and Ok and Cancel buttons. The Pulldown Menu
Formatter and Report Formatter are not supported.

<Procedure Properties>
Procedure Properties

<  Range Limit Field    >
Range Limit Field

You can limit the range of records to process by fixing the value of
a component of the primary file access key.

For example, line items on an invoice can be limited to a single
invoice. The key for the item file might contain ITM:Invoice and
ITM:Line containing the invoice number and line number of the item.
ITM:Invoice would be the Range Limit Field, displaying only those
records for a fixed invoice number.

The Range Limit Field is assigned the Range Value Field for this
limit.

<  Range Value Field>
Range Value Field

The Range Value Field is the field which holds the value to be used
as the limiting key component value. The key component is assigned
this value.

In this example, the current Invoice record might contain the number
of the invoice that is being displayed.  INV:Number would be the
Range Value Field, supplying the value for the Range Limit Field.

The Range Value Field must not be the same field as the Range Limit
Field.

<  Record Filter>
Record Filter

Enter a record filter expression here. This filters the records so
that the specified action is performed on only thos records that
meet the filter criteria.

For example, if the Delete action is selected, and you enter
CUS:State = `FL' as the filter, then all customers with the state
code of `FL' will be deleted.

The expression you enter is not automatically checked_ an invalid
expression will generate compiler errors.  If you are not familiar
with the Clarion language statements or expressions, use a Formula
field with the FILTER Formula Class instead.

<  Action for Batch>
Action for Batch

The batch process may either change or delete records. Change will
PUT each selected record. Delete will DELETE each selected record.
No Action will not PUT or DELETE the records, you must supply the
code for the action to perform.

<  Show Record Counter>
Show Record Counter

Check this box to display a record counter as the records are
changed or deleted. Displaying a variable on screen within the main
process LOOP can slow the batch process slightly.  Therefore, you
may leave this check box blank and have no screen updates within the
LOOP.

<Embedded Source>
Embedded Source

<  Data Section>
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures. Use this point to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure>
Setup Procedure

Immediately after the CODE statement.

<  Setup Screen>
Setup Screen

After the OPEN(Screen) statement.

<  Before file SET()>
Before file SET()

Before the SET statement which determines the file processing order.
This embedded source code point is the ideal place to fill key
values for a multiple component key SET.

<  Before LOOP>
Before LOOP

After the SET command but before the main LOOP. At this location you
may override the SET statement, or enter any LOOP setup code.

<  NEXT Record Error Check>
NEXT Record Error Check

Immediately after the NEXT statement. This allows a check of the
ERRORCODE() function to ensure that there were no errors.

Warning: If no error check is made here to allow a BREAK out of the
LOOP, you WILL get an infinite loop!

<  Within LOOP>
Within LOOP

After the GET to any secondary files. This is the heart of the
processing LOOP. If using a record filter, this code may not always
be executed if the record is filtered out. If Many to 1 formatter
(except FILTER) will have been executed just prior to this embedded
source code. The next statement which executes after this code is
the PUT or DELETE of the record if Change or Delete has been
selected for this batch.

<  PUT/DELETE Record Error Check>
PUT/DELETE Record Error Check

Immediately after the PUT or DELETE commands. This allows a check of
the ERRORCODE() function to ensure that there were no errors
replacing a record.  If you are changing fields which are the
components of unique keys, or if you are running this batch process
on shared files, you may enter your own error handling scheme here.
If No Action was selected for this batch process, this embedded
source code point is not needed.

<  End of Procedure>
End of Procedure

Code placed in this embedded source code point executes after all
other code in the procedure has executed.  This code begins in
column one, therefore you may use this window to write any ROUTINEs
which are called from any other embedded source code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes        >
Formula Classes

<  FILTER>
FILTER

A Conditional Field with "FILTER" in the Formula Class field is used
to select which records are processed. If the Condition expression
evaluates to zero (false) for a given record, it is not processed.

<  No class (blank)>
No class (blank)

Calculates the formula every time a record is processed.

<<The Browse Template>>

The Browse template generates a procedure to display records from a
data file in a List box. Each line in the List box displays fields
from one record of the data file. Each line in the List box can be
scrolled left or right using the arrow keys or the List box users to
update a data file,  and a Select button to allow users to select a
record from the list.  The Select button is dimmed  unless the
Browse procedure is called as a lookup from  an entry field. Records
are displayed in the List box in KEY order. The KEY that is used is
identified as the Access Key on the File Schematic dialog (accessed
by the Files button).

The List box isn't filled with records until it is selected. You can
place Screen fields before the LIST box in the SCREEN structure
code, but the first page of records won't display until those fields
are completed and the List box is selected. Therefore, you should
place the LIST field first in the screen structure unless you want a
field to control the LIST in some manner. For example, an entry
field could be use to establish a value for a range limit or filter.

The Insert, Change, and Delete buttons, or any other field that
processes a record selected from the List box must be placed after
the LIST box in the Field List. To see the order in which Fields are
processed for your screen, enter the Screen Formatter and press
CTRL+F.

The Select button is activated if the Browse procedure is called
with KEYCODE() set equal to ShftEnter (SHIFT+ENTER). KEYCODE() is
set equal to ShftEnter when a Procedure is called from an entry
field, from either the When Field is Selected or When Field is
Completed embed points, AND you have named a Return Field.

<Procedure Properties>

<  Range Limit Field>
Range Limit Field

Name a KEY field used to limit the records shown in the List box.
The field must be a component of the Browse Access Key.  Records are
included in the Browse if they have a KEY value which matches the
value of this field.

<  Range Value Field>
Range Value Field

If you name a field here, then records are included in the Browse if
the Range Limit Field contains a value EQUAL to the Range Value
Field.

The Range Value Field must not be the same field as the Range Limit
Field.

<  Record Filter>
Record Filter

Enter a valid Clarion language expression. Record filters are used
to Browse a subset of the data file. Each record from the data file
is evaluated against this expression for inclusion in this list. If
you have a range limit, each record within that limit is evaluated
instead. It is always preferable to use a range limit, if possible.

<  Locator Field>
Locator Field

A Locator field is used to position the highlight bar to a
particular section of the data file. Name a KEY field component of
the Browse Access Key.  The Locator field should be placed on the
Browse Screen as an ENTRY field after the LIST field.  The closest
match to this field is found after the user hits the TAB key.

Note:If your Locator field is a Numeric field, you should add the
`B' to the picture token, to blank if zero.

<  Incremental Locator>
Incremental Locator

Check this box if you want the Locator field to be activated each
time the user enters a keystroke. The Locator remains active while
the List box is selected. The Locator field must be placed after the
LIST in the Field List. Any user keystrokes are used to immediately
seek the closest match in the data file, and reposition the
highlight bar in the List box.

Note: If your Locator field is a Numeric field, you should add the
`B' to the picture token, to blank if zero.

<  Update Procedure>
Update Procedure

Name a procedure to call when the user presses the Add, Change, or
Delete buttons.

<  Enable Hot Records>
Enable Hot Records

Check this box if you want the Browse procedure to re-read the data
file record every time the highlight bar is moved.  Use this option
to display data fields outside the List box for the currently
highlighted record.  For example you could use this option if you
want to display a MEMO field for the highlighted record.

You can also use this option if you are using a Hotkey or Button to
call another procedure, that acts upon the highlighted record.

<  Enable Total Embeds>
Enable Total Embeds

Check this box to use any of the following Embedded Source points to
calculate totals from the data file: Set to First Record Before
Total Loop, Inside Total Loop, Immediately After Next(), Inside
Total Loop, or After Filter. Code is generated to read the data
file, and execute the embedded source code prior to displaying the
List box. To keep the total accurate when a user adds, changes, or
deletes a record, you also need to add code to the Embed points:
Prior to Update Procedure, and After Update Procedure.

<  Disable Memo Access>
Disable Memo Access

Check this box if the data file has a MEMO field, and you are not
displaying the MEMO on the Browse screen. This improves performance
when scrolling the List box.

<Using Range Limits>

The Range Limit Field allows a subset of the data file to display in
the List box.  The subset of records is based on the value contained
in the Range Limit Field.  The Range Limit Field must be a component
of the Access Key. If you place the Range Limit Field on the screen
as an entry field, it allows the user to assign the KEY field a
value and limit the records displayed.  If you don't place the Range
Limit Field on the screen you will have to provide a value for the
Range Limit in an Embedded Source point such as Setup Screen. For
example, if you have two files; Invoice and Items, and you want to
Browse all Items for a selected Invoice, you can limit the records
displayed in the Browse of the Items file. If the Browse Access Key
for the Items file looks like this:

               ITM:InvoiceKey       !Key for ITEMS file
                +- ITM:InvoiceNo    !Invoice Number
                +- ITM:Line         !Line number on Invoice

To limit the displayable records to Items for a single Invoice,
select ITM:InvoiceNo as the Range Limit Field.  Now place
ITM:InvoiceNo as an ENTRY field on the Browse screen before the LIST
field.  When the Browse is executed the user can enter an Invoice
number, and after hitting the TAB key, the List box is filled with
Items for the specified Invoice number.

If the Browse Access Key is a multi-component KEY, and you want to
use the entire KEY to limit the Browse, select the last component of
the KEY as the Range Limit Field. If you place all the KEY fields on
the screen as entry fields, the Browse can be limited by the user at
runtime. Alternatively, you can use the Setup Screen embedded source
code point to prime the KEY components.

For example, if the Invoice file has the following KEY:

        INV:InvoiceKey                  !Key for INVOICES file
        +- INV:InvoiceNo                !Invoice Number
        +- INV:Date                     !Date of Invoice

You can use the Setup Screen embedded source code point to assign a
value to the Range Limit Field. Given the above KEY for the Invoice
file, you can Browse the Invoice file, and display only the Invoices
for a specific date. To view all invoices for today, you would
enter: INV:Date = TODAY() in the Setup Screen embedded source
window.

You can also use both Range Limit and Range Value Fields. The value
in the Range Value Field is assigned to the Range Limit Field when
the Browse starts.

The Range Value Field is used in conjunction with the Range Limit
Field. When a Browse is started, the value in the Range Value Field
is assigned to the Range Limit Field. This limits the Browse without
having to place the Range Limit Field on the Browse screen.

The Range Value Field is typically assigned a value by the procedure
which calls the Browse. The Range Value Field cannot be the same
field as the Range Limit Field. For example, you want to let the
user Browse the Invoice file, select an Invoice, and then Browse the
Items for the selected Invoice.

The Browse Access Key for the Items file looks like this:

        ITM:InvoiceKey                      !Key for ITEMS file +-
        ITM:InvoiceNo                       !Invoice Number +-
        ITM:Line                            !Line number on Invoice

The Invoice file has the following KEY:

        INV:InvoiceKey                     !Key for INVOICES file +-
        INV:InvoiceNo                      !Invoice Number +-
        INV:Date                           !Date of Invoice

Enter the Range Limit Field as ITM:InvoiceNo, and enter the Range
Value Field as INV:InvoiceNo. The Browse of the Items file is
limited to the value of ITM:InvoiceNo, which receives its value from
the Range Value Field_ INV:InvoiceNo.

The Browse of the Invoice file is executed as a "lookup" by entering
the following code in the Setup Procedure Embedded Source point:

          SETKEYCODE(ShftEnter) ! call the Browse with the
                                ! "Select" button active

The Browse of the Invoice file allows the user to highlight an
Invoice record, then hit the Select button. The Select button is
used to call the Browse of the Items file. When the Browse for Items
is executed, INV:InvoiceNo is assigned to ITM:InvoiceNo.  The List
box is filled with Items for the Invoice the user selected.

<Using Record Filters>
Using Record Filters

You can display a subset of a data file using a Range Limit, a
Record Filter, or both.  If the subset of the file is based on a
field value which is a component of the Access Key for the Browse,
then a Range Limit provides the fastest performance. If the subset
of the file is based on a field which is not a component of the
Access Key then you will need to use a record filter.

You can use both a Record Filter and a Range Limit. This gives you
the performance of a Range Limited Browse, but allows you to display
a subset of  the range limited records. There are 2 methods to enter
a record filter. You can use the Formula Editor to create a formula,
and use the FILTER Formula Class.  The code generated filters the
expression. The expression you enter is not automatically checked an
invalid expression will generate compiler errors. If you are not
familiar with the Clarion language statements or expressions, use a
Formula field with the FILTER Formula Class instead.

<Using an Entry Locator>
Using an Entry Locator

A locator field is a screen entry field that updates a component of
the primary file access key. When a value is entered in a locator
field, the closest matching record is displayed in the list box. the
Screen Formatter.  Placing the Locator after the List box allows the
List box to be filled as soon as the Browse is called. If the
Locator is placed before the LIST field, the LIST is not filled
until the user presses TAB (to complete the field). For example,
scrolling a vendor file in vendor name sequence uses a key that
contains the vendor name field (e.g. VND:Name).  To create a vendor
name locator field, place a VND:Name entry field on the screen
before or after the list box, and enter VND:Name for the Locator
Field on the Browse Properties Screen. At runtime, when the user
scrolls the List box, typing any character on the keyboard selects
the locator field, and accepts entry.Pressing TAB positions the
highlight bar to the closest match.

Note:  If your Locator field is a Numeric field, you should add the
`B' to the picture token, to blank if zero.

<Using an Incremental Locator >
Using an Incremental Locator

Check the Incremental Locator box to make the Locator Field function
as an Incremental Locator. You must place the Locator field after
the LIST field in the Field List, for the incremental search to work
correctly.

This template option allows one-half second delay for the user to
type a new letter into the locator field. At each pause longer than
one-half second, the Locator contents are used to locate the closest
match (TAB does not need to be pressed). The BACKSPACE key is active
during this process, and reverses the the user then types "M," a
search is made for "SM" and the List box is scrolled to that record.
 Typing a "Y" starts a search for "SMY", and so on. Pressing the
BACKSPACE key repositions the highlight bar in reverse order. For
numeric data types, you should use a string picture type (for
display purposes).  Date fields are not recommended for incremental
locators.

Note: If your Locator field is a Numeric field, you should add the
`B' to the picture token, to blank if zero.

<Using Hot records>
Using Hot records

Fields from the file being scrolled can be placed outside the LIST
field.  The fields display values from the highlighted record, and
are updated whenever the highlight bar moves. Hot fields should be
set as "Display only" when placed on the screen.

If Enable Hot Records is checked, every movement of the highlight
bar reads the record from the Primary file into memory.  Next,
lookups to the One side of any Many-to-One  relations are performed.
Any Formulas which do not have a Formula Class set to FILTER, AVG,
SUM, or CNT are then performed. Finally, any embeddded source code
in the Process Selected Record embedded source code point executes.

<Recalculating Totals>
Recalculating Totals

If you are using Embedded Source to calculate totals, you can call
the InitializeTotals ROUTINE, in the After Update Procedure embedded
source code point  to re-calculate your totals.   The
InitializeTotals ROUTINE is generated if you have checked Enable
Total Embeds, or you have a Formula with the SUM, CNT, or AVG Class.

  For example:
  IF UpdateSuccessful = True            !if the file was updated
        DO InitializeTotals                                             ! recalculate totals
  END

<Browsing Fields from Related Files>
Browsing Fields from Related Files

The Browse procedure looks up fields in a file on the One side of a
Many-to-One relationship from the file being viewed in the List box.
For example, if you have two files, Customers and Orders. The
relationship from Customers to Orders is One-to-Many_one Customer
may have many Orders. If you create a Browse to view the Orders
file, you can place a field from the Customer file in the List box,
and the Browse procedure automatically looks ups the the related
record in the Customer file.

<Using the Default Buttons >
Using the Default Buttons

The Insert, Change, and Delete buttons call an Update Procedure to
process the highlighted record (Update Procedures are normally
created with a Form or MultiPage template). Enter the name of the
procedure as the Update Procedure on the Procedure Properties
screen. If you do not name an Update Procedure, these buttons have
no default action. If you delete all three buttons and name an
Update Procedure, the INSERT, ENTER and DELETE keys still call the
Update Procedure. However, if you only remove one or two of these
buttons (Insert, Change, or Delete) the Update Procedure is not
called for the removed button(s).

The Exit button's procedure call is defined as RETURN, so when the
user presses the Exit button they return to the calling procedure.
You may remove the Exit button, but some other provision must be
made to return from the procedure.

<Calling a Browse to Lookup a Value>
Calling a Browse to Lookup a Value

The Select button is used when a Browse procedure is called as a
lookup.  The Select button is dimmed unless the Browse is called
with KEYCODE() set to ShftEnter (SHIFT+ENTER).  If you won't be
using the Browse procedure for lookups, you can delete this button.
When the user presses the Select button, the highlighted record in
the List box is loaded into memory, and the program returns to the
calling procedure.

<Navigating a Browse Procedure at Runtime >
Navigating a Browse Procedure at Runtime

At runtime, when the List box is selected, a highlight bar is always
positioned over a single record in the List box. The UP ARROW and
DOWN ARROW keys move the highlight bar. Moving the highlight bar up
off the top row, or down off the bottom row, scrolls a new record
into the list box. The PGUP and PGDN keys scroll the prior and next
page of records into the list box. CTRL+PGUP displays the first page
of records and CTRL+PGDN displays the last page of records. Pressing
the right mouse button in the top half of the List box scrolls up
and in the bottom half scrolls down.

<Formatter Support>
Formatter Support

The Browse procedure in CLARION.APP is pre-loaded with a screen
layout containing a LIST field and buttons named Insert, Change,
Delete, Select, and Exit. The field equate label of the list box off
if the required information fits in the list box. The vertical
scroll bar is ignored by the template.  The list box may not have a
procedure to call when the field is completed. All other properties
of the list box can be changed.

The Report Formatter is not supported.

For more information on formatting a list box, see Using the List
Box Formatter in the Using Screen Formatter chapter.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section>
Data Section

In the data section of the procedure after local data, the SCREEN
and PULLDOWN structures. This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure>
Setup Procedure

After the CODE statement.

<  Setup Screen>
Setup Screen

After the OPEN(Screen) statement.

<  Setup Pulldown>
Setup Pulldown

After the OPEN(PullDown) statement.

<  Set to First Record Before Total Loop>
Set to First Record Before Total Loop

After the SET(key,key) for Range Limits, before beginning the total
calculation LOOP.

<  Inside Total Loop, Immediately after NEXT>
Inside Total Loop, Immediately after NEXT

Immediately after each record is read in the total calculation LOOP.

<  Inside Total Loop after Filter>
Inside Total Loop after Filter

After each record is read and filter conditions are evaluated in the
total calculation LOOP.

<  After Total Field Loop>
After Total Field Loop

After all totals have been calculated.

<  LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas. This embedded code window
may be used instead of LIST class formulas. This allows setting up
any fields which are displayed within the scrolling list box.

<  Case of No Records Found>
Case of No Records Found

When no records are found to display.

<  After Filter and Range Check>
After Filter and Range Check

After any Record Filter or Range Limits are evaluated.

<  End of General Formulas>
End of General Formulas

When processing a screen field, the formulas which do not have a
class of `FILTER' or `LIST' will be generated.  This embedded source
window allows the entry of computations for screen display fields
without the use of the Formula Editor.

<  Set to First Record>
Set to First Record

When using Range Limits, a SET statement is issued to locate the
first record. This embedded source code window appears just after
the generated SET statement and allows you to override the SET.

<  Set to Last Record>
Set to Last Record

When using Range Limits, a SET statement is used to locate the
closest match to the last record.  This embedded source code window
appears just after the SET and allows you to override the SET.

<  Process Selected Record>
Process Selected Record

When Enable Hot Records has been checked, code within this embedded
source window is executed upon any movement of the list box
highlight bar. The highlighted record is retrieved into memory, any
Many- to-One secondary file records are retrieved, and any general
formulas are computed just prior to this embedded source code point.

<  End of Procedure>
End of Procedure

Code placed in this point executes after all other code in the
procedure has executed. This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Prior to Update Procedure>
Prior to Update Procedure

Immediately before the Update Procedure is called.

<  After Update Procedure>
After Update Procedure

Immediately after return from the Update Procedure.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  FILTER>
FILTER

A Conditional Field with FILTER in the Formula Class field is used
to display a subset of the datafile. If the IF Condition expression
evaluates to false for a given record, it is not displayed. Enter
the expression for the IF Condition field and leave the True Formula
and False Formula fields blank. Only the IF Condition Expression is
used for the filter. A filter expression can alternatively be
entered in the Browse Procedure Properties Record Filter field,
instead of using the Formula Editor.

<  LIST>
LIST

A Conditional or Computed Field with LIST in the Formula Class field
is used for those values which will be displayed in the list box and
are only evaluated when the list box item is created.

<  SUM>
SUM

A Computed Field with SUM in the Formula Class field calculates the
Formula Field using the Formula Expression.

The code is generated as:

     FormulaFieldName += FormulaExpression.

A Conditional Field with SUM in the Formula Class field
conditionally calculates the Formula Field using the Formula
Expression contained in the fields named in the True and False
Expressions. The code is generated as:

    IF Condition
      FormulaFieldName += TrueExpression
    ELSE
       FormulaFieldName += FalseExpression
    END

<  AVG>
AVG

A Computed Field with AVG in the Formula Class field calculates an
Average of the field named in the Expression. The total value is
calculated, then divided by the number of displayable records to
achieve the arithmetic mean. Displayable records are those records
that are within the Range Limit and meet the Record Filter criteria.

<  CNT>
CNT

A Computed Field with CNT in the Formula Class field counts the
number of displayable records in the Browse. Displayable records are
those records that are within the Range Limit and meet the Record
Filter criteria.

<  No class (blank)>
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field edit
routines at the top of the field processing code.

<<The Child Template>>

The Child template creates a procedure which has a screen with
features from both the Browse and Form templates. This template
screen has both a scrolling area and a record update area. This
template is designed to process a batch of child records as a single
transaction. This batch of records must be in a file which is the
child file in a parent-child relationship (the Many side of a
One-to-Many relationship).

When a Child Procedure is called, all of the related children
records for the valid parent record in memory are loaded into a
memory QUEUE (the parent record must reside on disk as well as in
memory).  The QUEUE may be modified by adding, changing, or deleting
records.  When the user presses the Ok button, the QUEUE records are
written back to disk as a single transaction.  Changes to the QUEUE
are discarded if the Exit button is pressed.

Note:  Autonumbering keys are NOT supported in the CHILD Template.
To use autonumbering keys, use a set of Browse-Form procedures for
updates.

In order to maintain the highest level of data integrity, the child
file update is framed within a Transaction process (see the essay on
Transaction Processing in the Language Reference for details). The
TopSpeed, Btrieve, and Clarion file drivers support Transaction
Processing. Therefore, the Child file must utilize one of these file
drivers in order to work properly.  For drivers which do not support
transaction processing, use a set of Browse-Form procedures.

The correct File Schematic is essential to the proper operation of a
Child template procedure.  Press the Files button from the Procedure
Properties window to see the existing File Schematic, or create a
new File Schematic if one has not already been defined. The child
file must be the first (Primary) file in the File Schematic. The
parent file must be listed below the child file, and must have a
relationship defined with the child file as in the example below:

This File Schematic is supported:

      Primary (Child file)
        +-> Secondary (Parent file for Child)

This File Schematic is NOT supported:

      Primary (Parent file)
        +->> Secondary (Child file of Parent)

The following is a check-list to help in creating a Child template
procedure for the first time:

* Create the File Schematic as shown above (Child file first, then
  Parent file). Select an Access key from the Child file to use for
  the list box order.

* In the Screen Formatter, place fields from the Child file in the
  list box, and Child file ENTRY fields in the area above the Save
  and Exit buttons.

* Re-order the fields on the screen so that the entry area fields
  are consecutive. Remember which field is your first update field.
  Save the screen structure.

* Supply the First Update Field and Parent File in the Procedure
  Properties. These fields are required.

<Formatter Support>
Formatter Support

The Child template's default screen is pre-defined with two
logically separate areas: a scrolling area, and a field entry area.
The scrolling area lists all Child records for the selected Parent.
The standard list box keys are available to scroll through the child
records (see the Browse template section for details). Buttons below
the list box allow the user to Insert, Change or Delete records.
Also, an Ok and Cancel button are active while in the scrolling
portion of the screen.

The field entry area is similar to a Form in operation. ENTRY fields
are placed in this area to allow data entry for a child record. The
fields in this area must be consecutive in the SCREEN structure and
must immediately precede the Save and Exit buttons. A block of
fields is selectively ENABLEd and DISABLEd when moving back and
forth between the scrolling area and the update area.  The record
may be saved to the list box using the Save button, or it may be
erased by using the Exit button.  The Ok and Cancel buttons are only
available while in the scrolling area.

When the Ok button is pressed, the entries in the QUEUE are written
to disk within a Transaction.  If any error occurs, the entire set
of records are rolled back to the status of the file before the Ok
button was pressed and the user is given an opportunity to change
any problem records and attempt a save again. If a Pulldown
structure is created by the Pulldown Menu Formatter, it is generated
after the screen structure. The Pulldown is OPENed after the screen
structure, and is closed upon exit from the procedure.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

The Child template has 2 separate modes of operation.  The template
selectively disables fields which are not appropriate to the current
mode. In the Scrolling Area, only scrolling area fields are
available. In the Field Entry Area, only entry specific fields are
available.

<  First Update Field>
First Update Field

You must enter the First Update Field here. This should be the first
entry field for the Child file. This is necessary to properly
ENABLE() the range of fields in the screen structure from this field
to the Exit button.  If the fields are not consecutive in the Field
List, the proper fields may not be ENABLEd or DISABLEd.  The easiest
way to ensure consecutive entry fields is to Auto Re-order the
screen fields just prior to saving the screen.

<  Parent File>
Parent File

The Parent File must be supplied to identify which Parent file to
use for the relationship.  The Child template is designed to handle
the relationship between one Parent and one Child file. In order to
ensure that only one user in a multi-user environment may modify a
batch of child records at a time, a HOLD is placed on the parent
record. This signals other Child procedures that the children for
this parent are currently being modified. Other procedures will be
able to read the parent record, but will not be able to modify it.

Therefore, it is important that when using a Child template
procedure to modify a file's records, that there are no other
procedures which may modify these child records. For example, there
must not be any Form template procedures which may modify a child
file's record while it is being updated via a Child template.

<  Exit on Null Parent>
Exit on Null Parent

Since the parent record information is critical to finding the
correct children for a parent, you may select to RETURN from the
child procedure when no parent record has been selected. You may
also enter embedded source code to select a parent record and leave
this checkbox blank.

<  Update Parent on OK>
Update Parent on OK

With this box checked, the parent record is PUT back to its file
when the user presses the Ok button. This allows updating of any
parent information which may have been changed while in the Child
procedure.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section>
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures. This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure>
Setup Procedure

After the CODE statement.

<  Setup Screen>
Setup Screen

After OPEN(Screen).

<  Top of ACCEPT Loop>
Top of ACCEPT Loop

After the LOOP statement and prior to generating formula fields.

<  Prior to Return>
Prior to Return

After exiting the main loop, but prior to FREEing the QUEUE. This
would be a good place to add code which needs to loop through the
RecordQueue for information before exiting.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Enter Scroll Mode Routine>
Enter Scroll Mode Routine

After the DISABLE and ENABLE of the fields to switch to the
scrolling area from the entry field area. This is a good place to
override the automatic enabling and disabling of fields.

<  Enter Update Mode Routine>
Enter Update Mode Routine

Also a good place to override the automatic enabling and disabling
of fields, but when going to update mode.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<<The External Template>>

The External template notifies the Application Generator that the
procedure is contained in an external source (.CLA), object (.OBJ),
or Library (.LIB) file. No source code is generated for an External
procedure.  The procedure's prototype is placed in the program's MAP
from the MODULE Structure Include File named on the Module
Properties window.

The Module Name field must contain the filename of an external
source, object, or library file.

<<The File Template>>

The File template produces a procedure which will allow the user to
Pick a DOS filename from a listing of files on the currently logged
disk. The user may use the keyboard or the mouse to change
directories or select the file.  Since the file mask is an Entry
field, the file mask may be changed by the user. A DOUBLE- CLICK in
the directory list box changes the directory.  A DOUBLE-CLICK in the
files list box selects the highlighted file.

<Formatter Support>
Formatter Support

The File procedure in CLARION.APP is pre-loaded with a screen layout
containing 2 LIST fields, 1 file mask ENTRY field, 1 directory name
display field, and Ok and Cancel  buttons. The files list box shows
filenames in the selected directory which match the available. The
file mask entry field is large enough to contain a simple file mask
of *.??? and causes the files list box to be rebuilt when changed.
The directory display field displays the current directory (up to 35
characters).

The Ok button writes the selected filename to the specified Filename
Variable and the Cancel button returns to the calling procedure
leaving the Filename Variable with its original value.

<Procedure Properties>
Procedure Properties

<  Filename Variable>
Filename Variable

The filename may be saved in any string variable (STRING(64) is
suggested, since the path is added and DOS allows a 64 character
filename). However, a default variable is in the global data of the
default application file (GLO:Filespec in CLARION.APP) to hold the
filename if the Filename Variable is blank.

<  Initial Directory>
Initial Directory

Optionally, an initial directory may be specified for the opening
directory listing (like REPORTS).  The File template calls SETPATH()
just prior to filling the list box. Another SETPATH() returns to the
original path before returning from this procedure.

<  Beginning file mask>
Beginning file mask

A beginning file mask may be specified to use for the opening file
list. The files will be sorted within the mask. If no match for the
file mask is found, the text NO MATCH appears in the file list box.
If no Beginning File Mask is supplied, the default file mask (*.*)
is used.

<  Next Procedure>
Next Procedure

Enter the name of a procedure to be called once a filename has been
successfully selected. The Filename Variable is assigned the
selected filename and the Next Procedure is called.

The View template was designed in conjunction with the File template
and may be used to view the selected file.  Enter the name of a
procedure created with the View template as the Next Procedure for
this combination.

<  Reselect Upon Return>
Reselect Upon Return

If a Next Procedure is defined, you may:

1) Return to the calling procedure after returning from the Next
   Procedure (the default).

2) Allow the user to reselect another filename after returning from
   the Next Procedure (when the box is checked).

<  Blank Name On Cancel>
Blank Name On Cancel

If checked, the variable you named as the Filename Variable (above)
is blanked when the user presses the Cancel button.  When no
Filename Variable is specified, GLO:FileSpec (the default filename
variable) is cleared.

This option is useful when using a File template without a Next
Procedure.  In this case, it is possible to detect if the user has
not selected a file by checking the value contained in the specified
Filename Variable (or GLO:FileSpec).

<  Allow Drive Searches>
Allow Drive Searches

If checked, the list of directories also displays all the current
DOS drive letters.  This allows the user to search for the file on
any valid drive.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure before local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen>
Setup Screen

After the OPEN(Screen) statement.

<  Top of Accept Loop>
Top of Accept Loop

At the top of the screen field processing LOOP.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

No formula classes are supported by this procedure template. Formula
fields are not supported.

<<The Form Template>>

The Form template generates a procedure that will Add, Change, or
Delete a record from the procedure's Primary file (defined in the
File Schematic). If the Enable Shared Files Global Application
prompt is checked, the code is generated with complete Record-level
locking for a multi-user application. Referential Integrity
constraints, as defined in the Data Dictionary, are enforced during
any update to the Primary file, for all One-to-Many relationships to
the Primary file. The template allows for multiple auto-increment
key fields and concurrency checks of multiple memo fields.

<Data Dictionary Validity Checks>
Data Dictionary Validity Checks

Initial field values defined in the Data Dictionary are pre-loaded
during an Add. Range checks (the Must Be In Range Validity Check)
are generated from the Data Dictionary definitions and are enforced
during an Add or Change. If an out of range condition exists, the
user is notified of the valid range for the field (using the
ShowWarning procedure), and the cursor is placed on that field for
editing.

The template automatically generates GET statements to access any
secondary files where the relationship from the procedures Primary
file is defined as Many-to-One.  Fields from the One side of the
relationship should be placed on the screen as display-only.  No
code is generated to update files on the One side of the
relationship.

For example, suppose in the Data Dictionary you have defined
Customers and Invoices as a One-to-Many relationship_One customer
may have Many invoices. That means the Invoices file is  related
Many-to-One to the Customers file. On the Form procedure used to
update the Invoices file you can place the Custyomer's  name and
address fields on the screen, and the correct Customers file record
is retrieved from the   file. But even if you allowed changes to the
Customers file  name and address fields, there is no code generated
to update the Customers record.

A Must Be In File validity check defined in the Data Dictionary is
enforced when the field is completed, or when the user presses the
Ok button.

<Entry Fields with a Lookup Procedure>
Entry Fields with a Lookup Procedure

Lookups are enabled through the Entry Field Properties window in the
Screen Formatter. Enter the name of a Browse procedure in the When
Field is Selected Procedure field, if you want a Browse lookup to
appear as soon as the field is selected by the user.  Use the When
Field is Completed Procedure if you want to  validate an entry after
the user completes the field. This calls the lookup procedure only
if the entry is not valid.

<Multiuser File Updates>
Multiuser File Updates

If the application is set to SHARE files, the procedure enforces
multi-user concurrency checking at the record level.  If a conflict
arises from two or more workstations attempting to update the same
record, the Record is re-read from disk and the FORM screen is
refreshed.  The user is notified of the change, and placed back in
edit mode.

<Maintaining Referential Integrity>
Maintaining Referential Integrity

If Relational Constraints have been defined in the Data Dictionary,
code is generated to enforce the Constraint on One-to-Many
relationships.  All Referential Integrity Constraints are enforced
from the Primary file for the procedure, down its Relational File
Tree for as many levels as exist.

<Transaction Framing>
Transaction Framing

During a relational Change or Delete, a HOLD is placed on the
Primary file record.  All Child files of the Primary file are
updated within a transaction frame to ensure an `all or nothing' Not
all file drivers support Transaction Processing.  If you are using a
File driver that does not support transaction processing, or are
using multiple file drivers within a relationship, you will support
the LOGOUT statement, code is generated to update the files without
the benefit of a transaction frame. Also, if the files in the
Relationship use multiple file drivers, the referential
update/delete cannot use the LOGOUT statement.

For example, if a file relationship is defined with one file using
the Btrieve driver and the related file using the Clarion driver,
code is generated without a LOGOUT transaction frame.  Either
situation has the potential to compromise the Referential Integrity
Finally, if you have set up multiple relations between the same two
files, transaction framing cannot process these relations.  This
will be evident at run-time as a Clarion Run-Time error, Cannot
Logout Files. In this case, check the Disable RI Logout box on the
Procedures Properties screen.

<Formatter Support>
Formatter Support

The default screen contained in CLARION.APP has a local variable
named LOC:Message placed at the top of the entry screen. This
variable is used to inform the user of the current action: Add,
Change, or Delete of the record on the screen.  The message
displayed is stored in CLARION.APP in the global variables as
GLO:InsertMsg, GLO:ChangeMsg, and GLO:DeleteMsg.

You can specify  your own messages on the Procedure Properties
window. If any Prompt for a message is filled in, it is used instead
of the global values stored in the default .APP file. The default
screen has two buttons: Ok and Cancel.  Both of these fields are
required by the template. If a Pulldown structure has been created
by the Pulldown Menu Formatter, it is generated after the screen
structure. The Pulldown is OPENed after the screen structure, and is
closed upon exit from the procedure.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

<  Insert Message>
Insert Message

Enter a message to use instead of the default stored in CLARION.APP
for Inserting a record.

<  Change Message>
Change Message

Enter a message to use instead of the default stored in CLARION.APP
for Changing a record.

<  Delete Message>
Delete Message

Enter a message to use instead of the default stored in CLARION.APP
for Deleting a record.

<  Action after ADD>
Action after ADD

The template supports multiple adds without leaving the FORM screen.
There are four possible actions after an ADD:

     Return to caller generates code to return to the calling
                      procedure after the record is added.

     Retain Record    generates code to allow continuous ADDs
                      without clearing the record buffer or the
                      screen. When the user selects the Ok button,
                      the record buffer's contents are ADDed to the
                      file and the user is placed back on the first
                      entry field on the screen. If there are
                      Auto-increment keys defined for the file, the
                      record is saved, the next Autonumber is
                      retrieved, then the record is restored.

     Clear Record     generates code to allow continuous ADDs but
                      clears the record buffer and screen between
                      each ADD. When the user selects the Ok button
                      the screen and record buffer are cleared and
                      the user is placed back on the first entry
                      field on the screen. If there are
                      Auto-increment keys defined for the file, the
                      next Autonumber is retrieved and the screen
                      updated.

<  Copy field hotkey>
Copy field hotkey

This prompt is dependent on the Retain Record radio button. If
Retain Record is enabled, and the Copy field hotkey contains a
hotkey value, the template generates code for repeated ADDs that Ok
button, the screen fields are erased and the cursor is placed back
on the first field. If the user presses the defined hotkey the
contents of the currently highlighted field are copied from the last
record the user added.

<Next Procedure>
Next Procedure

Enter the Procedure to call when the Ok button is pressed, after the
file's update has completed without any errors. The Next Procedure
call is generated before the code for any Repeated ADDs.

<Disable RI Logout>
Disable RI Logout

Check this box to stop Referential Integrity code from generating.
If multiple constrained relations exist between any two files
processed by the Referential Integrity code, when this code is
processed your program will get a Clarion Runtime halt "Cannot
Logout Files."  Note:  If you check this box, RI Transactions will
not be recoverable if an error occurs.

It is also appropriate  to check this box if you are using a File
driver that handles RI in the database engine (such as the AS/400).

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures. This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

Source code is inserted after the CODE statement.

<  On Add After Record Buffer Is Cleared >
On Add After Record Buffer Is Cleared

Immediately after the record buffer is cleared for an AddRecord and
just before auto-incrementing fields are incremented or fields with
initial values are initialized.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Before File I/O >
Before File I/O

Immediately before the record is written to disk (ADD, PUT, or
DELETE).

<  Setup Next Procedure >
Setup Next Procedure

If a Next Procedure was specified, code is inserted before the
procedure is called.

<  Return from Next Procedure >
Return from Next Procedure

If a Next Procedure was specified, code is inserted after the
procedure is executed.

<  After ADD on Retain or ClearRecord >
After ADD on Retain or ClearRecord

After a record has been added and just before going on to add
another record in "recursive add mode."

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure executs. This code begins in column one, therefore you may
use this window to write any ROUTINEs which are called from any
other embedded source code point.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  SETUP >
SETUP

A Conditional or Computed Field with SETUP in the Formula Class
field is calculated once at the beginning of the procedure before
the screen field processing LOOP.

<  RETURN >
RETURN

A Conditional or Computed Field with RETURN in the Formula Class
field is calculated once just before the return from the procedure
when the user selects the Ok button.

<  PRIMEKEY >
PRIMEKEY

A Conditional or Computed Field with PRIMEKEY in the Formula Class
field is calculated just before the SET(Key,Key) during an
Autoincrement ADD. It is inserted again right before the ADD(File)
to preserve any components you have primed.

This can be used to prime key components to enable subset numbering.
For example, it can be used to cause autonumbering of line item
numbers on an invoice.  If you have defined a key with the fields
InvoiceNumber and LineItemNo, supply the current InvoiceNumber as a
PRIMEKEY Formula.  The AutoNumber Routine determines the next
available LineItemNo for that invoice. The record ADDed to the file
will already have InvoiceNumber and LineItemNo in the record buffer
and on disk.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed. The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The Form21 Template>>

The Form21 template generates a procedure that will Add, Change or
Delete a record from the procedure's Primary file (as defined in the
File Schematic). This form is similar to the (non-CUA) Clarion
Prfessional Developer, version 2.1 Form procedure (the same
keystrokes are available to navigate and complete the form, as well
as version 3.0 button support).

Keystrokes supported:

        CTRL+ESC      =    Cancel
        CTRL+ENTER    =    Done
        ENTER         =    Field complete or Done (on last field)
        ESC           =    Field return or Cancel (on first field)

The template allows multiple auto-increment key fields and
concurrency checks of multiple memo fields. Referential Integrity
constraints are enforced for any One-to-Many relationships to the
checking code (the Must Be In Range Validity Check) is generated
from the Data Dictionary definitions and is enforced during Add or
Change. If an out of range condition exists, the user is notified of
the valid range for the field, and the cursor is placed on that
field for editing.

The template generates GET statements to access Secondary files
where the relationship is defined as Many-to-One.  The Must Be In
File automatic field entry validation from the Data Dictionary is
enforced when the user presses the OK button. If the value entered
in the field does not exist in the specified file, the user is
notified and is placed back on the field.  Use the When Field is
Completed Procedure line to call a Validate procedure.

If the application is set to SHARE files, the procedure enforces
multi-user concurrency checking at the record level.  If a conflict
arises from two or more workstations attempting to update the same
record, the user's Screen is refreshed with the record as changed by
the other workstation, the user is notified of the change, and
placed back in edit mode.

<Referential Integrity>
Referential Integrity

If Relational Constraints have been defined in the Data Dictionary,
code is generated to enforce the Constraint on One-to-Many
relationships. All Referential Integrity Constraints are enforced
from the Primary file for the procedure, down its Relational File
Tree for as many levels as exist.

<Transaction Framing>
Transaction Framing

During a relational Change or Delete a HOLD is placed on the Primary
file record.  All child files of the Primary file are updated within
a transaction frame to ensure an `all or nothing' update or delete.
 If LOGOUT cannot be initiated, the user is given a chance to retry
the update or delete.

Not all file drivers support transaction processing. If the file
driver does not support the LOGOUT statement, code is generated to
update the files without the benefit of a transaction frame. Also,
if the files in the Relationship use multiple file drivers, the
related file using the Clarion driver, code is generated without a
LOGOUT transaction frame.  Either situation has the potential to
compromise the referential integrity of your database.  If the
update/delete fails for any reason, your files cannot be restored to
their original state.

<Formatter Support>
Formatter Support

The default screen contained in CLARION.APP has a local variable
named LOC:Message placed at the top of the entry screen. This
variable is used to inform the user of the current action: Add,
Change, or Delete of the record on the screen.  The message
displayed is stored in CLARION.APP in the global variables as
GLO:InsertMsg, GLO:ChangeMsg, and GLO:DeleteMsg.

You can specify  your own messages on the Procedure Properties
window. If any Prompt for a message is filled in, it is used instead
of the global values stored in the default .APPfile. The default
screen has two buttons: Ok and Cancel. If a Pulldown structure has
been created by the Pulldown Menu Formatter, it is generated after
the screen structure. The Pulldown is OPENed after the screen
structure, and is closed upon exit from the procedure.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

<  Insert Message>
Insert Message

Enter a message to use instead of the default stored in CLARION.APP
for Inserting a record.

<  Change Message>
Change Message

Enter a message to use instead of the default stored in CLARION.APP
for Changing a record.

<  Delete Message>
Delete Message

Enter a message to use instead of the default stored in CLARION.APP
for Deleting a record.

<  Action after ADD>
Action after ADD

The template supports multiple adds without leaving the FORM screen.
There are four possible actions after an ADD:

     Return to caller   generates code to return to the calling
                        procedure after the record is added.

     Retain Record      generates code to allow continuous ADDs
                        without clearing the record buffer or the
                        screen. When the user selects the `Ok'
                        button the record buffer's contents are
                        ADDed to the file and the user is placed
                        back on the first entry field on the screen.
                        If there are Auto-increment keys defined for
                        the file, the record is saved, the next
                        Autonumber is retrieved, then the record is
                        restored.

     Clear Record       generates code to allow continuous ADDs but
                        clears the record buffer and screen between
                        each ADD. When the user selects the Ok
                        button the screen and record buffer are
                        cleared and the user is placed back on the
                        first entry field on the screen. If there
                        are Auto-increment keys defined for the
                        file, the next Autonumber is retrieved and
                        the screen updated.

<  Copy field hotkey>
Copy field hotkey

This prompt is dependent on the Retain Record radio button. If
Retain Record is selected, and Copy field hotkey contains a hotkey
value, the template generates code for repeated ADDs that allows the
user to duplicate individual fields from the prior record when the
hotkey is pressed.

When the user presses the Ok button, the screen fields are erased
and the cursor is placed back on the first field. If the user
presses the defined hotkey the contents of the currently highlighted
field are copied from the last record the user added.

<  Next Procedure>
Next Procedure

Enter the Procedure to call when the Ok button is pressed (or the
form has been "completed"), AFTER the file's update has completed
without any errors.  The Next Procedure call is generated before the
code for any Repeated ADDs.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures. This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

Source code is inserted after the CODE statement.

<  On Add After Record Buffer Is Cleared >
On Add After Record Buffer Is Cleared

Immediately after the record buffer is cleared for an AddRecord and
just before auto-incrementing fields are incremented or fields with
initial values are initialized.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Before File I/O >
Before File I/O

Immediately before the record is written to disk  (ADD, PUT, or
DELETE).

<  Setup Next Procedure >
Setup Next Procedure

If a `Next Procedure' was defined, code is inserted before the
procedure is called.

<  Return from Next Procedure >
Return from Next Procedure

If a `Next Procedure' was defined, code is inserted after the
procedure is executed.

<  After ADD on Retain or ClearRecord >
After ADD on Retain or ClearRecord

After a record has been added and just before going on to add
another record in "recursive add mode."

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed. This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<Formula Classes>
Formula Classes

<  SETUP >
SETUP

A Conditional or Computed Field with "SETUP" in the Formula Class
field is calculated once at the beginning of the procedure before
the screen field processing LOOP.

<  RETURN >
RETURN

A Conditional or Computed Field with "RETURN" in the Formula Class
field is calculated once just before the return from the procedure
when the user selects the `Ok' button.

<  PRIMEKEY >

A Conditional or Computed Field with "PRIMEKEY" in the Formula Class
field is calculated just before the SET(Key,Key) during an
Autoincrement ADD. It is inserted again right before the ADD(File)
to preserve any components you have primed.

This can be used to prime key components to enable subset numbering.
For example, it can be used to cause autonumbering of line item
numbers on an invoice.  If you have defined a key with the fields
InvoiceNumber and LineItemNo, supply the current InvoiceNumber as a
PRIMEKEY Formula.  The AutoNumber Routine determines the next
available LineItemNo for that invoice.  The record ADDed to the file
will already have InvoiceNumber and LineItemNo in the record buffer
and on disk.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed. The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The List Template>>

The List template generates a procedure that scrolls data files on
the screen like a spreadsheet.  Unlike the Browse, Lookup, or
Validate templates the List template loads every selected record
from the file into memory before displaying the list box.

The Queue for the list box must keep track of key values and pointer
fields as well as the information displayed in the list box.
Therefore, Using the list template for a very large file would fill
template should only be used to display relatively small files or
relatively small sections of large files. Selected fields from the
data file are displayed as columns in a list box.  Columns that do
not fit in the list box are displayed using a mouse with the
horizontal scroll bar or the left and right arrow keys.

A selector bar is always positioned over a single row.  The up and
down arrow keys move the selector bar. Moving the selector bar up
off the top row or down off the bottom row scrolls a new record into
the list box.

The PGUP and PGDN keys scroll the prior and next pages of records
into the list box.  CTRL+PGUP displays the first page of records and
CTRL+PGDN displays the last page of records. Pressing the right
mouse button in the top half of the list box scrolls up and in the
Fields may be placed before or after the LIST field in the Field
List.  Selecting the LIST field from a prior field displays the
first page of records.  The Insert, Change, and Delete buttons, or
any other field that processes the record under the selector bar
BASIC, and DOS files have certain limitations, you should know the
file system's capabilities before attempting to use the List
template with an Update Procedure (the View template may be used to
just View an ASCII file). If the Checkbox is checked on, any
reference to a primary key is ignored by this procedure.

You can also display the queue in reverse order. When the Record
Order box is not checked, the Reverse Order box displays the file in
reverse key order. If Both the Record Order and Reverse Order boxes
are checked, the file displays in reverse record order.

A set of display-only fields can be designated as "hot fields" on
screen.  Hot fields display values from the record currently
highlighted by the selector bar and change whenever the selector bar
moves.  This allows display of more information from the highlighted
record than just the one line in the List box. These hot fields MUST
appear consecutively in the Field List but may be placed anywhere on
screen.

<Formatter Support>
Formatter Support

The List procedure in CLARION.APP is pre-loaded with a screen layout
containing a LIST box and Insert, Change, Delete, and Exit buttons.
 The field equate label of the LIST field must be ?List. The
horizontal scroll bar can be turned off if the required information
fits in the list box.  The vertical scroll bar is also optional. All
other properties of the list box can be changed.

Fields from related files may be scrolled in the list box since
"lookups" are done automatically from the Primary file to Secondary
files in the File Schematic with a "Many to 1" relationship.

The Insert, Change, and Delete buttons call an Update Procedure to
process the selected record (the Update Procedure is normally
created with a Form template). The name of the procedure must be
deleted, and an Update Procedure exists, the Insert, Enter and
Delete keys will Insert, Change and Delete while the list box is
selected. However, If only one or two of these buttons have been
removed the function of that button (Insert, Change, or Delete) is
removed from the list box as well and no Update Procedure is called.

The Exit button should not be deleted.

Local data is generated before the screen structure.

If a pulldown structure has been created by the Pulldown Menu
Formatter, it is generated after the screen structure.  The template
makes no provision for opening or closing a pulldown menu.  Such
statements must be entered as embedded source.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

<  Range Limit Field>
Range Limit Field

The range of records to be displayed can be limited by fixing the
value of a component of the primary file access key.  For example,
line items on an invoice can be limited to a single invoice.  The
key for the item file might contain ITM:Invoice and ITM:Line
containing the invoice number and line number of the item.
ITM:Invoice would be the Range Limit Field, displaying only those
records for a fixed invoice number.

<  Range Value Field:>
Range Value Field:

The Range Value Field is the field which holds the value to be used
as the limiting key component value. The key component will be
assigned this value. In this example, the current Invoice record
might contain the number of the invoice that is being displayed.
INV:Number would be the Range Value Field, supplying the value for
the Range Limit Field.  The Range Value Field must not be the same
field as the Range Limit Field.

<  Record Filter>
Record Filter

Enter a free-form record filter expression in this field.  No
validation is done on the code you enter_an invalid expression will
generate compiler errors.  If you are not familiar with the Clarion
language statements or expressions, you should use a Formula field
with the FILTER Formula Class instead.

<  Update Procedure:>
Update Procedure:

Enter the name of the Update Procedure to use to insert, change, or
delete records.  If no Update Procedure is entered, the Insert,
Change, and Delete buttons should be removed from the screen layout.

Special considerations may exist when using ASCII, DOS, and BASIC
file drivers.  In some cases a PUT or DELETE is not allowed.  See
the Database Drivers Appendix for file driver specifics.

<  First Hot Field:>
First Hot Field:

Hot fields are a set of display-only fields that display the
contents of the record under the selector bar. They must appear
consecutively in the Field List. Enter the name of the first hot
field.

<  Last Hot Field:>
Last Hot Field:

Enter the name of the last hot field.

<  Enable Hot Records >
Enable Hot Records

By enabling hot records the programmer has complete control at every
list box movement from the Browse manager. With this option enabled,
every movement of the point bar gets the record under the point bar
into memory, looks up any many to one secondary files, computes any
general formulas and executes any embedded source code which was
entered in the `Process Selected Record' code window.

<  Queue Rebuild>
Queue Rebuild

This checkbox causes the QUEUE to be rebuilt after each call to the
Update Procedure.  This is suggested when using shared files, or
when calling a form with multiple add capability.

<  Record Order >

Checking this box causes the template to ignore any key file access
information.  Therefore, the Access Key in the File Schematic is
ignored and Range Limits cannot be used.

This option was created to allow the view of ASCII, DOS, and BASIC
files.

<  Reverse Order>
Reverse Order

This checkbox reverses the order in which the QUEUE is built.  This
allows a reverse key file listing of records in file systems which
do not support descending keys.

<  Progress Indicator>
Progress Indicator

Checking the Progress Indicator Checkbox will display a moving bar
across the screen as records are loaded into the QUEUE.  The bar is
displayed in the Local Data variable named StatusLine which has been
pre loaded into the Default Application file.  This line has also
been placed on the default screen for the List template and must be
in the screen list after the list box.

<  Progress Character>
Progress Character

Allows you to specify the ASCII character to be used as the `bar.'
You can look up ASCII values in the ASCII chart from the Tools menu.
The ASCII value should be surrounded by angle brackets within single
quotes.  The Default Application file is preloaded with a shaded bar
character `<176>'.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section>
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure>
Setup Procedure

After the CODE statement.

<  Setup Screen>
Setup Screen

After OPEN(Screen) statement.

<  Setup Pulldown>
Setup Pulldown

After OPEN(PullDown) statement.

<  LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas.  This embedded code window
may be used instead of LIST class formulas.  This allows setting up
any fields which are displayed within the scrolling list box.

<  End of General Formulas>
End of General Formulas

When processing a screen field, the formulas which do not have a
class of `FILTER' of `LIST' will be generated.  This embedded source
window allows the entry of computations for screen display fields
without the use of the Formula Editor.

<  Process Selected Record>
Process Selected Record

Code entered in this EMBED will be placed in the FIELD() processing
of ?LIST, directly before the handling of KEYCODE(). This EMBED
point is only generated if Hot records are enabled.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected : >
When Screen Field is Selected :

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  FILTER>
FILTER

A conditional formula of class "FILTER" created by the Formula
Formatter is used to select which records are displayed.  If the
conditional formula evaluates to zero (false) for a given record, it
is not displayed.

<  LIST >
LIST

A Conditional or Computed Field with "LIST" in the Formula Class
field is used for those values which will be displayed in the list
box and are only evaluated when the list box item is created.

<  No class (blank)>
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The Lookup Template>>

The Lookup template generates a procedure that will be used to
preform entry field verification.  The procedure must be called as a
When Field is Selected Procedure on the ENTRY field to validate.
When the ENTRY field has been selected, the Lookup procedure is
called to check for the existence of the value in the current field
against the specified key. If no match is found, a screen with a
list box allows the user to select a valid entry.

Selected fields from the data file are displayed as columns in a
list box.  Columns that do not fit in the list box are displayed
using the horizontal scroll bar or the left and right arrow keys.

A selector bar is always positioned over a single row.  The up and
down arrow keys move the selector bar.

Moving the selector bar up off the top row or down off the bottom
row scrolls a new record into the list box.  The PGUP and PGDN keys
scroll the prior and next pages of records into the list box.
CTRL+PGUP displays the first page of records and CTRL+PGDN displays
the last page of records.  Pressing the right mouse button in the
top half of the list box scrolls up and in the bottom half scrolls
down.  The ENTER key and the mouse DOUBLE-CLICK selects the
highlighted record and completes the procedure.

The Lookup Template uses PRESS to place the selected value into the
entry field it was called to validate. Therefore, if numeric data is
being validated, the typing mode of that field should be INSERT.
This allows PRESS to put the correct value into the field.

The Select, Insert, and Change buttons, or any other field that
processes the record under the selector bar must be placed after the
LIST field in the Field List.

An optional locator field finds a specific record in the file.
Typing any letter while the LIST field is active selects the locator
field.  Completing the locator field with a TAB key or mouse CLICK
second pause for user entry into a locator field, and then
automatically finds the closest matching record to the contents in
the locator field.  The BACKSPACE key is active during this process.
For numeric data types, it is recommended to use a string picture
type (for display purposes).  Date fields are not recommended for
incremental locators.

A set of display-only fields can be designated as "hot fields" on
screen.  Hot fields display values from the record currently
highlighted by the selector bar and change whenever the selector bar
moves.  This allows display of more information from the highlighted
record than just the one line in the List box. These hot fields MUST
appear consecutively in the Field List but may be placed anywhere on
screen. When you define a SUM or AVG formula class, total field code
generation is automatically enabled.

<Formatter Support>
Formatter Support

The Lookup procedure in CLARION.APP is pre-loaded with a screen
layout containing a list box and buttons named Select, Insert,
Change and Exit. The field equate label of the list box must be
information fits in the list box.  All other properties of the
list box can be changed. Fields from related files may be scrolled
in the list box as "lookups" will be done automatically from the
Primary file in the File Schematic to Secondary files with a
"Many to 1" relationship. "1 to Many" relationships are not
supported by this procedure Template.

The Insert and Change buttons call an Update Procedure to process
the selected record (normally created with a "Form" template).  The
name of the procedure must be entered as the "Update Procedure".  If
there is no Update Procedure, these buttons may be deleted.  The
ENTER key and mouse DOUBLE-CLICK while on the list box will select
the record under the selector bar and enter the value in the entry
field.  The Exit button should not be deleted.

Local data is generated before the screen structure.  If a pulldown
structure has been created by the Pulldown Menu Formatter, it is
generated after the screen structure.  The template makes no
provision for opening or closing a pulldown menu (you must write
embedded source for this).

<Procedure Properties>
Procedure Properties

<  Range Limit Field>
Range Limit Field

The range of records to be displayed can be limited by fixing the
value of a component of the primary file access key.  For example,
line items on an invoice can be limited to a single invoice.  The
key for the item file might contain ITM:Invoice and ITM:Line
containing the invoice number and line number of the item.
ITM:Invoice would be the Range Limit Field, displaying only those
records for a fixed invoice number.

<  Range Value Field>
Range Value Field

The Range Value Field is the field which holds the value to be used
as the limiting key component value. The key component will be
assigned this value.

In this example, the current Invoice record might contain the number
of the invoice that is being displayed.  INV:Number would be the
Range Value Field, supplying the value for the Range Limit Field.
The Range Value Field must not be the same field as the Range Limit
Field.

<  Record Filter>
Record Filter

Enter a freeform record filter expression in this field.  No
validation is done on the code you enter _ an invalid expression
will generate compiler errors.  If you are not familiar with Clarion
language statements or expressions, you should use a Formula field
with the FILTER Formula Class instead.

<  Lookup Field>
Lookup Field

Enter the name of the field to be used to validate against your
entry field.  This field should be the only field in a
single-component unique key.

<  Input Field Picture: >

Some fields do not appear on screen in the same format as the data
exists in the file (and in the key). These fields must have an Input
Field Picture to DEFORMAT the data for validation and to FORMAT the
selected data for on-screen display.

Enter the display picture to DEFORMAT the data for validation. This
picture is also used to FORMAT the data to PRESS it into the
keyboard buffer and fill the entry field when a record is selected
from this procedure's list.

Examples of fields which require an Input Field Picture: Any STRING,
CSTRING, or PSTRING with an implied decimal storage picture (for
example, @N6v2), any numeric data field (LONG, DATE, USHORT, etc.)
with a date (@D1, @D2, etc.) or time (@T1, @T2, etc.) display
picture, or any numeric data field (REAL, BFLOAT, etc.) with a
display picture which includes a decimal portion (for example,
@N6.2).

<  Locator Field>
Locator Field

A locator field is a screen entry field that updates a component of
the primary file access key.  When a locator field is entered, the
closest matching record is displayed in the list box.

For example, scrolling a vendor file in vendor name sequence uses a
key that contains the vendor name field (e.g. VND:Name).  To create
a vendor name locator field, place a VND:Name entry field on the
screen below the list box and enter VND:Name for the Locator Field.

Once the user types a character on the keyboard, the locator field
is selected and allows entry for the match.  Pressing TAB positions
the point bar to the closest match.

Another option is Incremental Locator.  This template option allows
one-half second for the user to type a new letter into the locator
field.  At each pause longer than one-half second, the field
contents are used to locate the closest match (TAB does not need to
be pressed).  The backspace key is active during this process.

<  Incremental Locator  >
Incremental Locator

Check this box to indicate that the Locator Field will act as an
incremental locator.

<  Display Key >
Display Key

If using one key for entry field validation and another key as the
display key, enter the name of the display key here. Otherwise,
leave this field blank.

<  Update Procedure>
Update Procedure

Enter the name of the Update Procedure to be used to insert, change,
or delete records.  If no Update Procedure is entered, the Insert,
Change, and Delete buttons should be removed from the screen layout.

<  First Hot Field: >
First Hot Field:

Hot fields are a set of display-only fields that display the
contents of the record under the selector bar. They must appear
consecutively in the Field List. Enter the name of the first hot
field.

<  Last Hot Field>
Last Hot Field

Enter the name of the last hot field.

<  Enable Hot Records >
Enable Hot Records

By enabling hot records the programmer has complete control at every
list box movement from the Browse manager. With this option enabled,
every movement of the point bar gets the record under the point bar
into memory, looks up any many to one secondary files, computes any
general formulas and executes any embedded source code which was
entered in the `Process Selected Record' code window.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Setup Pulldown>
Setup Pulldown

After OPEN(PullDown) statement.

<  Set to First Record Before Total Loop>
Set to First Record Before Total Loop

After the SET(key,key) for Range limits before beginning the total
calculation LOOP.

<  Inside Total Loop, Immediately after NEXT>
Inside Total Loop, Immediately after NEXT

Immediately after each record is read in the total calculation LOOP.

<  Inside Total Loop after Filter>
Inside Total Loop after Filter

After each record is read and filter conditions are evaluated in the
total calculation LOOP.

<  After Total Field Loop>
After Total Field Loop

After all totals have been calculated.

<  LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas.  This embedded code window
may be used instead of LIST class formulas.  This will allow setting
up any fields which are displayed within the scrolling list box.

<  End of General Formulas>
End of General Formulas

When processing a screen field, the formulas which do not have a
class of `FILTER' of `LIST' will be generated.  This embedded source
window allows the entry of computations for screen display fields
without the use of the formula formatter.

<  Case of No Records Found>
Case of No Records Found

When no records are found to display.

<  After Filter and Range Check>
After Filter and Range Check

After any record filter or Range limits are evaluated.

<  Set to First Record>
Set to First Record

When using Range Limits, a SET statement is issued to locate the
first record. This embedded source code window appears just after
the SET statement and allows you to override the SET.

<  Set to Last Record>
Set to Last Record

When using Range Limits, a SET statement is used to locate the
closest match to the last record.  This embedded source code window
appears just after the SET statement and allows you to override the
SET.

<  Process Selected Record>
Process Selected Record

When Enable Hot Records has been checked, code within this embedded
source window will be executed upon movement of the point bar.  The
record under the point bar will be retrieved into memory, any many
to one secondary file records will be retrieved and any general
formulas will be computed just prior to the insertion of this
embedded source code.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Prior to Update Procedure>
Prior to Update Procedure

Immediately before the Update Procedure is called.

<  After Update Procedure>
After Update Procedure

Immediately after return from the Update Procedure.

<  When Screen Field is Selected >
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  LIST >
LIST

A Conditional or Computed Field with "LIST" in the Formula Class
field is used for those values which will be displayed in the list
box and are only evaluated when the list box item is created.

<  SUM >
SUM

A Computed Field with "SUM" in the Formula Class field calculates
the total of the values contained in the field named in the
Expression.  A Conditional Field with "SUM" in the Formula Class
field conditionally calculates the total of the values contained in
the fields named in the True and False Expressions.

<  AVG >
AVG

A Computed Field with "AVG" in the Formula Class field calculates
the arithmetic mean of the field named in the Expression.  A
Conditional Field with "AVG" in the Formula Class field
conditionally calculates the arithmetic mean of the fields named in
the True and False Expressions.  In both cases, the total value is
calculated, then divided by the number of records read to achieve
that total.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The MemForm21 Template>>

The MemForm21 template generates a procedure that processes a screen
created with the Screen Formatter. This template is similar to a
Clarion Prfessional Developer, verion 2.1 Form procedure using the
MEMORY file. Therefore, it does not automatically write any record
to disk.  It  supports the (non-CUA) version 2.1 keystrokes:

        CTRL+ESC      =    Cancel
        CTRL+ENTER    =    Done
        ENTER         =    Field complete or Done (on last field)
        ESC           =    Field return or Cancel (on first field)

<Formatter Support>
Formatter Support

The MemForm21 procedure in CLARION.APP is pre-loaded with an empty
screen layout.  Local data is generated before the screen structure.
 If a pulldown structure has been created by the Pulldown Menu
Formatter, it is generated after the screen structure.

The template makes no provision for opening or closing a pulldown
menu, or any files.  Such statements must be entered as embedded
source.  Statements from the Formula Formatter  are generated at the
top of the keyboard loop before the field setup routines.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

<  Next Procedure>
Next Procedure

Enter the Procedure to call when the Ok button is pressed (or the
screen has been "completed").

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure, after local data and the
report structure.  This may be used to declare any data which you
may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen>
Setup Screen

After OPEN(Screen).

<  When Screen Field is Selected : >
When Screen Field is Selected :

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  SETUP >
SETUP

A Conditional or Computed Field with "SETUP" in the Formula Class
field is calculated once at the beginning of the procedure before
the screen field processing LOOP.

<  RETURN >
RETURN

A Conditional or Computed Field with "RETURN" in the Formula Class
field is calculated once just before the return from the procedure
when the user selects the `Ok' button.

<  PRIMEKEY >

A Conditional or Computed Field with "PRIMEKEY" in the Formula Class
field is calculated just before the SET(Key,Key) during an
Autoincrement ADD.  It is inserted again right before the ADD(File)
to preserve any components you have primed.

This can be used to prime key components to enable subset numbering.
For example, it can be used to cause autonumbering of line item
numbers on an invoice.  If you have defined a key with the fields
InvoiceNumber and LineItemNo, supply the current InvoiceNumber as a
PRIMEKEY Formula.  The AutoNumber Routine determines the next
available LineItemNo for that invoice.  The record ADDed to the file
will already have InvoiceNumber and LineItemNo in the record buffer
and on disk.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The Menu Template>>

The Menu template generates a procedure that displays a pop-up menu
used to execute other procedures. Menu items are placed on screen as
BUTTON in the Screen Formatter.  The procedure associated with each
button must be its When Button is Pressed Procedure.  At least one
button field should have a RETURN procedure call to exit the Menu
procedure.

Other fields can be placed on the screen.  However, this template
makes no provision for accessing or updating data files.

<Formatter Support>
Formatter Support

The Menu procedure in CLARION.APP is preloaded with a screen layout
containing a button named Exit.  The Exit button calls the RETURN
procedure.  The Exit button can be renamed, but if it is deleted,
some other provision must be made to return from the procedure.
Local data is generated before the screen structure.

If a pulldown menu has been created by the Pulldown Menu Formatter,
it is generated after the screen structure.  However, the "Menu"
template makes no provision for opening or closing a pulldown menu.
Such statements must be entered as embedded source.

The Report Formatter is not supported.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Top of Accept Loop>
Top of Accept Loop

Immediately after the LOOP statement which processes each screen
field.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

No formula classes are supported by this procedure Template. All
statements from the Formula Formatter are generated at the top of
the keyboard loop before the field setup routines.

<<The Menu21 Template>>

The Menu21 template generates a procedure that displays a pop-up
menu used to execute other procedures. This is provided for
conversion of version 2.1 Menu Procedures.  The difference between
the Menu and Menu21 procedure Templates are their handling of the
ESC and CTRL+ESC keys. Menu items are placed on screen as BUTTON
fields in the Screen Formatter.  The procedure associated with each
button must be its When Button is Pressed Procedure.

Other fields can be placed on the screen.  However, this template
makes no provision for accessing or updating data files.

<Formatter Support>
Formatter Support

The Menu21 procedure in CLARION.APP is preloaded with a screen
layout containing a button named Exit.  The Exit button calls the
RETURN procedure.  The Exit button can be renamed. Local data is
generated before the screen structure.

If a pulldown menu has been created by the Pulldown Menu Formatter,
it is generated after the screen structure.  However, the "Menu"
template makes no provision for opening or closing a pulldown menu.
Such statements must be entered as embedded source.

The Report Formatter is not supported.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Computed Fields>
Computed Fields

Immediately after the any Formulas are calculated.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  RETURN >
RETURN

A Conditional or Computed Field with "RETURN" in the Formula Class
field is calculated just before the return from the procedure when
the user exits the procedure.

<  Blank (no class)>
Blank (no class)

All formulas are generated at the top of the keyboard loop before
the field setup routines.

<<The MultiPage Template>>

The MultiPage template is designed to work in conjunction with the
PageOf procedure template.  The MultiPage template generates a
procedure that will Add, Change or Delete a record from the
procedures Primary file.  The template allows for multiple
auto-increment key fields and concurrency checks of multiple memo
fields.  Relational integrity constraints are enforced from the
Primary file down its relational tree, for all 1:MANY relationships.

The MultiPage and the PageOf templates are designed to work
together.  All file I/O is done by the MultiPage procedure.

Access to the PageOf procedures is handled thru MultiPage.  The
PageOf procedures are expected to use the same data file as the
MultiPage procedure. MultiPage passes each PageOf procedure the (4)
following parameters: the current Action (Add /Change / Delete /
Check_Required), the current Page number, the total number of Pages,
and the Message describing the current update. MultiPage ( First
page of a multi-page data entry form )

Any PageOf can be accessed directly from MultiPage by pressing the
ALT key and the corresponding page number. Pressing the PGDN key
from any page access the next available page. Pressing PGDN on the
Last Page wraps around to the main (MultiPage) page.

        PageOf  (the page 2 procedure)
        PageOf  (the page 3 procedure)
        PageOf  (the page 4 procedure)
        PageOf  (the page 5 procedure)
        PageOf  (the page 6 procedure)
        PageOf  (the page 7 procedure)
        PageOf  (the page 8 procedure)
        PageOf  (the page 9 procedure)

The template supports up to eight (8) additional pages. The PageOf
procedure calls are all entered on the MultiPage template's
Procedure Properties window. Procedures named in the Page prompts
must use the PageOf procedure template.

At runtime the generated procedure tracks which PageOf procedures
have been called. When the user presses the Ok button,any PageOf
procedure which has not yet been accessed by the user, will be
called in order to check for Required fields. The PageOf procedure
is called and immediately placed in nonstop edit mode. If a required
field has been left blank, the user is notified and placed in edit
mode.

Initial field values from the data dictionary are pre-loaded during
an Add.  Range checking is generated from the data dictionary
definitions and is enforced during Add or Change.  If an out of The
template generates lookups for accessing secondary files where the
relationship is defined as MANY:1. The Must Be In File automatic
field validation is enforced when the user selects OK.  If the value
entered does not exist in the specified file the user is notified
record level.  If a conflict arises from two or more workstations
attempting to update the same record, the user's Screen is refreshed
with the record as changed by the other workstation, the user is
notified of the change, and placed back in edit mode.

<Referential Integrity>
Referential Integrity

If Relational Constraints have been defined in the Data Dictionary,
code is generated to enforce the Constraint on 1:MANY relationships.
All Referential Integrity Constraints are enforced from the Primary
file for the procedure, down its Relational File Tree for as many
levels as exist.

<Transaction Framing>
Transaction Framing

During a relational Change or Delete a HOLD is placed on the Primary
file record.  All child files of the Primary file are updated within
a transaction frame to ensure an `all or nothing' update or delete.
 If LOGOUT cannot be  initiated, the user is given a chance to retry
the update or delete.

Not all file drivers support transaction processing. If the file
driver does not support the LOGOUT statement, code is generated to
update the files without the benefit of a transaction frame. Also,
if the files in the Relationship use multiple file drivers, the
referential update/delete cannot use the LOGOUT statement.

For example, if a file relationship is defined with one file using
the Btrieve driver and the related file using the Clarion driver,
code is generated without a LOGOUT transaction frame. Either
situation has the potential to compromise the referential integrity
of your database.  If the update/delete fails for any reason, your
files cannot be restored to their original state.

Finally, if you have set up multiple relations between the same two
files, transaction framing cannot process these relations.  This
will be evident at run-time as a Clarion Run-Time error, Cannot
Logout Files. In this case, check the Disable RI Logout Check-box on
the Procedures Property screen.

<Formatter Support>
Formatter Support

The default screen contained in CLARION.APP has a local variable
named LOC:Message placed at the top of the entry screen. This
variable is used to inform the user of the current action: Add,
Change, or Delete of the record on the screen.  The message
displayed is stored in CLARION.APP in the global variables
GLO:InsertMsg, GLO:ChangeMsg, and GLO:DeleteMsg respectively.

The programmer can enter his own messages on the Procedure
Properties window. If any Prompt for a message is filled in, it will
be used instead of the global values stored in the default .APP
file. The default screen also has two local variables for page
number display; LOC:Page and LOC:Pages. These variables are used to
display the current page (LOC:Page), and the total number of pages
(LOC:Pages).

The template places an ALRT attribute for the ALT+# key for each
procedure named in the Page prompts. Each page procedure cam be
called by pressing ALT and the "Page's Procedure number" key. For
example, ALT+2 calls the Page2 procedure, ALT+3 the Page3 procedure,
and so on. The default screen has three buttons; Ok, Cancel and
Next_Page. All three fields are required by the template.

<Procedure Properties>
Procedure Properties

<  Insert Message>
Insert Message

Enter a message to use instead of the default stored in Clarion.app
for Inserting a record.

<  Change Message>
Change Message

Enter a message to use instead of the default stored in Clarion.app
for Changing a record.

<  Delete Message>
Delete Message

Enter a message to use instead of the default stored in Clarion.app
for Deleting a record.

<  # Page Procedure>
# Page Procedure

There are eight (8) Prompts for additional pages. They are called in
their numerical order, for instance the `2nd Page Procedure' is
called when the user presses either the Next_Page button, the PGDN
key, or the ALT+2 key. Name your additional Page procedure calls in
these prompts.  These must be filled in consecutively _ you must not
leave any "holes" in the list of PageOf procedure calls.

<  Next Procedure>
Next Procedure

Enter the Procedure to call when the Ok button is pressed, AFTER the
file's update has completed without any errors. The Next Procedure
call is generated before the code for any Repeated ADDs.

<  Disable RI Logout>
Disable RI Logout

If multiple CONSTRAINED relations exist between any two files
processed by the Referential Integrity code, when this code is
processed your program will experience a Clarion Run-Time halt,
Cannot Logout Files.  Check the Disable RI Logout Check-Box to stop
the RI code from generating.  Note:  ANY RI TRANSACTIONS will not be
recoverable if an error occurs.

<Embedded Source>
Embedded Source

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures. This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

Source code is inserted after the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Setup Next Procedure >
Setup Next Procedure

If a Next Procedure was defined, code is inserted before the
procedure is called.

<  Return from Next Procedure >
Return from Next Procedure

If a Next Procedure was defined, code is inserted after the
procedure is executed.

<  Ok Button Press >
Ok Button Press

Code is inserted to execute as soon as the "Ok" button is pressed,
before going into non-stop mode.

<  Next Page Button Press >
Next Page Button Press

Code is inserted to execute as soon as the Next_Page button is
pressed, before accessing the next page.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected : >
When Screen Field is Selected :

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  SETUP >
SETUP

A Conditional or Computed Field with "SETUP" in the Formula Class
field is calculated once at the beginning of the procedure before
the screen field processing LOOP.

<  RETURN >
RETURN

A Conditional or Computed Field with "RETURN" in the Formula Class
field is calculated once just before the return from the procedure
when the user selects the `Ok' button.

<  PRIMEKEY >

A Conditional or Computed Field with "PRIMEKEY" in the Formula Class
field is calculated just before the SET(Key,Key) during an
Autoincrement ADD. It is inserted again right before the ADD(File)
to preserve any components you have primed.

This can be used to prime key components to enable subset numbering.
For example, it can be used to cause autonumbering of line item
numbers on an invoice.  If you have defined a key with the fields
InvoiceNumber and LineItemNo, supply the current InvoiceNumber as a
PRIMEKEY Formula.  The AutoNumber Routine determines the next
available LineItemNo for that invoice.  The record ADDed to the file
will already have InvoiceNumber and LineItemNo in the record buffer
and on disk.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The PageOf Template>>

The PageOf template is designed to work together with the MultiPage
template. PageOf is subordinate to MultiPage.  The PageOf procedure
has no facility to update a record on disk.  All file updates are
handled by the MultiPage template procedure.

A PageOf procedure's prototype in the MAP looks like:

        ProcName(BYTE,*BYTE,BYTE,STRING)

The parameters passed from the MultiPage procedure are:

        (Action,Page,Pages,Message)

The PageOf procedures are expected to use the same data file as the
MultiPage procedure.  MultiPage passes each PageOf procedure the (4)
following parameters: the current Action (Add / Change / Delete /
Check_Required), the current Page number, the total number of Pages,
and the Message describing the current update.

At runtime the MultiPage procedure tracks which PageOf procedures
have been called. When the user presses the Ok button, any PageOf
procedure which has not yet been accessed by the user will be called
in order to check for Required fields. The PageOf procedure is
called and immediately placed in nonstop edit mode. If a required
field has been left blank, the user is notified and placed in edit
mode.

Initial field values from the data dictionary are pre-loaded during
an ADD.  Range checking is generated from the data dictionary
definitions and is enforced during ADD or CHANGE.  If an out of
range condition exists the user is notified of the valid range for
the field, and the cursor is placed on that field for editing.

The template will generate lookups for accessing secondary files
where the relationship is defined as MANY:1.  The Must Be In File
automatic field validation is enforced when the user presses the Ok
button.  If the value entered does not exist in the specified file,
the user is notified and is placed back on the field.

If the application is set to SHARE files the MultiPage procedure
enforces multi-user concurrency checking at the record level.

If Relational Constraints have been defined in the Data Dictionary,
the code generated from the MultiPage template enforces those
constraints.

<Formatter Support>
Formatter Support

The default screen contained in CLARION.APP has a local variable
named LOC:Message placed at the top of the entry screen. This
variable is used to inform the user of the current action: Add,
Change, or Delete of the record on the screen.  The message
displayed is stored in CLARION.APP in the global variables
GLO:InsertMsg, GLO:ChangeMsg, and GLO:DeleteMsg respectively.

The programmer can enter his own messages on the Procedure
Properties window. If any Prompt for a message is filled in, it will
be used instead of the global values stored in the default .APP
file. The default screen also has two local variables for page
number display; LOC:Page and LOC:Pages. These variables are used to
display the current page (LOC:Page), and the total number of pages
(LOC:Pages).

The PGUP and PGDN keys will access the next or prior page
procedures.  The CTRL+PGUP and CTRL+PGDN keys will call the first or
last page procedures respectively. The default screen has four
buttons; Base_Page, Previous_Page, Next_Page, and Last_Page. The
Next_Page and Previous_Page button fields are required by the
template, Base_Page and Last_Page are optional.

Pressing the Base_Page button will return the user to the main page
(MultiPage template).  The Previous and Next Page buttons call the
next or previous page procedures. The Last_Page button calls the
last page procedure defined on the MultiPage procedure property
screen.

If a Pulldown structure has been created by the Pulldown Menu
Formatter, it is generated after the screen structure. The Pulldown
is OPENed after the screen structure, and is closed upon exit from
the procedure.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

The PageOf Procedure Properties window has no specialized prompts.

<Embedded Source>
Embedded Source

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures. This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

Source code is inserted after the CODE statement.

<  Setup Screen>
Setup Screen

After OPEN(Screen).

<  Base_Page Button Press >
Base_Page Button Press

Code is inserted to execute as soon as the "Base Page" button is
pressed, before going into non-stop mode and returning to the main
(MultiPage) procedure.

<  Previous_Page Button Press >
Previous_Page Button Press

Code is inserted to execute as soon as the "Previous Page" button is
pressed, before going into non-stop mode and returning to the prior
page procedure.

<  Next_Page Button Press >
Next_Page Button Press

Code is inserted to execute as soon as the "Next_Page" button is
pressed, before going into non-stop mode and returning to the next
page procedure.  If Next_Page is pressed on the last page, the user
is placed on the first page (MultiPage) procedure.

<  Last_Page Button Press >
Last_Page Button Press

Code is inserted to execute as soon as the "Last Page" button is
pressed, before going into non-stop mode and calling the last page
procedure.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  SETUP >
SETUP

A Conditional or Computed Field with "SETUP" in the Formula Class
field is calculated once at the beginning of the procedure before
the screen field processing LOOP.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The Print Template>>

The Print template generates a procedure that prints the report
created with the Report Formatter.  This template makes no provision
for accessing data files.  Fields printed on the report reflect
their value in memory at the time the procedure is executed.  The
Print template is intended for printing messages or status reports
from data already in memory.

<Formatter Support>
Formatter Support

The Print procedure in CLARION.APP is pre-loaded with an empty
report layout.  Local data is generated before the report structure.
Formulas are generated before the OPEN(Report) statement. The Screen
and Pulldown Menu Formatters are not supported.

<Procedure Properties>
Procedure Properties

<  Redirect Procedure >
Redirect Procedure

Enter the name of a procedure which is called before the report is
generated to allow the user to define the report's destination at
runtime.  The Print Template assumes that the report's destination
is in GLO:FileSpec (a global variable defined in CLARION.APP) after
the Redirect Procedure is called. Normally, the Redirect Procedure
is created from the Redirect Template.

<  View Procedure>
View Procedure

Enter the name of a procedure which is called after the report is
generated to allow the user to view the report's output (if the user
selected the SCREEN or a FILE as the report's destination).
Normally, the View Procedure is created from the View Template.  The
View Template assumes that the report's output filename is in
GLO:FileSpec (a global variable defined in CLARION.APP).  If the
user selected a printer port, the Print Template clears
GLO:FileSpec, which disables the View Procedure.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  After Report OPEN before Formulas >
After Report OPEN before Formulas

After the report has been opened, and before any the Formula fields
are calculated and before anything is printed.

<  After Formulas Before Title Page >
After Formulas Before Title Page

After the formulas are calculated, and before anything is printed.

<  After Grand Totals Before Final Page >
After Grand Totals Before Final Page

After the Title Page and Body Detail have printed, but before the
Final Page.

<  After Final Page Before Close >
After Final Page Before Close

After the Final Page has printed, but before the Report is closed.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Detail Pre-Print Code for>
Detail Pre-Print Code for

This is an implicit embedded source code window which is executed
immediately before the Body detail band is printed. There is only
one implicit Detail Pre-Print embedded source code point in the
report.

<  Detail Post-Print Code for>
Detail Post-Print Code for

This is an implicit embedded source code window which is executed
immediately after the Body detail band is printed. There is only one
implicit Detail Post-Print embedded source code point in the report.

<Formula Classes>
Formula Classes

No formula classes are supported by this procedure Template. All
Formulas are generated once without regard to any value in the
Formula Class field.

<<The Pulldown Template>>

The Pulldown template generates a procedure that displays a pulldown
menu used to execute other procedures.  Menu items are placed in the
menu with the Pulldown Menu Formatter. Once in the Pulldown Menu
Formatter, the menu selections which execute entered instead of a
procedure name by deleting any procedure name and pressing the
Source button.  At least one menu item should call the RETURN
procedure to exit the Pulldown procedure.

The code generated by the Pulldown procedure template operates like
code generated from the Menu procedure template. Therefore, the
template disables all the fields in any screen that is active and
closes the pulldown menu while its selected procedures are
executing.

A pulldown menu that is designed to work with a screen must be
created by the Pulldown Menu Formatter in the procedure that
contains the screen.

<Formatter Support>
Formatter Support

The Pulldown procedure in CLARION.APP is pre-loaded with an empty
pulldown menu.  Local data is generated before the pulldown menu
structure. At least one menu item must contain a menu procedure of
RETURN to exit the pulldown procedure.

Formulas are generated at the top of the keyboard loop before the
menu item edit routines. The Screen and Report Formatters are not
supported.

<Procedure Properties>
Procedure Properties

<  Sticky Menus >
Sticky Menus

Check this box to generate code that re-selects the last menu item
the user selected upon return from the called procedure.

<  Keep Pulldown Active >
Keep Pulldown Active

Check this box to keep the Pulldown structure active during the
execution of a Pulldown option.

<Embedded Source>
Embedded Source

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Pulldown >
Setup Pulldown

After OPEN(Pulldown).

<  Top of Accept Loop>
Top of Accept Loop

At the top of the screen field processing loop.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Pulldown Item Code for>
Pulldown Item Code for

In the CASE FIELD() structure, executed when the menu item is
selected by the user.

<Formula Classes>
Formula Classes

No formula classes are supported by this procedure Template.

<<The Redirect Template>>

The Redirect template creates a procedure which allows the user to
choose a report's destination at runtime.  The Template code itself
is very basic _ all the functionality is provided in the default
procedure in CLARION.APP.

There are two local variables declared which are placed on the
default screen design.  One selects the destination and the other
names the disk file if FILE is the selected destination.

The functionality of the procedure is completely contained in the
embedded source code points for these two fields and the Ok and
Cancel buttons.

Once the destination is selected, it is placed in the GLO:FileSpec
global variable (as expected by the Report and View Templates).

<Formatter Support>
Formatter Support

The Redirect procedure in CLARION.APP is pre-loaded with a default
screen design which allows the user to select any LPT or COM port,
the SCREEN, or to name a disk file to receive report output.

The Report and Pulldown Menu Formatters are not supported.
Formulas are also not supported.

<Procedure Properties>
Procedure Properties

There are no prompts which are specific to this procedure.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure, after local data and the
screen structure.  This may be used to declare any data which you
may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

Immediately after the CODE statement.

<  Setup Screen >
Setup Screen

Immediately after the OPEN(Screen) statement.

<  Top of Accept Loop>
Top of Accept Loop

At the top of the screen field processing loop.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code points.

<  When Screen Field is Selected : >
When Screen Field is Selected :

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed: >
When Screen Field is Completed:

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

Neither Formulas nor Formula Classes are supported by the Redirect
Template.

<<The Report Template>>

The Report template prints reports from one or multiple related data
files.  File relationships, both 1:MANY and MANY:1, are
automatically handled with some restrictions.  The files used for
Schematic is the Primary file, all others are Secondary files.  A
Secondary Child file (double right arrow) has a 1:MANY relationship
with the file to which it is attached in the File Schematic.  A
Secondary Lookup file (single right arrow) has a MANY:1 relationship
with the file to which it is attached in the File Schematic.

The template recurses through as many levels of 1:MANY relationships
as are defined in the File Schematic, starting with the Primary
file, going down the chain of Secondary files beginning with the
first Child file of the Primary.  This generates a set of nested
LOOP structures which read all related records from each file in
turn.  The Body detail band is printed every time a record from the
lowest level Child file is read.

A second Child file of the Primary file would begin a second 1:MANY
file chain_this is not supported by this template.

The Secondary Lookup (MANY:1) relationship is supported for multiple
levels below the file (Primary or Secondary Child) to which it is
related_a lookup will generate a second lookup from it.

This File Schematic is directly supported:

             Primary
             +-> Secondary (Lookup from Primary)
                +-> Secondary (Lookup from Lookup)
             +-> Secondary (Lookup from Primary)
             +->> Secondary (Child of Primary)
                  +-> Secondary (Lookup from Secondary Child)
                      +-> Secondary (Lookup from Lookup)
                  +->> Secondary (Child of Secondary Child)
                       +-> Secondary (Lookup from Secondary Child)

This File Schematic is NOT directly supported:

        Primary
        +-> Secondary (Lookup from Primary)
           +->>Secondary (Child of Lookup) - NO Children of Lookups
        +->> Secondary (Child of Primary)
           +-> Secondary (Lookup from Secondary Child)
        +->> Secondary (Child of Primary) - NO 2nd Child chains

This template supports multiple Group Breaks per Primary or
Secondary Child file.  The code to print the group break is
generated as a ROUTINE called from within the nested LOOP structure
after a record is read from the file for which the group break is
defined.

Record filters are supported on the Primary and every Secondary
Child file (see the Formula Class topic below).  Multi-Up labels are
supported - they must be defined in the Body Detail band.

<Formatter Support>
Formatter Support

The Report procedure in CLARION.APP is pre-loaded with an empty
report layout.  Line counter, Page counter, and Report Device
variables are defined in local data, and the Report Properties
window uses these local variables (the line counter is required by
the template).  GENERIC PRINTER is the default printer selected from
the PRINTER.CTL file.

If you place anything in the Title Page band and intend that it
should print without first printing the Page Header (or Footer), you
must check the ALONE attribute in the Title Page's Band Properties
window.

The Screen Formatter contains a default screen which is  included in
the generated source code only if the Show Report Progress box is
checked.  The screen contains display-only fields for the Line
Counter and Page Counter.  The values in these two fields are
displayed after each PRINT statement in the Report. The Pulldown
Menu Formatter is not supported by the Report Template.

<Procedure Properties>
Procedure Properties

<  Enable ESC Key Abort>
Enable ESC Key Abort

Check this box to include code to allow the user to abort the report
at runtime by pressing the ESC key.

<  Show Report Progress>
Show Report Progress

Check this box to display the screen defined in the Screen Formatter
as the report is being generated.  This allows the user to clearly
see that the report is being generated (especially if it is directed
to a disk file).

<  CLEAR Record First >
CLEAR Record First

Check this box to issue a CLEAR statement for the Primary file
before the SET statement which initiates sequential processing. This
allows you to choose between initializing key fields in the Report
procedure, or calling the Report from another procedure which allows
the user to select or input the correct key field starting values.

<  Primary File Access >
Primary File Access

Select the radio button which defines the type of access you want to
the Primary file.  If you select Keyed Order, the Primary file's
Access Key set on the Field Selection window is used to access the
file and a Range Limit Field may be specified.  If you select Record
Order, the Primary file is accessed in physical, record-number,
order and any Range Limit Field is ignored.

<  Range Limit Field>
Range Limit Field

The records to be printed from the Primary file can be limited by
fixing the value of a component of the Primary file access key. Only
those records whose key component value is equal to the value in the
Range Value Field will be printed.  You must select a key component
field of the Primary file's access key you defined in the File
Schematic.

<  Range Value Field>
Range Value Field

Select the field which, at run-time, will contain the value to which
you want the report's Primary file to be limited.

The value in this field will be assigned to the key component field
you specified in the Range Limit Field before the SET statement for
the Primary file.

<  Redirect Procedure >
Redirect Procedure

Enter the name of a procedure to call before the report is generated
to allow the user to define the report's destination at runtime. The
Report Template assumes that the report's destination is in
GLO:FileSpec (a global variable defined in CLARION.APP) after the
Redirect Procedure is called.  Normally, the Redirect Procedure is
created from the Redirect Template.

<  View Procedure>
View Procedure

Enter the name of a procedure to call after the report is generated
to allow the user to view the report's output (if the user selected
the SCREEN or a FILE as the report's destination).  Normally, the
View Procedure is created from the View Template.  The View Template
assumes that the report's output filename is in GLO:FileSpec (a
global variable defined in CLARION.APP).  If the user selected a
printer port, the Report Template clears GLO:FileSpec, which
disables the View Procedure.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure, after local data and the
report structure.  This may be used to declare any data which you
may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

Immediately after the CODE statement.

<  After Report OPEN before Title Page >
After Report OPEN before Title Page

After all files in the report are opened and the report is opened,
but before anything is printed.

<  Immediately before SET(key,key) >
Immediately before SET(key,key)

Immediately after the Range Value Field has been assigned to the
Range Limit Field and before the SET statement which establishes the
report's starting position in the file.  This allows you to
correctly initialize any other fields in the Primary File Access Key
before the SET statement.  If Range Limit and Range Value Fields are
not specified, no source code is generated from this Embedded Source
Code Point.

<  Before Primary LOOP after SET >
Before Primary LOOP after SET

After the SET statement which sets up the order and starting point
on the Primary file, but before the LOOP which processes the Primary
file records.

<  Top of Primary LOOP >
Top of Primary LOOP

Immediately after the LOOP statement which processes the Primary
file and before any other statement in the LOOP. Code placed here
executes every time through the LOOP.

<  In Primary LOOP immediately after NEXT>
In Primary LOOP immediately after NEXT

Code placed in this window executes immediately after each Primary
file record is read and before any group break code is executed.  If
you code your own record filter at this point instead of using a
Pre:FILTER class Formula, it would be a good idea to check
ERRORCODE() to detect the end of file condition (if you don't, you
could create an infinite loop).

<  In Primary LOOP after NEXT before Lookups>
In Primary LOOP after NEXT before Lookups

Code placed in this window executes after each Primary file record
is read and any group break code is executed, but before any Record
Filter, Lookups, or Formulas.

<  In Primary LOOP after Lookups >
In Primary LOOP after Lookups

Code placed in this window executes after any Record Filter,
Lookups, or Formulas from the Primary file, but before any related
Child records are accessed.

<  After Primary LOOP before Grand Totals and Final Page>
After Primary LOOP before Grand Totals and Final Page

Code placed in this window executes after all records from all files
have been processed, but before the Grand Totals and Final Page
bands are printed.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  At this point, the Report is closed.  This
code begins in column one, therefore you may use this window to
write any ROUTINEs which are called from any other Embedded Source
Code Point.

<  When Screen Field is Selected >
When Screen Field is Selected

The Report Template does not support screen processing during
generation of the report.  Code placed here is not generated.

<  When Screen Field is Completed >
When Screen Field is Completed

The Report Template does not support screen processing during
generation of the report.  Code placed here is not generated.

<  Group Header Pre-Print Code for>
Group Header Pre-Print Code for

This is an implicit embedded source code window which is executed
immediately before the header for the group break referenced is
printed.  There is one implicit Group Header Pre-Print embedded
source code window for each group break defined in the Report
Formatter.

<  Group Header Post-Print Code for>
Group Header Post-Print Code for

This is an implicit embedded source code window which is executed
immediately after the header for the group break referenced is
printed.  There is one implicit Group Header Post-Print embedded
source code window for each group break defined in the Report
Formatter.

<  Group Footer Pre-Print Code for>
Group Footer Pre-Print Code for

This is an implicit embedded source code window which is executed
immediately before the footer for the group break referenced is
printed.  There is one implicit Group Footer Pre-Print embedded
source code window for each group break defined in the Report
Formatter.

<  Group Footer Post-Print Code for>
Group Footer Post-Print Code for

This is an implicit embedded source code window which is executed
immediately after the footer for the group break referenced is
printed.  There is one implicit Group Footer Post-Print embedded
source code window for each group break defined in the Report
Formatter.

<  Detail Pre-Print Code for>
Detail Pre-Print Code for

This is an implicit embedded source code window which is executed
immediately before the Body detail band is printed. There is only
one implicit Detail Pre-Print embedded source code window in the
report.

<  Detail Post-Print Code for>
Detail Post-Print Code for

This is an implicit embedded source code window which is executed
immediately after the Body detail band is printed. There is only one
implicit Detail Post-Print embedded source code window in the
report.

<Formula Classes>
Formula Classes

<  SETUP>
SETUP

A Conditional or Computed Field with "SETUP" in the Formula Class
field is calculated once at the beginning of the procedure,
immediately after the "After Report OPEN before Title Page" embedded
source point.

<  Pre:FILTER>
Pre:FILTER

The prefix of the Primary or a Secondary Child file (not a Lookup
file) with :FILTER appended (Pre:FILTER): This creates a record
filter to skip over records in which the filter expression does not
expression (in a Conditional Field) is used to generate the filter
expression. No other information from the Formula field is used in
the filter (any If True or If False expressions are ignored and the
Field Name is not used _ this may be a "dummy" field).

<  FileName>
FileName

The name of the Primary or a Secondary Child file (not a Lookup
file) in the File Schematic.  This calculates the formula only when
a record read from the named file _ this comes after any Pre:FILTER
expression on the file is evaluated and any Lookup records are read.

<  BreakField>
BreakField

The name of a Group Break field (including prefix).  This calculates
the formula just before the Group Footer is printed. This is useful
for formulas calculating expressions which include one or more
Report Total fields.  The formula's destination variable should be
placed in the group footer.

<  No class (blank) >
No class (blank)

Calculates the formula every time a record is read from any file.

<<The Screen Template>>

The Screen template generates a procedure that processes a screen
created with the Screen Formatter.  The template generates code for
Range checks and enforces `Must be in File' from the dictionary. The
Screen template is intended for displaying status windows or
updating memory variables.

<Formatter Support>
Formatter Support

The Screen procedure in CLARION.APP is pre-loaded with an empty
screen layout.  Local data is generated before the screen structure.
If a pulldown structure has been created by the Pulldown Menu Formatter, it is generated after the screen
structure.  The template makes no provision for opening or closing a pulldown menu.  Such statements
must be entered as embedded source.  Statements from the Formula Formatter are generated at the top of
the keyboard loop before the field setup routines. The Report
Formatter is not supported.

<Embedded Source>
Embedded Source

<  Data Section >
Data Section

In the data section of the procedure, after local data and the
report structure.  This may be used to declare any data which you
may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Top of Accept Loop>
Top of Accept Loop

At the top of the screen field processing loop.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  At this point, the screen is closed.  This
code begins in column one, therefore you may use this window to
write any ROUTINEs which are called from any other embedded source
code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed >
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

< Formula Classes>
 Formula Classes

No formula classes are supported by this procedure Template. All
formulas are generated within the main LOOP before the ACCEPT
statement.

<<The Select Template>>

The Select template generates a procedure that allows a user to
select a record from a scrolling list of records. Once the record is
selected it is loaded into memory.  You may then call another
procedure to take an action on the selected record.  For example a
print procedure may be called which prints the current record from
memory.

The Select template is a modified Browse template procedure to allow
a user to either select a record, or cancel the selection.

Upon selection of the Cancel button, the record buffer is cleared.
This gives the programmer the ability to check for a blank record.
In the print example, the programmer may select to not print if the
record is blank.

A set of display-only fields can be designated as "hot fields" on
screen.  Hot fields display values from the record currently
highlighted by the selector bar and change whenever the selector bar
moves.  This allows display of more information from the highlighted
An optional locator field finds a specific record in the file.
Typing any character while the LIST field is active selects the
locator field.  Completing the locator field with a TAB key or
half-second pause for user entry into a locator field, and then
automatically finds the closest matching record to the contents in
the locator field.  The backspace key is active during this process.
For numeric data types, it is recommended to use a string picture
type (for display purposes).  Date fields are not recommended for
incremental locators.

See the Browse template help for full details on the specific
operation of the scrolling list box and the buttons.

<Formatter Support>
Formatter Support

The Select template in CLARION.APP is pre-loaded with a screen
layout containing a list box and buttons named Insert, Change,
Delete, Select, and Cancel.  The field equate label of the list box
must be ?List and the Immediate attribute must be on turned on.  The
horizontal scroll bar can be turned off if the required information
fits in the list box.

The vertical scroll bar is ignored by the template.  The list box
may not have an edit procedure.  All other properties of the list
box can be changed. Fields from related files may be scrolled in the
list box as "lookups" will be done automatically from the Primary
file in the File Schematic.

The Insert, Change, and Delete buttons call an Update Procedure to
process the selected record (Update Procedures are normally created
with a Form or MultiPage template).  The name of the procedure must
three buttons are deleted and you have named an Update Procedure,
the INSERT, ENTER and DELETE keys will Insert, Change, and Delete
records while the list box is selected.  However, if only one or two
of these buttons have been removed, the function of that button
(Insert, Change, or Delete) is removed from the list box as well the
Update Procedure is not called for that function.

The Select and Cancel buttons should not be deleted.

Local data is generated before the screen structure. If a pulldown
structure has been created by the Pulldown Menu Formatter, it is
generated after the screen structure.  The template makes no
provision for opening or closing a pulldown menu.  Such statements
must be entered as embedded source.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

<  Range Limit Field >
Range Limit Field

The range of records to be displayed can be limited by fixing the
value of a component of the primary file access key.  For example,
line items on an invoice can be limited to a single invoice.  The
key for the item file might contain ITM:Invoice and ITM:Line
containing the invoice number and line number of the item.
ITM:Invoice would be the Range Limit Field, displaying only those
records for a fixed invoice number.

<  Range Value Field >
Range Value Field

The Range Value Field is the field which holds the value to be used
as the limiting key component value. The key component will be
assigned this value.

In this example, the current Invoice record might contain the number
of the invoice that is being displayed.  INV:Number would be the
Range Value Field, supplying the value for the Range Limit Field.
The Range Value Field must not be the same field as the Range Limit
Field.

<  Record Filter>
Record Filter

There are 2 ways to enter a record filter: The formula generator can
be used with a formula class of `FILTER' to validate the expression
as entered. The second method is to enter a free-form record filter
expression in this field.  No validation is done on the code you
enter _ an invalid expression will generate compiler errors. If you
are not familiar with the Clarion language statements or
expressions, you should use a Formula field with the FILTER Formula
Class instead.

<  Locator Field >
Locator Field

A locator field is a screen entry field that updates a component of
the primary file access key.  When a locator field is entered, the
closest matching record is displayed in the list box.

For example, scrolling a vendor file in vendor name sequence uses a
key that contains the vendor name field (e.g. VND:Name).  To create
a vendor name locator field, place a VND:Name entry field on the
screen below the list box and enter VND:Name for the Locator Field.
Once the user types a character on the keyboard, the locator field
is selected and allows entry for the match.  Pressing the Tab key
positions the point bar to the closest match.

Another option is "Incremental Locator".  This template option
allows one-half second for the user to type a new letter into the
locator field.  At each pause longer than one-half second, the field
contents are used to locate the closest match (the Tab key does not
need to be pressed).  The backspace key is active during this
process.

<  Incremental Locator  >
Incremental Locator

Check this box to indicate that the Locator Field will act as an
incremental locator.

<  Update Procedure>
Update Procedure

Enter the name of the Update Procedure to be used to insert, change,
or delete records.  If no Update Procedure is entered, the Insert,
Change, and Delete buttons should be removed from the screen layout.

<  First Hot Field>
First Hot Field

Hot fields are a set of display-only fields that display the
contents of the record under the selector bar. They must appear
consecutively in the Field List. Enter the name of the first hot
field.

<  Last Hot Field>
Last Hot Field

Enter the name of the last hot field.

<  Enable Hot Records >
Enable Hot Records

By enabling hot records the programmer has complete control at every
list box movement from the Browse manager. With this option enabled,
every movement of the point bar gets the record under the point bar
into memory, looks up any many to one secondary files, computes any
general formulas and executes any embedded source code which was
entered in the `Process Selected Record' code window.

<  Enable Total Embeds >
Enable Total Embeds

Check this box to generate total field code, without the need for
dummy formula fields.  Otherwise, you must define a total field with
a formula class of SUM or AVG.

<Embedded Source>
Embedded Source

<  Data Section >
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen) statement.

<  Setup Pulldown>
Setup Pulldown

After OPEN(PullDown) statement.

<  Set to First Record Before Total Loop>
Set to First Record Before Total Loop

After the SET(key,key) for Range limits before beginning the total
calculation LOOP.

<  Inside Total Loop, Immediately after NEXT>
Inside Total Loop, Immediately after NEXT

Immediately after each record is read in the total calculation LOOP.

<  Inside Total Loop after Filter>
Inside Total Loop after Filter

After each record is read and filter conditions are evaluated in the
total calculation LOOP.

<  After Total Field Loop>
After Total Field Loop

After all totals have been calculated.

<  LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas.  This embedded code window
may be used instead of LIST class formulas.  This will allow setting
up any fields which are displayed within the scrolling list box.

<  End of General Formulas>
End of General Formulas

When processing a screen field, the formulas which do not have a
class of `FILTER' of `LIST' will be generated.  This embedded source
window allows the entry of computations for screen display fields
without the use of the formula formatter.

<  Case of No Records Found>
Case of No Records Found

When no records are found to display.

<  After Filter and Range Check>
After Filter and Range Check

After any record filter or Range limits are evaluated.

<  Set to First Record>
Set to First Record

When using Range Limits, a SET() command is issued to locate the
first record. This embedded source code window appears just after
the generated SET() command and allows a programmer override of the
SET() command.

<  Set to Last Record>
Set to Last Record

When using Range Limits, a SET() command is used to locate the
closest match to the last record.  This embedded source code window
appears just after the generated SET() command and allows a
programmer override of the SET() command.

<  Process Selected Record>
Process Selected Record

When Enable Hot Records has been checked, code within this embedded
source window will be executed upon movement of the point bar.  The
record under the point bar will be retrieved into memory, any many
to one secondary file records will be retrieved and any general
formulas will be computed just prior to the insertion of this
embedded source code.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Prior to Update Procedure>
Prior to Update Procedure

Immediately before the Update Procedure is called.

<  After Update Procedure>
After Update Procedure

Immediately after return from the Update Procedure.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  FILTER >
FILTER

A Conditional Field with "FILTER" in the Formula Class field is used
to select which records are displayed.  If the Condition expression
evaluates to zero (false) for a given record, it is not displayed.

<  LIST >
LIST

A Conditional or Computed Field with "LIST" in the Formula Class
field is used for those values which will be displayed in the list
box and are only evaluated when the list box item is created.

<  SUM >
SUM

A Computed Field with "SUM" in the Formula Class field calculates
the total of the values contained in the field named in the
Expression.  A Conditional Field with "SUM" in the Formula Class
field conditionally calculates the total of the values contained in
the fields named in the True and False Expressions.

<  AVG >
AVG

A Computed Field with "AVG" in the Formula Class field calculates
the arithmetic mean of the field named in the Expression.  A
Conditional Field with "AVG" in the Formula Class field
conditionally calculates the arithmetic mean of the fields named in
the True and False Expressions.  In both cases, the total value is
calculated, then divided by the number of records read to achieve
that total.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The Source Template>>

The Source template generates a procedure comprised only of embedded
source code.  All executable statements in the procedure, must be
entered at the embedded source point labeled All Executable Source
Code. The source entered must contain (at least) a RETURN statement.
The Source template is intended for procedures that cannot be
generated by any other template.

<Formatters Supported>
Formatters Supported

The Source template does not support the Application Generator's
Screen, Report, Pulldown Menu, or Formula formatters.  However, the
Text Editor's Screen, Report, and Pulldown Menu Formatters can be
invoked while entering embedded source in the Data Section.

<Procedure Properties>
Procedure Properties

<  Prototype>
Prototype

Enter the procedure's prototype (all except the procedure's name) to
be placed in the program's MAP structure.  For example, if your
procedure is a FUNCTION called MyProc and it will receive two
parameters _ a STRING and a BYTE passed by address _ and return a
STRING, you would enter :

        (STRING,*BYTE),STRING

See FUNCTION and PROCEDURE Prototypes in the Language Reference for
a discussion of valid prototypes.

<  Parameter List>
Parameter List

Enter the complete parameter list (including parentheses) to be
placed on the procedure's PROCEDURE or FUNCTION statement. This
labels the passed parameters for reference within the procedure. For
the above example, you could enter:

        (Fred,Joe)

The generated source code for the procedure would look like:

        MyProc  FUNCTION(Fred,Joe)

In your executable code, you would reference the STRING parameter as
"Fred" and the BYTE as "Joe."

<Embedded Source>
Embedded Source

<  Data Section >
Data Section

In the data section of the procedure, after local data. This may be
used to declare any data which you may want to use in your embedded
source code.

<  All Executable Source Code >
All Executable Source Code

All executable statements in the procedure must go in here.

<Formula Classes>
Formula Classes

No formula classes are supported by this procedure Template. Formula
fields are not supported.

<<The Table21 Template>>

The Table21 template generates a procedure that scrolls data files
on the screen like a spreadsheet.  Unlike the List or Browse
templates, the Table uses a REPEAT structure instead of a list box.
Table is similar to the Browse template, but allows you the
flexibility of coloring individual screen fields and displaying
multi-line individual records.

The Table21 Template is provided for compatibility with the Clarion
Professional Developer version 2.1- style TABLE procedures.  When
you import a TABLE procedure from a 2.1 .APP file, this template is
used but the BUTTON fields in the default screen design are not
generated (maintaining 2.1 compatibility).

Keystrokes for insert, change, and delete will be retained.

BUTTON fields are supported, but are not created in the conversion
process.

A Table21 procedure receives an omittable BYTE parameter that
defines the procedure's use at runtime: Standard mode or Select
mode.

Standard mode means no parameter was passed.  Therefore, the
procedure acts the same as all other Browse-type procedures: when
the user presses Enter on a highlighted record, the Update Procedure
is called; the Delete and Insert buttons are active; and, if a
Select button exists, it is dimmed.  This duplicates the action of a
version 2.1 TABLE that is not called as a "lookup."

Select mode means a value of four (SelectRecord = 4) was passed as
the parameter and allows the Select button to be active.  When an
item is selected, its record is read from disk into the record
buffer and the Table21 procedure returns to the calling procedure.
This duplicates the action of a version 2.1 "lookup" TABLE.  The hot
key for the Change and Select buttons should be EnterKey.

<Formatter Support>
Formatter Support

The Table21 procedure in CLARION.APP is pre-loaded with a screen
layout with a REPEAT structure containing a POINT field and buttons
named Insert, Change, Delete, and Exit. These buttons are not
created when importing a 2.1 TABLE from a 2.1 .APP file.

If a pulldown structure has been created in the Pulldown Menu
Formatter, it is generated after the screen structure.  The template
makes no provision for opening or closing a pulldown menu.  Such
statements must be entered as embedded source.

The Report Formatter is not supported.

<Procedure Properties>
Procedure Properties

<  Range Limit Field>
Range Limit Field

The range of records to be displayed can be limited by fixing the
value of a component of the primary file access key.  For example,
line items on an invoice can be limited to a single invoice.  The
key for the item file might contain ITM:Invoice and ITM:Line
containing the invoice number and line number of the item.
ITM:Invoice would be the Range Limit Field, displaying only those
records for a fixed invoice number.

<  Range Value Field>
Range Value Field

The Range Value Field is the field which holds the value to be used
as the limiting key component value. The key component will be
assigned this value.

In this example, the current Invoice record might contain the number
of the invoice that is being displayed. INV:Number would be the
Range Value Field, supplying the value for the Range Limit Field.
The Range Value Field must not be the same field as the Range Limit
Field.

<  Record Filter>
Record Filter

There are 2 ways to enter a record filter: The formula generator can
be used with a formula class of `FILTER' to validate the expression
as entered. Ths second method is to enter a free-form record filter
expression in this field.  No validation is done on the code you
enter _ an invalid expression will generate compiler errors. If you
are not familiar with the Clarion language statements or
expressions, do not use this entry _ use a Formula field with the
FILTER Formula Class instead.

<  Locator Field>
Locator Field

A locator field is a screen entry field that updates a component of
the primary file access key.  When a locator field is entered, the
closest matching record is displayed in the list box.

For example, scrolling a vendor file in vendor name sequence uses a
key that contains the vendor name field (e.g. VND:Name).  To create
a vendor name locator field, place a VND:Name entry field on the
screen below the list box and enter VND:Name for the Locator Field.

Once the user types a character on the keyboard, the locator field
is selected and allows entry for the match.  Pressing TAB positions
the point bar to the closest match.

Another option is "Incremental Locator".  This template option
allows one-half second for the user to type a new letter into the
locator field.  At each pause longer than one-half second, the field
contents are used to locate the closest match (TAB does not need to
be pressed).  The backspace key is active during this process.

<  Incremental Locator >
Incremental Locator

Check this box to indicate that the Locator Field will act as an
incremental locator.

<  Update Procedure>
Update Procedure

Enter the name of the Update Procedure to be used to insert, change,
or delete records.  If no Update Procedure is entered, the Insert,
Change, and Delete buttons should be removed from the screen layout.

Special considerations may exist when using ASCII, DOS, and BASIC
file drivers.  In some cases a PUT or DELETE is not allowed.  See
the file driver's documentation for file driver specifics.

<  First Hot Field>
First Hot Field

Hot fields are a set of display-only fiel ds that display the
contents of the record under the selector bar. They must appear
consecutively in the Field List. Enter the name of the first hot
field.

<  Last Hot Field>
Last Hot Field

Enter the name of the last hot field.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section>
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure>
Setup Procedure

After the CODE statement.

<  Setup Screen>
Setup Screen

After OPEN(Screen) statement.

<  LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas. This embedded code window
may be used instead of LIST class formulas. This will allow setting
up any fields which are displayed within the scrolling table.

<  End of General Formulas>
End of General Formulas

When processing a screen field, the formulas which do not have a
class of `FILTER' of `LIST' will be generated.  This embedded source
window allows the entry of computations for screen display fields
without the use of the formula formatter.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  When Screen Field is Selected>
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  FILTER >
FILTER

A Conditional Field with "FILTER" in the Formula Class field is used
to select which records are displayed.  If the Condition expression
evaluates to zero (false) for a given record, it is not displayed.

Enter the expression for the Conditional field and leave the True
and False conditions blank.  Only the Expression will be used for
the filter. A filter expression may be entered in the Record Filter
property field instead of using the formula formatter.

<  LIST >
LIST

A Conditional or Computed Field with "LIST" in the Formula Class
field is used for those values which will be displayed in the
scrolling table and are only evaluated when the Table is built.

<  SUM >
SUM

A Computed Field with "SUM" in the Formula Class field calculates
the total of the values contained in the field named in the
Expression.  A Conditional Field with "SUM" in the Formula Class
field conditionally calculates the total of the values contained in
the fields named in the True and False Expressions.

<  AVG >
AVG

A Computed Field with "AVG" in the Formula Class field calculates
the arithmetic mean of the field named in the Expression.  A
Conditional Field with "AVG" in the Formula Class field
conditionally calculates the arithmetic mean of the fields named in
the True and False Expressions.  In both cases, the total value is
calculated, then divided by the number of records read to achieve
that total.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field edit
routines at the top of the field processing code.

<<The ToDo Template>>

The ToDo template should not be selected for code generation.
Procedures, when first referenced, are automatically created as ToDo
until the template for code generation is selected. No operation
"stub code" is generated for procedures which remain as ToDo at
source generation time.

<<The Validate Template>>

The Validate template generates a procedure that will be used to
perform entry field validation.  The procedure must be called as the
When Field is Completed Procedure on the ENTRY field to validate.
When the ENTRY field has been completed by the user, the Validate
procedure is called to check for the existence of the value in the
current field against the specified key.  If no match is found, a
screen with a list box allows the user to select a valid entry.

Selected fields from the data file are displayed as columns in a
list box.  Columns that do not fit in the list box are displayed
using the horizontal scroll bar or the left and right arrow keys. A
selector bar is always positioned over a single row.  The UP ARROW
into the list box.  The PGUP and PGDN keys scroll the prior and next
pages of records into the list box. CTRL+PGUP displays the first
page of records and CTRL+PGDN displays the last page of ENTER key
and the mouse DOUBLE-CLICK selects the highlighted record and
completes the procedure. The Validate Template uses PRESS to place
the selected value into the entry field it was called to validate.
Therefore, if numeric data is being validated, the typing mode of
that field should be INSERT.  This allows PRESS to put the correct
value into the field.

The Select, Insert and Change buttons, or any other field that
processes the record under the selector bar must be placed after the
LIST field in the Field List.

An optional locator field finds a specific record in the file.
Typing any letter while the LIST field is active selects the locator
field.  Completing the locator field with a TAB key or mouse CLICK
displays the closest matching record at the top of the list box.

A set of display-only fields can be designated as "hot fields" on
screen.  Hot fields display values from the record currently
highlighted by the selector bar and change whenever the selector bar
moves.  This allows display of more information from the highlighted
record than just the one line in the List box. These hot fields must
appear consecutively in the Field List but may be placed anywhere on
screen. When you define a SUM or AVG formula class, total field code
generation is automatically enabled.

<Formatter Support>
Formatter Support

The Validate procedure in CLARION.APP is pre-loaded with a screen
layout containing a list box and buttons named Select, Insert, and
Change.  The field equate label of the list box MUST be ?List and
the Immediate attribute MUST be on turned on.  The horizontal scroll
Fields from related files may be scrolled in the list box as
"lookups" will be done automatically from the Primary file in the
File Schematic to Secondary files with a Many to 1 relationship.  1
to Many relationships are not supported by this procedure Template.

The Insert and Change buttons call an Update Procedure to process
the selected record (normally created with a Form template).  The
name of the procedure must be entered as the Update Procedure. If
there is no Update Procedure entered, these buttons may be deleted.
The ENTER key and mouse DOUBLE-CLICK while on the list box will
select the record under the selector bar and enter the value in the
entry field.

Local data is generated before the screen structure.  If a pulldown
structure has been created by the Pulldown Menu Formatter, it is
generated after the screen structure.  The template makes no
provision for opening or closing a pulldown menu (you must write
embedded source for this).

<Procedure Properties>
Procedure Properties

<  Range Limit Field>
Range Limit Field

The range of records to be displayed can be limited by fixing the
value of a component of the primary file access key.  For example,
line items on an invoice can be limited to a single invoice.  The
key for the item file might contain ITM:Invoice and ITM:Line
containing the invoice number and line number of the item.
ITM:Invoice would be the Range Limit Field, displaying only those
records for a fixed invoice number.

<  Range Value Field>
Range Value Field

The Range Value Field is the field which holds the value to be used
as the limiting key component value. The key component will be
assigned this value.

In this example, the current Invoice record might contain the number
of the invoice that is being displayed.  INV:Number would be the
Range Value Field, supplying the value for the Range Limit Field.
The Range Value Field must not be the same field as the Range Limit
Field.

<  Record Filter>
Record Filter

There are 2 ways to enter a record filter: The formula generator can
be used with a formula class of `FILTER' to validate the expression
as entered. The second method is to enter a free-form record filter
expression in this field.  No validation is done on the code you
enter _ an invalid expression will generate compiler errors. If you
are not familiar with the Clarion language statements or
expressions, you should use a Formula field with the FILTER Formula
Class instead.

<  Lookup Field>
Lookup Field

Enter the name of the field to be used to validate against your
entry field.  This field should be the only field in a
single-component unique key.

<  Input Field Picture>

Some fields do not appear on screen in the same format as the data
exists in the file (and in the key). These fields must have an Input
Field Picture to DEFORMAT the data for validation and to FORMAT the
selected data for on-screen display.

Enter the display picture to DEFORMAT the data for validation. This
picture is also used to FORMAT the data to PRESS it into the
keyboard buffer and fill the entry field when a record is selected
from this procedure's list.

Examples of fields which require an Input Field Picture: any STRING,
CSTRING, or PSTRING with an implied decimal storage picture (for
example, @N6v2), any numeric data field (LONG, DATE, USHORT, etc.)
with a date (@D1, @D2, etc.) or time (@T1, @T2, etc.) display
picture, or any numeric data field (REAL, BFLOAT, etc.) with a
display picture which includes a decimal portion (for example,
@N6.2).

<  Locator Field>
Locator Field

A locator field is a screen entry field that updates a component of
the primary file access key.  When a locator field is entered, the
closest matching record is displayed in the list box.

For example, scrolling a vendor file in vendor name sequence uses a
key that contains the vendor name field (e.g. VND:Name).  To create
a vendor name locator field, place a VND:Name entry field on the
screen below the list box and enter VND:Name for the Locator Field.

Once the user types a character on the keyboard, the locator field
is selected and allows entry for the match.  Pressing tab key
positions the point bar to the closest match.

<  Display Key >
Display Key

If using one key for entry field validation and another key as the
display key, enter the name of the display key here. Otherwise,
leave this field blank.

<  Update Procedure >
Update Procedure

Enter the name of the Update Procedure to be used to insert, change,
or delete records.  If no Update Procedure is entered, the Insert
and Change buttons should be removed from the screen layout.

<  First Hot Field>
First Hot Field

Hot fields are a set of display-only fields that display the
contents of the record under the selector bar. They must appear
consecutively in the Field List. Enter the name of the first hot
field.

<  Last Hot Field >
Last Hot Field

Enter the name of the last hot field.

<  Enable Hot Records >
Enable Hot Records

By enabling hot records the programmer has complete control at every
list box movement from the Browse manager. With this option enabled,
every movement of the point bar gets the record under the point bar
into memory, looks up any many to one secondary files, computes any
general formulas and executes any embedded source code which was
entered in the `Process Selected Record' embedded source code point.

<  Lookup Hot Key >
Lookup Hot Key

When the Validate procedure is being called by a hot key, enter the
hot key here.  When a hot key is entered and the hot key is detected
upon entry of the Validate procedure, the screen will be opened.  No
validation check will be done prior to the open of the screen.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section>
Data Section

In the data section of the procedure after local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure>
Setup Procedure

After the CODE statement.

<  Before Validate Lookup>
Before Validate Lookup

After opening the primary file, you may enter source code in this
window to pre-fill any fields which will be used by the lookup other
than the Lookup Field.

<  Setup Screen>
Setup Screen

After OPEN(Screen).

<  Setup Pulldown>
Setup Pulldown

After OPEN(PullDown) statement.

<  Set to First Record Before Total Loop>
Set to First Record Before Total Loop

After the SET(key,key) for Range limits before beginning the total
calculation LOOP.

<  Inside Total Loop, Immediately after NEXT>
Inside Total Loop, Immediately after NEXT

Immediately after each record is read in the total calculation LOOP.

<  Inside Total Loop after Filter>
Inside Total Loop after Filter

After each record is read and filter conditions are evaluated in the
total calculation LOOP.

<  After Total Field Loop>
After Total Field Loop

After all totals have been calculated.

<  LIST Class Formula>
LIST Class Formula

After generation of LIST class formulas.  This embedded code point
may be used instead of LIST class formulas.  This will allow setting
up any fields which are displayed within the scrolling list box.

<  End of General Formulas>
End of General Formulas

When processing a screen field, the formulas which do not have a
class of `FILTER' of `LIST' will be generated.  This embedded source
window allows the entry of computations for screen display fields
without the use of the formula formatter.

<  Case of No Records Found>
Case of No Records Found

When no records are found to display.

<  After Filter and Range Check>
After Filter and Range Check

After any record filter or Range limits are evaluated.

<  Set to First Record>
Set to First Record

When using Range Limits, a SET() command is issued to locate the
first record. This embedded source code window appears just after
the generated SET() command and allows a programmer override of the
SET() command.

<  Set to Last Record>
Set to Last Record

When using Range Limits, a SET() command is used to locate the
closest match to the last record.  This embedded source code window
appears just after the generated SET() command and allows a
programmer override of the SET() command.

<  Process Selected Record>
Process Selected Record

When Enable Hot Records has been checked, code within this embedded
source window will be executed upon movement of the point bar.  The
record under the point bar will be retrieved into memory, any many
to one secondary file records will be retrieved and any general
formulas will be computed just prior to the insertion of this
embedded source code.

<  End of Procedure>
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window.

<  Prior to Update Procedure>
Prior to Update Procedure

Immediately before the Update Procedure is called.

<  After Update Procedure>
After Update Procedure

Immediately after return from the Update Procedure.

<  When Screen Field is Selected : >
When Screen Field is Selected :

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed: >
When Screen Field is Completed:

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

<  LIST >
LIST

A Conditional or Computed Field with "LIST" in the Formula Class
field is used for those values which will be displayed in the list
box and are only evaluated when the list box item is created.

<  SUM>
SUM

A Computed Field with "SUM" in the Formula Class field calculates
the total of the values contained in the field named in the
Expression.  A Conditional Field with "SUM" in the Formula Class
field conditionally calculates the total of the values contained in
the fields named in the True and False Expressions.

<  AVG >
AVG

A Computed Field with "AVG" in the Formula Class field calculates
the arithmetic mean of the field named in the Expression.  A
Conditional Field with "AVG" in the Formula Class field
conditionally calculates the arithmetic mean of the fields named in
the True and False Expressions.  In both cases, the total value is
calculated,  then divided by the number of records read to achieve
that total.

<  No class (blank) >
No class (blank)

Calculates the formula every time any field on the screen is
completed.  The calculation code is generated before the field setup
routines at the top of the processing LOOP.

<<The View Template>>

The View Template displays any ASCII text file in a scrolling list
box. It is normally used to display a report to the screen that was
previously written to disk.  The View template may be used to create
a procedure which is the Next Procedure of a File template.  This
will allow the user to select a file to view from a list of
available files.

The text will scroll up or down using the up and down arrow keys or
the vertical scroll bar. Pressing the right mouse button in the top
half of the list box scrolls up and in the bottom half scrolls down.
Left and right scrolling is supported with END, HOME, the horizontal
scroll bar, or the LEFT ARROW and RIGHT ARROW keys.

The DOS File definition is defined in the template.  The record (one
line of the report) is defined with a length of 255.

If Progress Indicator is checked on then a message will be displayed
to the user while reading the file from disk. This is recommended
for larger reports to let the user know that the program is still
active while reading the file from disk.

While reading the file from disk, the scrolling keys may be used
(PGUP, PGDN, UP, DN, etc...) to scroll the queue.  The mouse cursor
will not be active until the entire file has been read. No changes
are required in the Screen Formatter or the Data Section.  To use
the template, just indicate the name of the DOS file to display.

<Formatter Support>
Formatter Support

The Screen Formatter is available for this template and is preloaded
with a default SCREEN.  The LIST box and Exit button are required.
 The LIST box may be resized or positioned. The SCREEN has three
buttons:  Exit, Print and 25/50 Mode.

The Exit button is required and may not be removed.  The field
equate label must be ?Exit. The Print button prints the file being
viewed.  A print device field is activated to allow the user to
select the output device.  If the Print button is deleted, the
PrintDevice field must also be deleted.

The 25/50 Mode button attempts to toggle the current text mode
between 25 and 50 line mode.  The SCREEN will be re-opened in the
new mode and the list box will be expanded, since the screen
structure in the default application file has an EXPAND attribute
with row 10 identified as the row to duplicate. Since the SETTEXT
statement is used, the mode will be changed to the closest match.
For EGA systems the closest match to 50 line mode will be 43 line
mode.  This button may be removed from the SCREEN structure to
disable video mode switching.

The Report Formatter is not available.

<Procedure Properties>
Procedure Properties

<  File to View>
File to View

This is the ASCII file to be displayed in the list box. It may be a
string constant or a variable. If it is a constant it should be
enclosed in `quotes'. If it is a variable, the variable should be
declared in the Global Data Section of the program.

When left blank, a variable from the default application is used
(GLO:Filespec in CLARION.APP).  This is the same default variable
used in the File template.

<  Warning Size (in K)>
Warning Size (in K)

The View template will read the entire file into a Queue for runtime
performance.  However, If you have a file larger than the assigned
virtual memory block (Queue elements are saved in virtual by default
unless virtual memory support is turned off) the Queue may be
written to disk.  This may substantially slow the scrolling of the
file.  A warning screen may be displayed when a selected file is
larger than a specified size. This size will be multiplied by 1024
and compared against the actual file size.

<  Maximum Line Length>
Maximum Line Length

Most reports will not be wider than 80 or 132 columns. This allows
an opportunity to check for files which do not typically have a
carriage return / line feed combination in the first X number of
characters (like .EXE and .COM files).

The number entered here will be used to check the number of bytes in
each ASCII file record as it is read. If a line read has more than
the number of characters which are specified as the maximum, an
error window will appear and the view will be aborted.  Typically
for an .EXE file this will occur in the first record read and no
`garbage' will be displayed in the list box.  If no Maximum Line
Length is entered, the default of 200 is used.

<  Progress Indicator >
Progress Indicator

If this box is checked on, a message will be displayed to the user
while the file is read from disk.

<  Progress Character>
Progress Character

You may enter the ASCII character to be used as the `bar.' Easy
entry of high order ascii characters may be made by using the ASCII
value found in the ASCII chart from the Tools menu.  The ASCII value
should be surrounded by angle brackets within single quotes.  The
Default Application file is preloaded with a shaded bar character
`<176>'.

<Embedded Source Code Points>
Embedded Source Code Points

<  Data Section >
Data Section

In the data section of the procedure before local data, the screen
and pulldown structures.  This may be used to declare any data which
you may want to use only in your embedded source code.

<  Setup Procedure >
Setup Procedure

After the CODE statement.

<  Setup Screen >
Setup Screen

After OPEN(Screen).

<  Top of Accept Loop>
Top of Accept Loop

At the top of the screen field processing loop.

<  Immediately Before RETURN for non-ASCII file error>
Immediately Before RETURN for non-ASCII file error

When the procedure detects that a line is longer than the maximum
specified by the Warning Size it returns to the caller with an error
message.

<  After NEXT in RptFile Loop >
After NEXT in RptFile Loop

In the loop that read the DOS file from disk, after the NEXT
statement.

<  Immediately After LOOP, before FREE(Queue)>
Immediately After LOOP, before FREE(Queue)

After the screen processing loop is complete, indicating the user is
finished viewing the text.  The queue still contains the text at
this point.

<  End of Procedure >
End of Procedure

Code placed in this window executes after all other code in the
procedure has executed.  This code begins in column one, therefore
you may use this window to write any ROUTINEs which are called from
any other embedded source code window or code that should be execute
at the end of the procedure.

<  When Screen Field is Selected >
When Screen Field is Selected

In the CASE SELECTED() structure, executed when the field is
selected for entry.

<  When Screen Field is Completed>
When Screen Field is Completed

In the CASE FIELD() structure, executed when the field has been
completed.

<Formula Classes>
Formula Classes

No formula classes are supported by this procedure Template. Formula
fields are not supported.

