MONARCH HLP
%%
1,1:1
1,2:2
1,3:3
1,4:4
1,5:5
1,6:6
1,7:7
1,8:8
2,1:45
2,2:46
2,3:47
2,4:48
2,5:2
3,1:10
3,2:11
3,3:12
3,4:33
4,0:9
5,0:10
6,0:11
8,0:6
9,0:13
10,0:3
11,1:16
11,2:15
11,3:17
11,4:18
11,5:14
11,6:32
11,7:33
11,8:19
12,1:20
12,2:21
12,3:22
12,4:23
14,0:5
15,0:24
16,0:25
17,0:8
18,0:17
19,0:28
20,1:27
20,2:28
20,3:33
20,4:3
20,5:31
21,0:34
22,0:35
23,0:36
24,0:37
25,1:38
25,2:39
25,3:40
25,4:41
25,5:42
25,6:43
25,7:43
25,8:44
26,0:40
27,0:41
28,0:43
29,0:16
30,0:14
31,0:39
32,0:32
33,0:46
34,0:47
35,0:30
36,0:21
37,0:20
38,0:49
%%
.1
Input Help
Input is generally the first command used in a Monarch session.  The Report, 
Table and Summary views become available only after you select an input file.
The input file can be any fixed format text file.  (These files are variously
known as TXT files, PRN files, RPT files, etc.)  Other input file types - 
including comma delimited ASCII, DBF, files with no carriage returns, and 
files with very long records - can also be used with Monarch, but require 
preparation using the PREP Utility.

Procedure:    
1.  Select Input from the main menu.
2.  @13[Select a file] from the list or enter a file name.  Monarch asks if 
    you want to load a @5[model] file:
3.  Choose No to continue without loading a model.  
      or
    Choose Yes to display a list of model files.  Type a model name or 
    choose a model from the list.  

The model is loaded and the input file is now available for processing.

@50[Help Index]

.2
Report Help
Report View is where you define @51[templates] used by Monarch to extract 
data from the @1[input] file.  The input file is displayed on screen just as 
it would appear if printed on paper.  You can scroll up, down, right or left. 

To define a template you select a sample line from the input file and set a 
@10[trap] to catch all similar lines.  You paint @11[fields] within the 
sample line to identify the data to be extracted.  You should define the 
template for the @45[detail] lines first.  Then decide which fields to 
@46[Append] with the @54[Page-header], 1st, 2nd, 3rd-Append and @55[Footer] 
templates.

@50[Help Index]
.3
Table Help
Table View displays the data extracted from the input file.  Each row in the 
table is a data record.  Each column is a data field.  You must define a 
detail template in Report View before you can enter Table View.  

Press [/] or [F10] in Table View to access the following options:
  @16[Name] fields
  Change the @15[Format] of selected fields
  Copy down missing field values with @17[Ditto] 
  Select records with @18[Criteria] 
  Change the order of fields with @14[Move] 
  @32[Exclude] fields from output 
  @33[Output] Records using @29[Export] or @30[Print]
  Select a record and @19[Zoom] to its page in Report View. 

@50[Help Index]
.4
Summary Help
In Summary View, you can create crosstab reports that count the number of 
occurrences of a specific value in your file, sum the values of numeric 
fields, include only records with specified values, and group data into 
ranges.  If you have an active @18[criteria] in Table View, it will apply to 
your crosstab summaries.  You create or modify a crosstab report using the 
@27[Define] function.  You can view the crosstab using @28[View].  You 
can also export a crosstab to another file, or print it.  

@50[Help Index]

.5
Models Help
A model is a file that contains all the definitions and settings that you 
have applied to a specific print file to produce a specific result.  The 
following elements are included in a model:

  - Templates created in Report View.  
  - Field characteristics, such as Format and Ditto.  
  - Field names.
  - Order of fields in Table View.
  - Fields excluded from output.
  - The active criteria.
  - Crosstab definitions.
  - The default settings for the:
      - decimal character.
      - control character.
      - delimited ASCII file field delimiter.
      - delimited ASCII file character field "quotes."
      - field names output as first row in WK1, WKS, TXT.  

@50[Help Index]
.6
Defaults Help
Monarch stores default settings for input and output, including:

	Input and output file directories
	Input and output File extensions
	Field delimiters to output in ASCII delimited files
	Number of control characters to strip from the input file
	Whether to include field names when outputting to WK1, WKS, and TXT
           files
        Printer setup string
	Form handling instructions 

The Display default allows you to switch the color palette to monochrome.
This results in a better display for gray scale displays which mimic color.  

If you change a default setting that change will effect only the current 
work session unless you select Update to save your changes to disk.

@50[Help Index]
.7
Monarch Help       
Help is available throughout the Monarch program.  Just press [F1] to get 
a help message that pertains to your current activity.  Bright words in a 
help message are references to other related messages.  To see a related 
message use the arrow keys to move the highlight to a reference and press 
[Enter].  Or, if you use a mouse, you can point and click.  You can use 
the @50[Help Index] to jump to any help message in Monarch.  Use [Backspace] 
to back through the messages that you reached using references.  Press [Esc]
to leave help.  
.8
Quit Help
When you select Quit you will return directly to DOS if you have made 
no changes to the current model.  Monarch will present you with three quit 
options if you have made any changes to the current model.

  - Quit without saving
  - Save model before quitting
  - Do not quit

@50[Help Index]

.9
Selecting a sample line
Choose a sample line or a set of sample lines that is representative of the
detail or sort level that you are trapping.  The sample serves as a guide
while you set your @10[trap] and it is the background on which you paint fields.

Use the up and down arrows to point to the first line of the sample and 
press [Enter].  If the sample has more than one line, move to the last line 
and press [Enter]

@50[Help Index]
.10
Trap Help
A trap is used to identify all lines at a single level in the input file.  
For example, a detail trap identifies common features shared by all detail 
lines, but not shared by other lines.  It will catch only the detail lines 
while ignoring lines from headers and other sort levels.  You create a trap
by entering trap characters below the @9[sample line] in the control panel.
Special characters are used to identify the features of a line.

    Character           Key stroke        Feature
        à               Alt-A             Alphabetical character
        á               Alt-B             Blank space
                       Alt-C             Any non-blank character
        ü               Alt-N             Numeric character

Use any other character for an exact match.  Traps are not sensitive to case.  
Leave the trap empty to trap all lines.  You can specify one or more trap 
characters.  Many different combinations will work.  Monarch highlights all 
lines in the input file that the trap catches and you can scroll around to 
make sure that your trap works as intended.  If you've missed lines or 
caught unwanted lines, you can go back and change the trap definition.

@52[More Trap Help]     @56[Special trap for Addresses]     @50[Help Index]   
.11
Fields help
You paint fields on the sample line(s) to identify the data to extract.  
Monarch automatically applies these field definitions to all similar lines.

Procedure:    
1.  Select Fields from the menu.  The sample line(s) appears, with the 
    cursor in the first column.   
2.  Move the cursor to the beginning of the field and press [Ins].  
3.  Use the arrows to get to the end of the field and press [Enter].
4.  Repeat steps 2 and 3 for each field you want to extract.
5.  Press [F3] after painting the last field or press [Esc] to leave field
    painting without saving your field selections.  

To delete a field press [Del] when the cursor is inside the field.  To move 
among fields use the space bar.  To move the cursor quickly use [Tab], 
[Shift]-[Tab], [Home] and [End].

When you have selected all your fields you can use the @48[Verify] command to 
check your field boundaries. 

@16[Naming fields]     @50[Help Index]
.12
Templates - Reset help
Reset deletes the sample lines, trap, and fields for a level.  As you define 
traps and fields, you may want to change part or all of your definition.  In 
some cases, it is convenient to completely reset the current field and trap 
settings before you proceed.  

Procedure:
1.  Select Reset from the Detail menu.  Monarch clears the existing settings 
    and displays a clean report file.  You can then enter new trap and field 
    definitions.  

@50[Index Help]
.13
File Selection Help
The file list box displays files found in the @6[default] input directory.  
Only files with the default extension are shown.   Subdirectories within 
the default directory are also listed. 

Procedure:    
1.  Type a file name. You don't need to type the extension.  Monarch 
    will use the extension specified in your defaults.
        or
    Choose an input file from the list.  

To see the files in a subdirectory, choose that subdirectory.  To move up 
the directory tree, press [BkSp].  To override the default path and 
extension, type a new path and extension.  

@50[Help Index]
.14
Move Help
You can use Move to arrange your fields in any order.  You can move fields 
to any location.  This does not affect your original report file.  

Procedure:
1.  Select Move from the Table menu.  
2.  Position the field pointer on the field you want to move, then press 
    [Enter] .  
3.  Position the field pointer at the location you want to move to, then 
    press [Enter].  Monarch inserts the field to the left of the field 
    pointer location.  

@50[Help Index]
.15
Format Help
You can change the data format assigned to any field.  Monarch automatically 
assigns the most likely format for each field, but in some cases you may 
find a different format more appropriate.  Available data formats are 
@38[Mixed], @39[Character], @40[Numeric], @41[Date], @42[Full Name], 
@43[L-Split], @43[R-Split] and @44[Zip Line].

Procedure:
1.  Select Format from the Table menu.  A pull-down menu appears.  The 
    current field format is highlighted.  
2.  Move the menu box to the field you want to change and select a format 
    option.  
3.  Repeat step 2 for each field you want to format.  Press [Enter] when 
    you have finished.  The assigned format is shown above the name for each 
    field.  

@50[Help Index]
.16
Naming fields
You can name fields in Report View or in Table View.  Field names may be up
to 10 characters long and may contain any letter, number, and the underscore
character.  No other punctuation is allowed.  Fields must begin with a 
letter.  COUNT is not a legal field name.

Procedure in Report View:
1.  Select Fields from the Detail menu.
2.  Place the cursor anywhere in the field you want to name.  You can use  
    the spacebar to jump from field to field.  
3.  Press [F2], type the field name and press [Enter] .
4.  Repeat steps 2 and 3 for each field.
4.  Press [F3] to accept both the fields and field names.
      or
    Press [Esc] to cancel.

@58[More naming fields help]      @50[Help Index]
.17
Ditto Help
Some reports are designed so that duplicate field values are not repeated 
down the page.  You can use Ditto to restore the missing values.  

Procedure:
1.  Select Ditto from the Table menu.  A choice box appears.  
2.  Move the entry box to the appropriate column.  
3.  Choose Yes to fill blank fields with the previous record's value.  
      or
    Choose No to cancel Ditto.  

@50[Help Index]
.18
Criteria Help
Monarch lets you define a criteria expression to select records.  You can 
think of a criteria expression as a continuation of the instruction, "Use 
only the records where..."  Some simple criteria expressions are: 

   LASTNAME="Smith"
   QTY>30
   DEPARTMENT="Shipping".AND.ACCOUNTNO=10

As soon as you define a criteria expression, it becomes active and the 
CRITERIA ON indicator appears at the top of the screen.  The criteria 
expression selects records for all Monarch operations in Table View and 
Summary View.  Criteria expressions do not effect Report View.  Only the 
selected records are displayed in Table View, analyzed in Summary View, and 
output with the Print and Export commands.  A criteria expression can be 
saved as part of a @7[model] file.   The maximum length of a criteria 
expression is 240 characters.  Monarch criteria expressions are not case 
sensitive.  To define a criteria expression, select Criteria from the Table
View menu.  Then choose @20[Prompt] or @21[Edit].  

@50[Help Index]
.19
Zoom Help
You can move quickly from Table View to Report View by using the Zoom 
function.  Zoom takes you to the top of the report file page which has the 
current record.  The current record is indicated by the record pointer in 
Table View.  Zoom is useful with large files when you want to see a record 
in the context of the report file.  

If a database is very large, it may be difficult to scroll through it to 
find a particular record.  A solution is to first set a criteria that 
matches the record.  Then, use Zoom to review the record in Report View.  

Procedure:
1.  Select a record using the record pointer.  
2.  Select Zoom from the Table menu.  The print file page containing the 
    current record appears.  
3.  Use any of the Report View commands.  
4.  To return to Table View, press (Esc) .  

@54[Page-header]     @50[Help Index]
.20
Criteria Prompt Help
Prompt leads you through a series of prompts to build a criteria expression.  

Procedure:
1.  Select Prompt from the criteria options box.  The field list box appears.  
2.  Select a field from the field list box.  The operator options box appears.  
3.  Select an operator from the options box.  The value box appears.
4.  Enter a value.  The connector options box appears.  Select And or Or and 
    repeat steps 2-4 for another value.  
       or
    Select Quit if you have finished creating a criteria expression.  
5.  Press (F3) or select Accept from the criteria options box to activate 
    the criteria expression.  Records that meet the criteria will now be 
    displayed in Table View.

If you need to enclose part of the expression in parentheses or use 
@57[criteria functions] you must enter them using @21[Criteria Edit].  

@50[Help Index]
.21
Criteria Edit Help
To change the active criteria, select Edit from the criteria options box and 
enter changes.  Edit lets you edit the current expression or enter a new 
expression by typing the full expression directly without prompting.  

You must use Criteria Edit to enter parentheses or @57[criteria functions].
 
@50[Help Index]
.22
Criteria Reset Help
Reset clears the active criteria.  

@50[Help Index]
.23
Criteria Accept Help
Accept activates a criteria expression after it has been defined with 
@20[Prompt] or @21[Edit].  

@50[Help Index]
.24
Load a Model File Help
Select Yes if you want to load a model which has been previously made 
for your input file.  If you select No your options are to reset any model 
definitions currently in memory or retain you current model for the new 
input file.

@50[Help Index]
.25
Reset Model Parameters Help
Reset will clear all model definitions and settings from memory but will 
not effect models saved on disk.

@50[Help Index]
.27
Summary Define 
Each crosstab type uses one or more key fields and one or more data fields.  
The key fields determine which records are included in the crosstab and how 
they are sorted.   The data fields contain the values which you want to 
tally.  The tallied values are displayed in the body of the crosstab report.  
The crosstab definition remains in memory until you quit Monarch, reset the 
definition, or replace the definition.  Summary definitions are saved when 
you save a @5[model].

Procedure:
1.  Select Define from the Summary menu.  The Summary selection box appears.
2.  @34[Select the type of crosstab] you want to use.  Move to a crosstab 
    option and press [Enter].  An ( û ) appears next to your choice.  Press 
    [F3] to continue.  
3.  @35[Select one or more key fields]. Press [F3] to continue.
4.  Select one or more data fields and/or COUNT.  Press [F3] to continue.
5.  @36[Select on which key field values to break the summary.]  Press [F3]
    to continue.

@50[Help Index]
.28
Summary View Help
You must complete the crosstab definition before you can use View.  View 
calculates and displays the result of your crosstab definition.  The 
speed with which the crosstab appears depends on the size of your file.  The 
WAIT light blinks while Monarch calculates the crosstab.  

Procedure:
1.  Select View from the Summary menu.  The current crosstab definition is 
    applied to the records in the current report file.  The resulting report 
    appears.  If a crosstab takes up more than one screen, use the 
    navigation keys to view the rest of the crosstab.  
2.  Press [Esc] or [Enter] to return to the Summary menu.  

@50[Help Index]
.29
Export Help
Monarch exports five file formats from Table View and Summary View.  You 
select the export format by entering the appropriate extension when you name 
the output file.  The following file formats are supported:

   Extension        File Format
      DBF           @59[dBASE III]
      TXT           @60[Fixed length ASCII]
      WKS           @61[1Ä2Ä3 Release 1, 1A]
      WK1           @61[1Ä2Ä3 Release 2.0, 2.01, 2.2]
  (Any other)       @62[Delimited ASCII]

If you have an active @18[criteria], only the data from the selected records
will be included in your output file.  The criteria applies to the tables 
exported from Summary View as well as the records exported from Table view.  
If you want to limit the fields included in the output file,  You may mark 
them as @32[excluded] in Table View.  The exclude feature applies only to 
records exported from Table View.  In Summary View, fields are selected for 
inclusion as part of the summary definition.

@63[More Export from Table and Summary]      @64[Export from Report Detail]

Procedure:
1.  Select Output Export from the Table View menu or the Summary View menu.  
2.  Enter or select the name of the output file.  The file name must include 
    a valid extension.  If you have entered a valid output extension in the
    output defaults, you do not need to supply a file extension here.  Any
    extension you do enter here will supersede the extension in the output
    defaults.  If you supply an existing file name you will be prompted to
    Cancel the export or Replace the existing file.  The report is copied to
    the file you have specified.  
2.  When the export is complete, press any key to continue.  If you want to 
    cancel the export before it is complete, press (Esc) .  

@50[Help Index]
.30
Print Help
The output @6[defaults] will effect printing. If there is an active criteria, 
only those records which meet the criteria will be printed. 

Procedure:
1.  Select Output Print from the Table View menu or the Summary View menu.  
    You may change the margins of the printed output.  If the view you are 
    printing is wider than your margins the data will be truncated.  You can 
    print wide records from Table view in two or more passes by selecting 
    fields to exclude from printing.
2.  Enter the margin changes.
      or
    Press [Enter] twice to continue.  The print file is sent to the printer.  
    A message box displays the current status of the print job.  Press [Esc] 
    to cancel printing.
3.  When printing is complete, press any key to clear the message and 
    continue.  

@65[Printing from Report View]
.31
Summary Reset 
As you develop your crosstab report, you may want to change part or all of 
the current definition.  If you want to start with a clean slate, you can 
reset the current crosstab settings.  The current crosstab definition 
remains until you reset it.  

@50[Help Index]
.32
Table Exclude Help
You can exclude individual columns from your output.  Exclude is 
particularly useful if you have active selection criteria that includes 
fields you do not want to use in your output.

Procedure:
1.  Select Exclude from the Table menu.  A choice box appears.  
2.  Move the entry box to the appropriate column.  
3.  Choose Yes to exclude the selected field.  
      or
    Choose No to cancel Exclude.  
      or
    Choose Global to exclude or include all fields.

If you choose Yes, or Global followed by Exclude all, an asterisk (*) 
appears next to the field name.  The field will not be used when exporting 
or printing.  

@50[Help Index]
.33
Output Help
Monarch provides a flexible array of output options.  You can @29[export] and 
@30[print] from Report View, Table View, and Summary View.  Monarch's print 
facility is adequate for simple output but it does not provide the ability 
to add titles, headers, footers or page numbers.  Nor does it include the 
specialized capabilities required for presentation quality printing.  

Monarch provides two special output options from the detail level in Report 
View.  The Export option is useful if you want to send a full translated 
copy of the input file to a spreadsheet.  Background text, including all 
headers, footers, labels, etc., is exported along with the extracted data 
fields.  Each field value extracted with the detail template is placed in a 
separate cell in the worksheet.  Field values from append-templates are 
ignored and simply treated as background text.  The Print option is used to 
print selected pages from the report file.

@50[Help Index]
.34
Select Type of Summary 
A 1 key field  crosstab sorts the data records by a single field.  The values 
of one or more data fields are summed for each of the different key field 
values.  The records may also be counted for each key value.  

A 2 key fields crosstab arranges the values from the second key field 
across the top of the table.  This arrangement allows only one data field or 
the record count to be summarized.  

A Multiple key fields crosstab allows you to specify as many ten key fields 
and twenty data fields. 

@50[Help Index]
.35
Summary Select Fields Help
Move to a field name and press [Enter] or [Ins].  A letter appears next to 
your choice.  If you're selecting key fields, the letter determines the sort 
order for the fields.  A is the primary sort, B is secondary, etc.  To 
remove a selection, move to the selection and press [Enter] or [Del].  Press 
[F3] to continue.  

@50[Help Index]
.36
Break summary table on which key field values?
If you are defining a Multiple key fields crosstab, the summary is broken on 
All values.  You do not have an option.  If you are defining a 2 key fields 
crosstab, you choose an option for each key field you have selected.  For 
the Specified values and Upper limit values options, enter the appropriate 
values in the entry box.  Press [F3] after entering all of the values.  

The All values option creates the list of key values for you.  A separate 
value is generated for each unique field value in the database.  Only those 
records that meet the current criteria will be used to generate the key
values.

The Specified values option allows you to limit the records which are 
included in a crosstab.  You can specify a match for certain key field 
values.  Only the records with key field values that match your 
specifications are included.  

The Upper limits option allows you to specify upper limit values for your 
key fields.  All records are included, grouped according to field values
that are less than or equal to the specified key values.  

@50[Help Index]
.37
Summary Enter Key List Help
Type each key value and press [Enter].  You may enter the values in any 
order.  Monarch will sort the values when it creates the summary.  Press 
[F3] when you have finished entering the values.

@50[Help Index]
.38
Mixed Format Help
Mixed is a special format used only when exporting data to a spreadsheet 
with background text retained.  When you choose mixed format, Monarch 
examines field values in each record and assigns either numeric or character 
format on a record-by-record basis.  

@50[Help Index]
.39
Character Format Help
Monarch automatically assigns character format to fields containing text.  
You can manually assign the character format to any field, including fields 
containing dates and numbers.  If a field has a leading zero, such as the 
zip code, "01776," Monarch assigns character format to that field.  

When you assign character format, you are given the option to trim leading 
blank characters.  Answer Yes only if leading blanks appear in the field 
column in Table View.  Otherwise, trimming is unnecessary.  

@50[Help Index]
.40
Numeric Format Help
Monarch automatically assigns numeric format to fields containing numbers.
Monarch can recognize numbers that appear in the input file in a variety of 
formats, including formats with embedded commas, currency symbols and 
negation signs.  Valid negation signs include parentheses ( ), the minus 
sign (-), and  debit (DB) and credit (CR) symbols.

Monarch can recognize international numbers in the format 24.347.143,50 when 
you set a special international @6[default] option.  

@50[Help Index]
.41
Date Format Help
Monarch automatically assigns date format to dates expressed as MM/DD/YY in 
the input file.  When dates appear in alternate formats, you must assign the 
date format manually.  You can assign date format to any date provided it 
appears in the input file as some variant of MDY, DMY or YMD.  Date fields 
are always displayed in Table View as YYYYMMDD, the standard dBASE 
convention.  

EXAMPLE:  If you specify DMY as the date format, Monarch will recognize all 
the following dates as they appear in the input file:

   22/03/1989
   22-MAR-89
   22 March 89
   22-03-89

and display the date in Table View as:

   19890322

@50[Help Index]
.42
Full Name Format Help
Full Name is a special format option that automatically parses (divides) a 
character field into five subfields.  The option is used to split a single 
field containing a person's name into separate subfields containing first 
name, middle name, last name, and titles (prefix and suffix.) 

EXAMPLE: If you assign the full name format to a character field containing 
the names shown below, five subfields will be created for each name:

   NAME
   Ms. Mary Betts
   Robert Croteau
   Jack Lewis Bolger M.D.
   Mr. Billy "The Kid" Franklin

NAME_PRE       NAME_FIR    NAME_MID     NAME_LAS      NAME_SUF
Ms.            Mary                     Betts
               Robert                   Croteau
               Jack        Lewis        Bolger        M.D.
Mr.            Billy       "The Kid"    Franklin

@50[Help Index]
.43
L-Split and R-Split Format Help
The L-Split and R-Split format options let you split any field into two or 
more subfields.  When you choose the L-Split or R-Split format options, you 
are asked to specify the number of subfields to be created as well as the 
character that Monarch should recognize as the subfield delimiter.  Typical 
delimiter characters are spaces, commas, colons, and semi-colons, but any 
delimiter character may be specified.  A space is the default delimiter.  

Splitting left-to-right will sometimes produce different subfield values 
than splitting right-to-left.  Choose the split option that produces the 
desired result.

EXAMPLE: Suppose you need to split a part number field into two subfields.  
You specify "-" as the delimiter.  

Sample part numbers:       With L-Split becomes:       With R-Split becomes:
   DB-537-TMP                 DB     537-TMP              DB-537      TMP
   XLS-91-TMP                 XLS    91-TMP               XLS-91      TMP
   SNGL-2137-PRM              SNGL   2137-PRM             SNGL-2137   PRM

@50[Help Index]
.44
Zip Line Format Help
The Zip Line format option is used to split a single address field 
containing city, state and zip into three subfields.


  ADDRESS           becomes     ADDRES_CIT   ADDRES_STA   ADDRES_ZIP

Syracuse, NY  13202		Syracuse	 NY        13202
Fairbanks, AK  99608		Fairbanks	 AK	   99608
San Jose, CA  95118		San Jose	 CA	   95118


Both US and Canadian postal codes are supported.


@50[Help Index]
.45
Defining a detail template
Four steps are required to define a detail template: 

    1.  @9[Select a detail line as a sample].      
    2.  Identify a feature on the sample line that is shared by all other 
        detail lines.  For example, each detail line may have a numeric 
        character followed by a blank in a particular column position.
    3.  Set a @10[trap] to catch all the detail lines by calling out the 
        common feature on the sample line.
    4.  Paint @11[fields] on the sample line to identify the data to be 
        extracted. 

        Monarch will automatically extract the same fields from all the 
        other detail lines.

Sometimes, detail information wraps around to appear on more than one line 
in the input file.  In this case, the steps required to define a template 
are exactly the same as described above except you must select several lines 
for the sample.  

@50[Help Index].
.46
Report Append Help
Many reports are sorted on multiple levels.  For example a sales report
might be sorted by SALESMAN and REGION.  In this case, REGION is the highest 
sort level and SALESMAN is at the next lower level.  The fields comprising 
the transactions are at the detail level.  A single SALESMAN or REGION would
be associated with many detail lines.  To append the SALESMAN and REGION fields
to the detail fields you must define append-templates.    

@54[Page-header] templates extract fields from the top of each report page.

1st, 2nd, and 3rd-Append templates are used to capture higher level sort 
information.  They capture fields which precede detail fields.  The extracted 
fields are appended to all following detail lines until a new value is 
encountered.

@55[Footer] templates are also used to extract higher sort level information,
but footer fields are appended to the detail fields which precede them.

The procedure for defining traps and fields for 1st, 2nd, and 3rd-Append 
and footer templates is the same as for detail templates.  

@50[Help Index]
.47
Goto-Page and Output Page Help

Enter a page number.  


@54[Page-header]
.48
Verify Help
Use the Verify command to be certain that all your fields are painted in the 
correct location and are the correct length.  Report View Verify scans the
entire report and examines the field boundaries.  If any characters are 
found immediately adjacent to a field boundary, Monarch will alert you that 
the field may be too short or painted at the wrong location.  Then you 
decide whether the field is correctly painted or needs to be re-painted.  

Procedure:
1.  Select Verify from the Report View menu and press [Enter].  A status box 
    will keep you informed of the current report page and the percentage of 
    the report which has been verified.  If Monarch finds a field with 
    characters adjacent to its boundaries, it will stop and highlight the 
    field in red.  (If you have a monochrome monitor the field will blink.)     
    Press [Enter] to continue verifying, or press [Esc] to return to Report 
    View so you can re-paint the field.  
2.  When the verification is complete, press [Enter] to return to the Report 
    View menu.  

@50[Help Index]
.49
File Replace Help
If you select Replace you will write over the existing file.

@50[Help Index]
.50
Help Index
@61[1Ä2Ä3 ]                            @60[Fixed length ASCII]      
@46[Append Templates]                  @55[Footer Template]             
@18[Criteria]                          @15[Format]          
@23[Criteria Accept]                   @39[Format Character]                
@21[Criteria Edit]                     @41[Format Date]                  
@57[Criteria Functions]                @42[Format Full Name]         
@20[Criteria Prompt]                   @43[Format L-Split]              
@22[Criteria Reset]                    @43[Format R-Split]                  
@57[Criteria Functions]                @38[Format Mixed]               
@59[dBASE III]                         @40[Format Numeric]         
@6[Defaults]                          @44[Format Zip Line]                  
@62[Delimited ASCII]                   @47[Goto Page]                     
@45[Detail Template]                   @1[Input]                         
@17[Ditto]                             @5[Models]                 
@32[Exclude Fields]                    @24[Model Load]              
@29[Export]                            @25[Model Reset]                   
@11[Fields]                            @14[Move Fields]                   
@49[File Replace]                      @16[Name]                      
@13[File Selection]                    @33[Output]                     

@66[More Help Index]
.51
Templates 
Imagine taking a piece of cardboard and cutting holes in certain locations.  If 
you  place this imaginary template on top of a printed report, only selected 
information will show through the holes.  Monarch uses electronic templates
to extract data from the input file.  Instead of cutting holes in the 
template, you paint the fields to be extracted.  If your input file has 
multiple sort levels, you will define a separate template for each level 
that contains data you want to extract.

You must always define a detail template for every input file. Append 
templates are optional.  After you have defined a @45[detail template], you 
may define up to five additional @46[append-templates] to extract data from 
higher sort levels, and from the page header and footer.

Monarch generates one record for each detail line in the input file.  Fields 
from each detail line serve as the nucleus for each record.  To complete a
full record, fields from higher sort levels, the page header and footer are 
appended to the fields supplied by the detail template. 

@50[Help Index]
 
.52
Trap Help (continued)
Sample line:         CD    2  Bach, C.P.E. Concertos for Cello    WTL 117
Trap example:              üáá

The trap will
ignore this line:  MEDIA  QTY DESCRIPTION                         LABEL/NO

It will catch        CD    2  Bach, C.P.E. Concertos for Cello    WTL 117
these lines:         CD    1  Handel, Concerti Grossi             PHI 422 363
                     LP    3  Pachelbel, Motets                   CHR 74566

Procedure:
1.  Select Trap from the menu.  A message will ask if all fields for the
    current level are on a single line.
2.  Select Yes for a single line sample.  Select no for a multiple line
    sample.
3.  Use the line pointer to select the sample line or lines, then press
    [Enter].  The sample appears in the control panel.
4.  Enter the trap characters for the line, then press [Enter].
.53
Zip Trap
Some reports contain address blocks with an uncertain number of lines.  Some 
addresses may fit on three lines while others may require four, five or more
lines.  This presents a special problem.  How can you define a template to 
capture fields in an address if you don't know how many lines the address 
will contain?  Monarch solves this problem with a special <zip> trap that 
looks for the city/state/zip line in each address block.  When the <zip> 
trap is used, Monarch catches the city/state/zip line, and all lines above 
that line, until a blank line is encountered in the input file.  The <zip> 
trap should be used only when address blocks have an uncertain number of 
lines.  If the number of address lines is fixed, use a standard trap.    

@56[More Zip trap help]    @50[Help Index]
.54
Page-header
Many reports have titles, page numbers, dates and other fields that appear 
at the top of each page.  This is called the pageÿheader.  Monarch uses a 
special template to capture useful pageÿheader information.  Most report files 
have a form feed code (ASCII 12, Hex 0C) embedded at the page break.  Monarch 
uses the form feed character to identify the beginning of a pageÿheader so 
you don't need to set a trap.  All you need to do is select fields.  If the 
input file does not have form feeds, you can define a standard trap to 
identify the page-header.  It's a good idea to do this even if you do not 
want to extract fields from the page header.  GoTo-Page and Zoom will work 
more efficiently if the page breaks are well defined.  

Pageÿheader templates cannot overlap with other templates.  However, you can 
overlap 1st, 2nd, and 3rdÄAppend templates, if necessary.  1st, 2nd, and 3rd-
Append templates.  
.55
Footer
1st, 2nd, and 3rd-Append @51[template] can only extract fields which precede
the detail fields on the page.  Occasionally, fields from a sort level follow 
the @45[detail] fields.  Select Footer from the @46[Append] menu to extract
these fields.

@50[Help Index]
.56
Zip Trap (continued)
Procedure:
1.  Select the appropriate template.   1st, 2nd, or 3rd append is most usual 
    but any template can extract address blocks.
2.  Select Trap.  The message appears: Are all fields contained on a single 
    line?
3.  Select No.
4.  Scroll the input file to find an address block with the maximum number 
    of lines that will be encountered for any address in the file.  Select 
    the first line of the address block, then press [Enter].  
4.  Move the cursor to select the last line in the address block,  then press 
    [Enter].
5.  Type:    <zip> [Enter].

Monarch will not highlight address blocks caught with the <zip> trap until 
after you paint the address fields.  Paint the entire address block as 
though it is a single field.  Monarch will automatically split the block to 
make each line a separate field.  Each line can be further split into 
subfields using the @15[Format] commands in @3[Table View].  

@50[Help Index]
.57
Criteria Functions
Functions include a function name followed by arguments.  A function can be 
embedded as an argument within another function.  Functions are entered in 
the criteria expression with @21[Criteria Edit].  Functions supported are:

ABS(field) returns the absolute value of a numeric expression.

DAY(field) returns the day portion of a date expression.  To find all entries
   made on the first of the month, use DAY(ENTER_DATE)=1.

INSTR(string,field) returns an integer indicating the starting position of
   the string within the field.  For example, INSTR("jazz",TITLE)>0 finds 
   all titles with the word "jazz" in them.             

INT(field) returns the integer part of a number.

LEFT(field,n) returns the n leftmost characters of the character string.

LEN(field) returns the length of the character string.


@67[More Criteria Functions]     @50[Help Index]
.58
Naming fields (Continued)
Procedure in Table View:
1.  Select Name from the Table menu.  An entry box appears.  
2.  Use the RIGHT or LEFT arrows to move the entry box to any field.
3.  Enter a field name.  
4.  Repeat steps 2 and 3 for each field, using the arrow keys to move 
    between fields.  Press [Enter] when you're done naming fields.

@50[Help Index]
.59
Exporting to dBASE III
If you use the DBF extension your output file will be in the dBASE III Plus
file format.  The field names from Table View and the top row of key field 
labels from Summary View are always included in the database definition no 
matter how you set your output default for "Include field names as first row 
in output file?"  Fields will be formatted according to their format in
Table View.

@50[Help Index]
.60
Exporting to Fixed length ASCII
Use fixed length ASCII if you want to export to a word processor, a report 
file, or to a database manager that accepts fixed length ASCII records.  
Fixed length ASCII may also be referred to as system data format (SDF) or 
text file format.  

The field names from Table View and the top row of key field labels from Summary View are included in the export file if you set your output default to Yes for "Include field names as first row in output file?"   

@50[Help Index]
.61
Exporting to Lotus 1-2-3 
Monarch exports two spreadsheet file formats, WKS for 1-2-3 Release 1 and 
WK1 for 1-2-3 Release 2.  Most other spreadsheet programs can read these 
files directly, or import them.

The field names from Table View and the top row of key field labels from 
Summary View are included in the worksheet if you set your output default to 
Yes for "Include field names as first row in output file?"  Cells will be 
formatted according to the field format in Table View.  Dates will be 
exported in the 1-2-3 serial date format.  Character fields will be exported 
as labels.  Numbers will be exported with the number of decimals indicated 
under Table [/] Format Numeric Decimals.  

@50[Help Index]
.62
Exporting to Delimited ASCII
Delimited ASCII, also called comma separated variable (CSV), is a common 
means of transferring data between database managers with unlike file 
structures.  You choose the delimiting character and indicate it in the 
output defaults along with the setting whether to include character fields 
in quotes.  

The field names from Table View and the top row of key field labels from 
Summary View are never included in the output file, no matter what your 
setting in Default Output for "Include field names as first row in output 
file?" 

@50[Help Index]
.63
Export from Table or Summary View
Procedure:
1.  Select Output Export from the Table View menu or the Summary View menu.  
2.  Enter or select the name of the output file.  The file name must include 
    a valid extension.  If you have entered a valid output extension in the 
    output defaults, you do not need to supply a file extension here.  Any 
    extension you do enter here will supersede the extension in the output 
    defaults.  If you supply an existing file name you will be prompted to 
    Cancel the export or Replace the existing file.  The report is copied to 
    the file you have specified.  
2.  When the export is complete, press any key to continue.  If you want to 
    cancel the export before it is complete, press (Esc) .  

@50[Help Index]
.64
Export From Report Detail
The Report Detail Export option is used to send a full translated copy of 
the input file to a spreadsheet.  Background text, including all headers, 
footers, labels, etc., is exported along with the extracted data fields.  
Each field value extracted with the detail template is placed in a separate 
cell in the worksheet.  Field values from append-templates are ignored and 
simply treated as background text.   

Procedure:
1.  Select Output Export from the Detail menu.  
2.  Enter the first page number you want to export.  
3.  Enter the last page number to export, or 999 to export the whole file.  
4.  Enter or select the name of the output file.  The file name must include 
    a WKS or WK1 extension. If you supply an existing file name you will be 
    prompted to Cancel the export or Replace the existing file.  The report 
    is copied to the file you have specified.  A message box displays the 
    current status of the export.  
5.  When the export is complete, press any key to continue.  If you want to 
    cancel the export before it is complete, press (Esc) .  

@50[Help Index]
.65
Printing from Report View
You may print selected pages from your input file from the detail level of 
Report View.  

Procedure:
1.  Select Output Print from the Detail menu.  
2.  Enter the first page number you want to print.  
3.  Enter the last page number to print, or 999 to print the whole file. 
4.  Enter the margin changes, if any.
      or
    Press [Enter] to continue.  You have the option to change the left and 
    right margins of the printed output.  The report file is sent to the 
    printer.  

@50[Help Index]
.66
Help Index (Continued)
@54[Page-header]                       @34[Summary Select Type]                         
@30[Print]                             @28[Summary View]                    
@8[Quit]                              @3[Table]            
@2[Report]                            @51[Templates]                                   
@12[Reset Template]                    @10[Trap]                                 
@9[Sample Lines]                      @53[Trapping Addresses]                    
@4[Summary]                           @59[dBASE III]                           
@27[Summary Define]                    @60[Fixed length ASCII]                           
@35[Summary Field Selection]           @62[Delimited ASCII]                                        
@37[Summary Key List]                  @48[Verify]                                   
@36[Summary Key Value Options]         @19[Zoom]                                   
@31[Summary Reset]                                          

.67
More Criteria Functions

LTRIM(field) removes all blanks at the beginning of a character string.

MONTH(field) returns the month of a date expression.  

RIGHT(field,n) returns the n rightmost characters of a character string. 

RTRIM(field) removes trailing blanks from a character string.

ROUND(field,n) rounds the numeric field to n decimal places.

SUBSTR(field,position,n) extracts n characters starting at position 
   indicated from character string.  For example, to get all zip codes 
   beginning with 100, use SUBSTR(ZIP,1,3)="100".

TODAY() returns the current system date.  To find all invoices that are
   more than 30 days old, use TODAY()-SHIPDATE>30.

YEAR(field) returns the 4-digit year portion of a date.  To find all
   1990 transactions, use YEAR(SDATE)=1990.
   
@50[Help Index] 
.End
