You are on page 1of 326

Copyright 1998 ACL Services Ltd.

All rights reserved

No part of this manual may be reproduced or transmitted in any form by any means, electronic or
mechanical, including photocopying and recording, information storage, retrieval, or transmission,
without permission in writing from the publisher, except by a reviewer who may quote brief passages
in a review.
This manual may contain dated information. Use of these materials is based on the understanding
that this manual may not contain all the information, or the most current information relevant to
situation or intended application. Support and update services are available from ACL, by separate
written agreement.

Published August 1998 by:


ACL Services Ltd
575 Richards Street
Vancouver, BC
Canada V6B 2Z5

Telephone:
Fax:
E-mail:
Web:

+1-604-669-4225
+1-604-669-3562
info@acl.com
www.acl.com

Printed in Canada 10 9 8 7 6 5 4 3 2 1
ISBN 0-9681454-7-7

ACL and Audit Command Language are registered trademarks of ACL, or one of its subsidiaries
or licensors. Other brands or products referenced in the software, or associated with it, are the
trademarks or registered trademarks of their respective holders, and should be treated as such.
Use of a term in this manual should not be regarded as affecting the validity of any trademark or
service mark.

Using the ACL User Guide


This User Guide explains the basics steps for using ACL for Windows. The
companion manual, ACL for Windows Reference Manual, provides
comprehensive reference and detailed information on ACL commands
and their use.

Getting Started
Based on your skills and level of experience with computers, you can use
the tables that follow as a guide to get started using ACL.
Legend of Skill Levels:
Advanced
Intermediate
Beginner
All Users

User Guide:
Installing ACL

Here, you learn how to install ACL.

Chapter 1, Quick
Start

This chapter introduces the essentials of ACL. It


may be all an experienced user needs to get up
and running.

Chapter 2,
Understanding the
Basics

Introduces the basics of using windows, the


mouse and some practical aspects of working
with ACL.

Chapter 3,
Key Concepts

You learn the basic concepts behind how ACL


works.

Chapter 4, Defining Shows you how to define data files through the
Files and Fields
use of documents and input file definitions. For
reference purposes, a description of the data
types ACL supports is also provided.
Chapter 5, Working Focuses on the four main windows in which you
with ACL
will work, as well as how to produce reports and
export data that can be used by other software
programs.
Chapter 6,
Building
Expressions

Introduces you to the expression builder and its


components, such as variables and filters.

Chapter 7,
Customizing ACL

Describes options you can use to set up ACL to


suit your needs or level of experience.

Chapter 8,
Advanced
Techniques

Shows you how command mode, batches and


groups can provide alternative ways of
processing data.

Symbols and Conventions


To help you use it more efficiently, the information presented in this
guide has been standardized.

Symbols Used in This Manual


Represents a key that performs a specific function. For
example,
represents the key labeled Enter or Return
on your keyboard.
[Button]

Represents a button in a dialog box that performs a


specific function. For example, [OK] represents the
button labeled OK.

Represents a button that performs a specific function or


command.
For clarity and brevity, buttons are referred to
throughout the manual by their icons. For example,
represents the Extract command.

Text Formatting Conventions


Italics

Emphasizes terms and denotes variables in command


mode syntax.

bold face

Indicates menu choices, checkboxes and buttons, and


ACL products.

Monospace Denotes command syntax that you can use in a batch


window or text box.
Brackets < > In command mode syntax, angle brackets indicate that
the entry within the brackets is optional.
Braces { }

In command mode syntax, braces indicate a set of


choices from which only one must be chosen (choices
are separated by a vertical bar |).

Bar |

In command mode syntax, a vertical bar indicates that a


choice between options must be made (usually
associated with braces { }).

Dots...

In command mode syntax, leader dots indicate that the


preceding item may be repeated.

Use of Numbers and Bullets


1.

Numbered lists indicate a series of steps required to complete a task.

Bullets highlight a list of points in which sequence is not important.

Contacting ACL
For assistance in using ACL, please refer to these resources:

ACL for Windows Reference Manual


Online Help
Your companys internal ACL technical support center, if available.

If you still can't find the solution to your problem and you are a supported
user, you can contact ACL Technical Support at
+1-604-669-4997 (fax: +1-604-669-3562), or your local representative.
If you have access to the internet, point your browser to www.acl.com and
click the Online Technical Support button to fill in the Online Technical
Support Request Form. You can also send e-mail to support@acl.com.
When contacting ACL concerning problems, be sure to have the
following information on hand:

your ACL serial number (select Help from the menu bar and choose
About ACL)

the type of hardware you are using, and whether it is connected to a


Local Area Network (LAN)

a description of what happened, and what you were doing when the
problem occurred

the error message, if any, displayed by ACL

The ACL Sales department, can be reached at


+1-604-669-4225 (fax: +1-604-669-3562).

Installing ACL for Windows Version 6

Your ACL for Windows Version 6 is supplied on either a CD-ROM or


disks. You can install a stand-alone version of ACL on a single personal
computer, or, if you have purchased a network version, on a Local Area
Network (LAN).
To install a stand-alone version of ACL for Windows, follow the
installation procedure Installing ACL for Windows Version 6 below.
To install a network version of ACL for Windows, see the ACL for
Windows Network Installation Guide.
When you use ACL for Windows Version 6 to open a document in an
earlier version of ACL, ACL converts the document to Version 6 format.
After you have converted a document to Version 6, do not use an earlier
version of ACL to open that document as an earlier version of ACL may
not work with the converted documents.
When converted, an older version of the ACL document is archived as
filename.OLD. If you need to access the old document, rename it, for
example, to file5.ACL, and use your earlier version of ACL to open the
document.

Installing ACL on a Personal Computer


To install the program, first ensure your computer meets the system
requirements below, then follow the installation procedures.
Note:

You must have administrator rights to install ACL on a machine


running Windows NT.

System Requirements
ACL for Windows Version 6 requires the following:

IBM 486 or higher personal computer (or 100 percent compatible)

Windows 95 or Windows NT 4.0 or higher

eight megabytes of RAM minimum (16 megabytes is recommended)

hard disk drive with at least seven megabytes of free space for storing
the ACL program and all related files (significantly more disk space is
recommended for storing your working files).

Preparing to Install ACL on a Personal Computer


Plug the ACL hardware key into the parallel port of your PC. If you have
a configured printer connected to the parallel port, plug the printer cord
into the key.
Before you start the installation process, make sure you have the serial
number that came with your copy of ACL for Windows Version 6. You
will be prompted to enter this serial number during the installation
process.
You need to decide which type of installation you want: Typical, Custom
or Workstation.

Typical
The Typical option is best for most people. The Typical installation
installs all the necessary files and options on your computers hard disk.
Select the Typical option unless you have specific reasons to choose
another option.
If there is an existing ODBC in your computers Control Panel, the
installation program will inform you. Installation will continue without
replacing ODBC on your computer.

Custom
The Custom option is for advanced users who want to install only specific
components. If you select the Custom option, ACL displays an additional
dialog box for you to select the components you want.
Note:

If you select the Custom or Workstation option, you can choose


whether you want to install ODBC. If you choose to install ODBC and
you already have ODBC in your computers Control Panel, then the
installation program does the following:

If the version of ODBC in your Control Panel is the same or older,


the installation program replaces it.

If the version of ODBC in your Control Panel is newer, the


installation program informs you and continues without replacing
your ODBC.

Workstation
The Workstation option is for people whose company has already
installed a stand-alone version of ACL on the network server. There must
be a copy of ACL on the network before you can use this option. The
Workstation option will install the icons and drivers to let you run ACL
from the network. If you choose to install ODBC, it will install the
required ODBC files on your hard disk.

Installing ACL on a Personal Computer


To install ACL for Windows Version 6, do the following:
1.

Close all Windows programs.

2.

To install from a CD: insert the CD into the CD-ROM drive and
follow the prompts for the type of installation you wish to perform.

3.

To install from a diskette: insert Disk 1 in drive A or B

Click [Start] and choose Run from the pop-up menu.

In the Command Line text box, type one of the following:

a:setup if you inserted Disk 1 in drive A

b:setup if you inserted Disk 1 in drive B

4.

Click [OK] to start the installation process.

5.

The installation program informs you of the progress and prompts


for required information. Follow the instructions to complete the
installation.

Quick Start Chapter 1


Getting Started with ACL For Windows
This chapter is designed for current, experienced ACL for Windows users
who want to get started with Version 6 quickly. Quick Start shows you
how to create a document, link a data file and create an input file
definition. Working with a view of the data, you build an expression,
apply a global filter, issue commands and create a report. Your quick tour
ends with an introduction to the Command Log window.
If you are an ACL for DOS user, have Windows experience, and are
converting to ACL for Windows, you may find that this section is all you
need to get started using ACL for Windows Version 6.
If you are an advanced computer user who is familiar with Windows and
data analysis, you may also find this section is all you need to get started
using ACL for Windows. However, we recommend that you at least review
some of the other introductory chapters.
ACL for DOS Users

If you are converting to ACL for Windows from ACL for DOS, and want to
use your existing files, batches and reports in ACL for Windows, do the
following:
1.

Convert the files using the ACL Utilities program.


For more information: See Converting from DOS on page 5-1
in the ACL for Windows Reference Manual for complete details.
Depending on the files converted, this step results in an ACL
document containing one or more input files, batches and possibly
views (reports).

2.

Select File from the menu bar and choose Open Document. ACL
displays a dialog box with options for locating your converted
document.

3.

Click the name of the converted document and click [Open]. ACL
opens the document.

1-1

Chapter 1

Quick Start
4.

If the Overview window is not open, select Window from the menu
bar and choose Open Overview.

5.

In the Overview window, click the (Expand) button beside Input


File Definitions to expand the input file list.

6.

Double click the input file name. ACL opens the input file and
displays the default view, ready for processing.

This is the procedure you follow once you are using ACL regularly.
New Users

New users of ACL for Windows can learn all the features of ACL with stepby-step procedures provided in the ACL for Windows Workbook.

Experienced ACL Users

The next section walks you through the creation of a new document, how
to link a data file to the document and how to create an input file
definition for the data file. To complete the section, you will use some of
the sample files supplied with ACL.

Start Up ACL

If you have not already done so, start ACL. The ACL graphical user
interface (GUI) appears. It has many standard Windows features, such as
the menu bar, button bar and status bar.
menu bar
button bar
status bar

Create a Document

The status bar indicates that there is no document open and no input file
in use. Before you can work with data in ACL, you must open or create a
document. An ACL document links related items of information, such as
data files, input file definitions, views and batches.
To create a document and open a data file, do the following:
1.

Select File from the menu bar and choose New Document. ACL
displays a dialog box you can use to name the document you are
creating and specify the directory in which you want it saved.

2.

Name your document TestCase and click [Save] to proceed.


ACL automatically assigns all documents the default extension, ACL.
You can see the new name, TestCase.ACL, in the status bar.

1-2

Chapter 1

Quick Start

Locate the Data File

3.

ACL displays the Select Input File Definition dialog box. Click
[New] to continue.

4.

ACL displays the Data Source dialog box with three choices: Disk,
Tape, or ODBC. Disk is selected by default. Click [OK] to continue.

5.

ACL displays the Locate Data File dialog box. Use it to find the data
file, Invent.FIL, in the DATA directory, which is located inside the
ACL directory (or the directory where you installed ACL).
ACL never changes data files. Only the view of the data is changed.

Note:

6.

Data files created by ACL are given the default extension FIL,
but input files created using other software packages may have
different extensions (such as DBF for dBASE files), or none at all.
Select the Invent.FIL file and click [Open].

ACL automatically analyzes the file and displays the results in the Input
File Definition window.

directory path
to input file
edit
fields/expressions

ruler
data

click to scroll

To work with the data in a data file, you create an input file definition.
You format the input file definition to suit the work you want to do with
the data. When you create an input file definition, you define fields by
giving them names and determining what kind of data they contain, such
as ASCII, numeric, date, or other types. Each input file definition is
named, saved, and can be retrieved.

1-3

Chapter 1

Quick Start
ACL links a data file to a document through an input file definition.
Because of the link between the data file and the input file definition, the
term input file is often used to refer to both.
An input file definition for a data file needs to be created only once.
Thereafter, the data file is linked automatically when you open the input
file definition.
Notice that the document status bar displays the name of the open
document in the left corner and reports the number of records in the
center. The directory path and name of the data file currently being
defined is displayed just under the title bar in the Input File Definition
window.
The top part of the window reports the results of ACLs analysis of the
data file. Although this is usually correct, you should verify this
information before proceeding further. In particular, note the File Type,
Character Type, and Record Length.
The next step is to create the input file definition and define the data fields
for that file.
To create an input file definition, click the [Edit fields/expressions] tab
just below the input file title bar to display the Input File Definition
window.

Create an Input File


Definition

fields/expressions
list box

fields/filters
dropdown

accept entry
clear entry
edit field note
delete fields
add a new
data field
add a new
expression

field
area

ruler
data
area

1-4

Chapter 1

Quick Start

The Input File Definition window allows you to create field names for the
fields of the data with which you are working.
The top part of the Input File Definition window shows the fields that
have been defined. The bottom part of the Input File Definition window
displays the actual data in the file. Each row represents one record. The
ruler, located just above the data, marks the byte positions in each record.
The scroll bars on the right and bottom edges of the dialog box allow you
to scroll horizontally and vertically through the records. If the record
length is correct, and it usually is, the data is vertically aligned.
Define the Data

Click on
(Add a new data field). ACL changes the top of the Input
File Definition window to show the field formats.

Use the Input File Definition window to define each of the fields in the
file. ACL gives you the flexibility to define one or all of the fields, and even
allows you to define overlapping fields.
To define the Product Number, Product Description, Cost, Sale Price,
and Product Class fields to use in our example, do the following:
1.

To highlight the Product Number field, use the ruler to identify


column 1 of record 1. Click and drag the mouse from column 1 of
record 1 to column 10. ACL displays the Start and Length of the field
as you drag.
The suggested field type is displayed in the Type text box. You can
select a different field type from the Type dropdown or the Valid

1-5

Chapter 1

Quick Start
Field Type list box. ACL displays data types in descending order of
likelihood, with their corresponding value shown to the right. For
this field, the data type should be ASCII.
2.

In the Name text box where the blinking cursor is positioned, type
PRODNO.

3.

Click the

4.

To highlight the Product Description field, click in column 11 of


record 1 and drag the mouse to column 34, or until the Len box
shows a field length of 24.

5.

In the Name text box type PRODDESC and then click


the field type (ASCII) displayed in the Type text box.

6.

Click in column 35 of record 1 and drag to column 40, or until the


Len box shows a field length of 6. Name this field COST.

7.

Because COST is a numeric field, double click NUMERIC in the


Valid Field Type list box or choose NUMERIC from the Type
dropdown.

8.

Specify the number of decimal places by typing 2 in the Dec text box.
Click
to accept the field definition.

9.

Click in column 41 of record 1 and drag to column 46, or until the


Len box shows a field length of 6. Name this field SALEPR.

Accept entry

(Accept entry) button to accept the field definition.

to accept

10. Double click NUMERIC in the Valid Field Type list box, and type 2
in the Dec text box. Click
to accept the field definition.

1-6

Quick Start

Chapter 1
11. We will define one overlapping field for our report later on. Click in
column 1 and drag to column 2. Name this field PRODCLS and click
to accept the field definition.
12. ACL lists each field as you accept the field definition, and you can
now see all five fields.

13. When you are finished defining and formatting fields, you can close
the Input File Definition window (as you would any ACL window)
by clicking the
in the top right corner of the Input File Definition
window.
ACL displays a dialog box with options for naming the input file
definition.

14. Accept the input file definition name, Invent, and click [OK].

1-7

Chapter 1

Quick Start
The View window appears showing the data arranged in the fields you
defined.

View the Data

column heading

add columns
modify columns
delete columns
change font
data in the file
rows represent records

columns represent fields

click to scroll

The view you see now in the View window is called the Default View
because it shows the data in fields just as you defined them. From the
View window you can rearrange the fields for different views, and you can
name and save each view you create.
The View window displays the data in the file in a familiar spreadsheet
format. Each column represents a field that has been defined in the file
and each row is a record. The scroll bars on the right and bottom sides of
the view allow you to scroll through the data.
Note:

Format the View

1-8

You are not limited to the spreadsheets appearance. You can


format the data to any way you want it to look, but you cannot
change the data itself.
To format the view, do any of the following:

rearrange the columns in the view by clicking one of the column


headings and dragging it to a new location

change the column width, by dragging the vertical line on the right
hand side of a column heading to a new position

add columns (such as data fields or expressions) to the view by


clicking the
(Add columns) button

delete a column by selecting it and clicking the


button

(Delete columns)

Chapter 1

Quick Start
Note:

Deleting a column does not delete the associated field. It is still


available for use in this, or any other, view.
Enhance the presentation by clicking the
(Modify column)
button to change column headings, the display format of numeric
and date fields, and otherwise format the columns.
For example, to change the column title of SALEPR, select that
column and click the
(Modify column) button. Type the new
name in the Alternate Column Title box.

Change the font by clicking the


(Change font) button. Double
click the button for the area you want to change and select the font
and style.

There are many uses for expressions in ACL. For example, computed
fields are a type of expression that allow you to create virtual fields that do
not exist in the input file, but can be shown in a view, based on the data in
the file. The expression builder is used to create or edit expressions in
ACL. To display the expression builder, do the following:

Add an Expression

1.

Click the
(Add columns) button in the View window. The Add
Columns dialog box appears.

2.

In the Add Columns dialog box, click [Expr].


The expression builder window appears.

expression
text box
name
text box

fields list box

input file
dropdown
operators

Build an Expression

To build an expression, you can either type it directly in the Expression


text box, or formulate it by clicking operators and selecting items from
list boxes. Choose from valid fields, variables, functions, and filters.

1-9

Chapter 1

Quick Start
When you double click an item, ACL copies it into the Expression text
box.
For example, you can make a PROFIT field by doing the following:
1.

In the Available Fields list box, double click SALEPR. SALEPR is


copied to the Expression text box.

2.

In the operators area of the expression builder, click


The minus sign is copied into the Expression text box.

3.

In the Available Fields list box, double click Click COST. COST is
copied to the Expression text box. The completed expression looks
like this:

(Minus).

SALEPR - COST
4.

To save this expression, type PROFIT in the Save As text box.

5.

To add the PROFIT field to the View window, click [OK] in the
expression builder to return to the Add Columns dialog box.

6.

The Add Columns dialog box shows the PROFIT field in the Selected
Fields list box. Click [OK] to add this field into your view.

The Profit column appears as the rightmost column in the view.


Issue Commands

To process and analyze a data file using ACL, you issue commands. A
command instructs ACL to do a specific task. Many of the commands
that appear on the menus have a corresponding button for quick access.
For example, to obtain statistics about a numeric field, do the following:
1.

Click the

(Statistics) button in the button bar.

ACL displays the Statistics dialog box.

statistics on
list box

if text box

1 - 10

Chapter 1

Quick Start

Statistics is a basic command dialog box. The Statistics On list box


displays the numeric fields you defined. To get statistics on the PROFIT
field, do the following:

Create a Local Filter

2.

Click PROFIT in the Statistics On list box.

3.

Click [If] to open the expression builder to create a filter for the
command.

4.

Type PROFIT>COST in the Expression text box and click [OK] to


close the expression builder. This time you wont name and save the
expression.
This indicates that we only want statistics on some of the records, in
this case, the ones where the profit exceeds the cost.

5.

Click [OK] in the Statistics dialog box to execute the command.


The Status of Task dialog box may appear while the command is
executing in order to report on processing. If a command executes
quickly, the dialog box appears very briefly or not at all.

The Command Log window displays the results of the Statistics


command.

View the Command


Results

command mode syntax

results

Use the scroll bars to view all the information.


At the top of the window you can see an @ symbol followed by a line of
text. This is the command mode syntax for the command you issued.
You do not have to worry too much about learning or understanding
command mode syntax. Apart from being able to recognize your
command in this window and in the log, you do not have to deal with it
unless you decide to work in command mode.
The results of this command indicate that of the 227 records, 17 records
have profit greater than the cost, that is, the selling price is more than
twice the cost. The results also show that the highest unit profit was

1 - 11

Chapter 1

Quick Start
$30.11, the lowest $0.56, and the total profit from the 17 items found was
$136.79.
To minimize any window click

Use an Output File

in the top right corner of the window.

If a command creates a data file as output, you have the option to use the
created file as your input file. As an example, use the Extract command to
create an input file with its output:
1.

Click the

(Extract) button in the button bar.

You must click a radiobutton to select your extraction criteria. ACL


only allows you to access the options applicable to your choices.

radiobuttons

extract fields
list box

create output
file text box

2.

1 - 12

In the If text box, type PROFIT>COST.

Chapter 1

Quick Start
3.

Type GROSS for the output file in the To text box. If you forget to
provide a name, ACL prompts you to enter one.

radiobutton

extract fields
list box

create output
file text box

4.

Click [OK] to continue.


In the Extract dialog box, because the Use Output File checkbox is
(turned on), ACL automatically closes the INVENT input file
and opens the new file named GROSS so you can begin to use it right
away.

5.

Because the view has been changed, ACL prompts you to name the
new view. If you name the new view, the default view will remain as
it was originally formatted.

6.

Click [OK] to save the new view using the old name, or type a new
name in the text box.

1 - 13

Chapter 1

Quick Start
The Default View of the newly created file is displayed. The status bar
shows that you are still working in the same document, but are now using
a different input file.
input file
name
# of records
in this file
document name
filter text
box

Set a Global Filter

You may want to examine or report on only those records that meet a
certain test. For example, you may only want to analyze records with a
value over a specified amount or belonging to a specific department or
product class. This is easily done using a global filter.
Because you applied a local filter before doing your extract, the view
currently displays all those records in the Invent file for which the virtual
field, PROFIT, is greater than COST.
To apply a global filter that will find records in the PROFIT field that are
under 10.00, proceed as follows.
Type PROFIT<10 in the quick filter text box and press
or click the
(Set filter) button. The filter is immediately applied. The global filter
searches for the specified records:

1 - 14

Chapter 1

Quick Start

quick filter
text box

go to next
unfiltered record

edit view filter

filtered records
are hidden

Those records that do not meet the condition specified by the filter are
hidden. If the Hide Filtered Records preference is turned off, the filtered
records appear in reverse video. The center window on the status bar
indicates the name of the global filter that has been applied.
A filter specified this way is not saved for future use. To save the filter, you
must specify a name in the expression builder dialog box. A filter is
another type of expression.
To save the filter condition and name it for future use, do the following:
1.

Click the
(Edit view filter) button. ACL displays the expression
builder dialog box. The global filter you created is in the Expression
text box.

2.

Replace <10 with >15 in the Expression text box.

3.

Type HIPROFITS in the Save As text box and click [OK].

You can only have one global filter in effect at a time, so the HIPROFITS
filter replaces PROFIT<10 in the view text box. Some of the records in
the view will not appear because they are hidden.
Customize Preference
Settings

ACL provides many customizable options, allowing you to modify its


operation to meet your own needs and preferences. For example, you can
specify that filtered records be displayed differently when you apply a
filter.
To show filtered records, do the following:
1.

Select Edit from the menu bar and choose Preferences. ACL displays
the Edit ACL preferences dialog box.

1 - 15

Chapter 1

Quick Start
2.

Click the [View Options] tab at the top of the Edit ACL preferences
dialog box to display View preferences.

view options
hide filtered
records

3.

To turn off the Hide Filtered Records preference, uncheck the Hide
Filtered Records checkbox.

4.

To make the preference settings effective for the current session only,
click [OK]. To make the settings permanent, click [Save], then click
[OK].
The preference settings are immediately updated. When you return
to the view, filtered records are displayed in reverse video.

5.

go to next
unfiltered record

remove filter

set filter
filtered records
display in
reverse video

1 - 16

To find the first record that meets the HIPROFITS condition, click
the
(Go to next unfiltered record) button.

Chapter 1

Quick Start
To remove a global filter:

Remove a Filter

click the

(Remove filter) button

You can use the Overview window to quickly find out what formats the
document includes.

Display the Overview


Window

Click the

(Overview) button in the button bar.

click to collapse
open
click to expand
duplicate
delete
rename

export to
DOS file

The Overview window displays the batches, input file definitions, views,
workspaces, and indexes included in your document.
To expand the list of batches
workspaces
, and indexes
appropriate icon.

, input file definitions


, views ,
in your document, click
beside the

To collapse the list, click . Icons for the currently open input file
definition and view are shown as complete, filled-in icons. Unopened
items are displayed as empty icons. The item you select is highlighted.
To open any of the views, input file definitions, workspaces, or indexes,
simply double click its icon or name, or drag and drop it on the
application workspace. Batches can be run or edited in the same way.
The buttons in the sidebar of the Overview window provide quick
shortcuts to construct new items or perform commands such as Open
, Close
, Duplicate
, Delete
, Rename
and so on, on
existing items. The Overview window is the easiest way to maintain all the
items in your document.
To open the Default View for the Invent input file definition:
1.

Click Default View in the list under Invent input file definition.

1 - 17

Chapter 1

Quick Start
2.

Produce a Report

Drag and drop it on the application workspace. ACL closes the


GROSS input file, and opens Default View.

You can print a report of the analysis in the Default View.


To print a quick listing:

Click the
(Print the active window) button in the button bar.
Then click [Print] to print all the records in the Default View.

You can also format your report. There are three steps to creating a
report:
1.

Specify key columns to produce subtotals. You specify key columns


by moving them to the left side of the view.

2.

Format the columns in the view the way you want them to appear on
the report by rearranging the columns, changing the width, and
giving the columns more suitable names.

3.

Change the sort order of the records.

To move the PRODCLS column to the left side of the view:

Click in the header of the PRODCLS field and drag and drop it to the
leftmost column.

To change the width of the PRODCLS column, change the sort order of
the records, and give the column a more suitable name:
1.

1 - 18

Click the PRODCLS column heading to select the column.

Chapter 1

Quick Start
2.

Double click the PRODCLS heading. ACL displays the Modify


Column dialog box.

field name
sort options

column name

break
column
options

column width

3.

In the Alternate Column Title text box, type Product, press


to
go to the next line, and then type Class. The alternate title will
appear in the printed report.

4.

Check the Sort Key Column checkbox to designate the PRODCLS


column a sort key column.

5.

Click the Sort Descending radiobutton to specify descending order.

6.

Click the Break Column checkbox.

7.

Click the Page Break checkbox to insert a page break each time a
subtotal is produced.

8.

Click the Suppress Duplicates checkbox to suppress the duplicates


in the Product Class column. ACL will only print the first Product
Class and not print the duplicate product class numbers all down the
column.

9.

When you are finished, click [OK].

Next, create a header and a footer for your report.


To add a header and footer:
1.

Click the

(Report) button. ACL displays the Report dialog box.

1 - 19

Chapter 1

Quick Start
2.

Enter a Header and Footer in the text boxes.


specify
output

printer setup

presort checkbox

print
preview

View the Log File

3.

Check the Presort checkbox to have ACL sort the Product Class
column in your report.

4.

Click the [Output] tab to specify that you want your report output to
a printer, screen or file.

5.

Click [Preview] to preview the look of your report.

6.

Click [Zoom In] to verify that ACL has indeed sorted the Product
Number column.

7.

When everything is set up the way you want, click [Print] to print
your report.

Every command you run in ACL, from the time you open a document
until you end the session, is automatically recorded in a log file called the
command log.
To view the command log:

1 - 20

Click the
(Command Log) button in the button bar. The
Command Log window opens.

Chapter 1

Quick Start

dropdown

command log
text box

command
result

The commands you have issued and their results are recorded in the
command log. Use the scroll bars to view the beginning of the file. ACL
time and date stamps the log when it is opened.
Use the dropdown in the top left corner of the window to change your
view of the log. You can choose to display only commands, only results,
only the last result or both commands and results.
Command Mode

You can also issue commands in command mode in the command log.
To issue a command in command mode:

Type Statistics on PROFIT in the command log text box


and click
. The results appear in the window.

Congratulations!
Youve successfully completed the ACL Quick Start section. For a more
comprehensive tutorial, refer to the ACL for Windows Workbook. For a
more in-depth look at ACL, this User Guide provides details on all its
features and functions.
Help Available

If you are a supported user, contact our Technical Support team when
you need help.

For more information: See Contacting ACL on page 4 in the ACL


for Windows User Guide for a list of resources.

Enjoy exploring and using ACL for Windows!

1 - 21

Understanding the Basics Chapter 2


This chapter describes the ACL application screen, and how to display
and arrange ACL windows and dialog boxes. It also provides an overview
of the different types of dialog boxes you will use, and discusses how to
enter notes, edit text and print in ACL. The last part of this chapter deals
with obtaining online help and how to save your work before quitting
ACL.

Before You Begin Using ACL


Before you start this chapter, make sure you have installed ACL as
described in Installing ACL for Windows Version 6 on page 5.
Note:

When you use ACL for Windows Version 6 to open a Version 5 ACL
document, ACL converts the document to Version 6 format to make
use of all the new and powerful features in Version 6. After you have
converted a document to Version 6, do not use Version 5 to open
that document again as Version 5 may not work with Version 6
documents.
The old Version 5 ACL document is archived as filename.OLD. If you
need to access the Version 5 document, rename the Version 5 document,
for example, to file5.ACL, and use ACL for Windows Version 5 to open the
document.

Using the Mouse


Most of the work you do in ACL requires the use of a mouse, so you must
be familiar with these basic operations:

Point refers to moving the mouse so that the pointer is positioned


over an item.

Click refers to quickly pressing and releasing the mouse button.

Note:

Throughout this manual, references to the mouse button refers


to the left mouse button.

2-1

Chapter 2

Understanding the Basics

Double click refers to the process of quickly pressing and releasing


the mouse button twice in succession.

Drag refers to the process of holding down the mouse button as you
move the pointer.

Select or Choose refers to the process of picking an item from a menu


or list. To select an item from a list, point to it, click once to highlight
it, and then click [OK]. You can also point to the item and double
click it.
To choose more than one item from a list, do one of the following:

If the items you want to select are all next to each other in the list,
point to the first item and click. Point to the last item you want to
select, hold down Shift and click once. All items between the
first and last, inclusive, are selected.

If the items you want to select are interspersed throughout a list,


point to the first item and click. Hold down Ctrl and click once
on each subsequent item you want to include. To deselect an
item, click it one more time.

Using the Keyboard


When referring to the keyboard, this manual uses the following
conventions:

2-2

Backspace

Deletes the character to the left of the cursor.

Delete

Deletes the character to the right of the insertion


point, or deletes a highlighted block of text. You
can immediately recover deleted information with
the Undo command in the Edit menu. This
command reverses the last operation you
performed.

Insert

In the View window, you can either click the


(Add columns) button or press Insert to pop up
the Add Columns dialog box.

Home

Moves the cursor to the start of the line.

End

Moves the cursor to the end of the line.

F1

Accesses online help.

Chapter 2

Understanding the Basics

Creates a line break and moves the cursor to the


next line. This key may be labeled either Enter or
Return on your keyboard.
Moves the cursor one character to the right.
Moves the cursor one character to the left.
Moves the cursor up one line.
Moves the cursor down one line.

File Naming Conventions


File Names

ACL allows up to 31 characters for naming an input file definition, field,


output file, view, batch, or index. This allows you to use meaningful
names that you can easily recognize. Spaces are not allowed, and any
encountered are replaced by the underscore character. Any file names
over 31 characters long are truncated.

File Extensions

Using established file naming conventions helps to organize files in a


systematic and understandable manner:
Type of File

Standard File
Extension

Document Files

ACL extension

Output Data
Files

FIL extension

Log Files

LOG extension

Index Files

INX extension

Standard File Extensions: ACL automatically appends standard file


extensions to your new documents, output data files, log files and
indexes, or you can specify your own. ACL expects that all ACL files of a
certain type have their corresponding standard extension. For example,
when you open a document, ACL displays a list of files with the ACL

2-3

Chapter 2

Understanding the Basics


extension, allowing you to select a document from the list without having
to remember its file name or extension.
Other File Extensions: You can use non-standard file extensions when
you name documents and files. However, whenever you want to access
these files, you must select All Files (*.*) from the Files of type dropdown.
The default will only display files with standard ACL extensions.
Do not use the following file names and extensions, which designate ACL
system files:
ACLWIN.EXE

Contains the executable ACL programs and


routines.

ACLUTL32.EXE

Contains the executable ACL conversion


programs and routines.

ACLODB32.EXE

Contains the executable ACL programs and


routines for using ODBC compliant databases.

ACLWIN6.PRF

Contains the Version 6 ACL preference settings.

ACLWIN.HNX

Contains the index for the ACL.HLP file and


supports the context-sensitive HELP function.

ACLHELP.HLP

Contains the ACL Help.

Starting ACL
If your copy of ACL was shipped with a hardware key, insert the key into
the parallel port on the back of your personal computer. If you have a
printer attached to your computer, insert the printer cable into the back
of the hardware key.
Double click the
(ACL) icon in the ACL for Windows program group.
ACL displays the ACL application screen.

2-4

Chapter 2

Understanding the Basics

ACL Application Screen


The ACL application screen consists of the ACL title bar, followed by a
menu bar, button bar and status bar. The rest of the screen is the
application workspace or working area and is initially blank until you
start working with data.
menu bar
button bar
status bar
application
workspace

ACL Menus

The menu bar lists ACL menu choices. Each menu choice contains a
dropdown menu of ACL commands and options.
Each option or command performs a specific task within ACL. For
example, selecting File from the menu bar and choosing New Document
displays a dialog box that allows you to create a document. Selecting
Analyze from the menu bar and choosing Total displays a dialog box for
totaling one or more specified fields.
There are eight ACL menus:
File

Lists options for managing documents and log files, as


well as quitting ACL. It also displays the last eight
documents that you opened.

Edit

Lists options for editing the various components of the


ACL document, including preference settings.

Data

Lists ACL commands that create data as output.

Analyze

Lists ACL commands that produce information as


output.

Sampling

Lists options for sampling data.

Tools

Lists miscellaneous ACL commands, including batch


commands and customizing the toolbar.

2-5

Chapter 2

Understanding the Basics


Window

Lists options for arranging, opening, and displaying


windows as well as setting fonts for each window.

Help

Lists options for displaying the ACL Help, Contacting


ACL, and About ACL windows.

The menus on the menu bar apply to the current document. Where one
or more menu items do not apply to the active window, the menu item is
grayed out.
Button Bar

The button bar provides quick access to commonly used commands and
menu options. When you start working with ACL, there are a number of
icons displayed on the button bar. The default button bar is displayed
below. If the button bar in your copy of ACL has been customized by a
previous user, it may not appear exactly as shown:

Each icon is linked to an option on an ACL menu and represents a


specific task you can perform. If you have the Show Tooltips preference
turned on (in the Interface Options of the Preferences in the Edit Menu),
ACL displays a yellow tooltip explaining the function of a button when
you place the cursor arrow on that button.
When you click an icon in the button bar, ACL performs the same action
as if the corresponding menu option or command had been selected.
The button bar automatically wraps to the next line when there is not
enough room to display all the buttons on one line. When you resize the
window, the buttons in the button bar automatically wrap to fit within the
window. This allows you to customize the button bar and put all your
favorite commands into the button bar to increase your auditing
efficiency.

For more information: For a description of what each of the buttons


in the default button bar does, see Default Button Bar on page 20 in the
ACL for Windows User Guide. You can add or delete buttons, and change
the order of buttons appearing in the button bar to suit your needs. Click
(Customize button bar) or see Setting Up the Button Bar on page
19 in the ACL for Windows User Guide for details.

2-6

Chapter 2

Understanding the Basics


Status Bar

The ACL status bar displays the name of the document you are currently
using, the name of the currently open input file, and the number of
records in that file.

click to open
a document

name of the
currently open document
or running batch

click to apply
a global filter

click to select
an input file

The Status bar provides the following shortcuts:

To display the Locate Document File dialog box, click the left hand
box in the status bar.

To set a global filter, click the middle box.

To select an input file, click the right hand box.

When running batches, the name of the batch currently running replaces
the name of the current document, in the left hand window of the status
bar.

2-7

Chapter 2

Understanding the Basics

Working with ACL Windows


ACL uses windows when processing commands and for selecting,
editing, and displaying information. These windows conform to the
Windows standard. Windows appear in the working area of the ACL
application screen.

click to minimize
the window

click to maximize
the window

click to
close
window

title bar

horizontal scroll bar

vertical
scroll bar

click to scroll

The title bar at the top of each window identifies the contents. Some title
bars have one or two additional functions for controlling the window.
Some windows have scroll bars that you can use to browse up and down
through lists, or view information to the right or left.
You can open, close, and minimize, or maximize all ACL windows. In
addition, you can also change window position and size. ACL opens
windows to the display settings you specified the last time you accessed
the window and remembers the settings from session to session for each
document.
When you resize a window, the buttons rearrange to fit in the space
available.

2-8

Chapter 2

Understanding the Basics

For example, if the window becomes too short for buttons to display in
one column, ACL adjusts the buttons into additional columns as
required.

button column wraps


to fit in the window

You can display many different windows at once, but you can only work
in one window at a time. The window or dialog box with which you are
currently working is called the active window or dialog box and will have
the title bar highlighted. A non-active window will have the title bar
grayed out.

Displaying and Arranging Windows


Use the following techniques to display and arrange ACL windows. ACL
remembers a windows size, position, and font from session to session.

To Change the Size of a Window:

Place the pointer over a window border or corner until the pointer
changes to a double headed arrow. Click and drag the mouse until
the window is the size you want.

Click the
(Maximize) button on the right end of the title
bar to enlarge the window to fill the entire screen.

Click the
(Minimize) button on the right end of the title
bar to minimize the window.

To Open a Window:

click the appropriate button in the button bar, or


select a command or option from a menu

To Move a Window:

click the title bar and drag the window until it is repositioned

2-9

Chapter 2

Understanding the Basics

To Make a Window Active:

Place the mouse arrow anywhere on the window and click the mouse
button. When a window is active, its title bar is highlighted.

To Arrange Windows on Your Screen:

Move and size each window separately, or


Select Window from the menu bar and choose Arrange All. ACL tiles
the open windows. The size of each window varies according to the
number of open windows.

To Close a Window:

click
in the top right corner of the window
double click the icon in the upper left corner of the window
click the icon in the upper left corner of the window to
display the control menu, and choose Close
to close the active window, press Ctrl -w
ensure that the window you intend to close is active, then select
Window from the menu bar and choose Close

For more information: On working with windows, see the


documentation that came with your operating system.

To Change the Font Size in a Window:


The following steps show you how to set the font size for any ACL
window (including batch, variables, notes, Data Definition and Input File
Definition) except the View window.
For more information: To learn how to change the font in the view,
see Changing the Font on page 16 in the ACL for Windows User Guide.

2 - 10

1.

Make the window in which you want to change the font size the
active window.

2.

Select Window from the menu bar and choose Font Size.

3.

Select a font point size from the pop-up menu. ACL changes the font
size in the active window.

Chapter 2

Understanding the Basics

Commonly Used Window Buttons


Some of the buttons you will commonly use in ACL windows are
summarized in the following table:
Button

Function

Location

Creates an item

Overview window

Opens an item

Overview window

Closes an item

Overview window

Changes the font

View window

Creates a filter

View window

Creates a report

View window

Modifies columns

View window

Deletes an item

most windows

Accepts entry or applies


changes

most windows

Cancels changes

most windows

Adds notes

most windows

Edits existing notes

most windows

Working with ACL Dialog Boxes


ACL displays dialog boxes in the working area of the ACL application
screen. Dialog boxes display information about the task you are
performing and request information to be entered by the user.

2 - 11

Chapter 2

Understanding the Basics


Although the dialog boxes perform different tasks, they all share some
common features:

A title bar at the top of each dialog box, which identifies the contents.

A list of items in a list box from which you can make a choice.

A number of command tabs and/or option buttons:

[OK]

Performs the command or action and closes the


dialog box.

[Cancel]

Cancels the command or action, disregarding the


selected options or conditions, and closes the dialog
box.

[Done]

Indicates to ACL that you have finished with a


process and closes the dialog box.

[Discard]

Discards work that has not been saved. Use this


option when you make changes to an item and later
decide that you do not want to save the change. ACL
closes the dialog box.

[Help]

Displays context-sensitive help related to the work


you are doing.

[More]

Displays additional command options.

[Output]

Displays command output options.

The command and option buttons are sometimes disabled, depending on


the work you are doing, or whether or not an item from the list box has
been selected. Buttons that are not applicable at the time are grayed out.

To Open a Dialog Box:

click the appropriate button in the button bar


select a command or option from a menu

To Move a Dialog Box:

2 - 12

click the title bar and drag the window until it is repositioned

Chapter 2

Understanding the Basics

To Close a Dialog Box:

click [OK], [Cancel], or [Done], as appropriate

click
in the top right corner to cancel the command and close the
window

Note:

For more information on using dialog boxes, see the


documentation that came with your operating system.

File Open and Save Dialog Boxes


ACL uses the standard file open and save dialog boxes for your operating
system. For example, this is the standard file open dialog box for
Windows 95 and NT 4.0 when locating disk files:
current folder

file name list box

file name
text box
file type dropdown

Common features of this type of dialog box are:


Look in

Lists the files in the current folder (directory) and


provides access to all available directories.

File Name

You can type a file name in the text box, or use the list
box to select an existing file.
To see all files in a drive or directory with a specific
file extension, type an asterisk (*) followed by a
period (.) in the file name text box. For example, type
*.ACL to list all ACL documents.
To see all the files in a directory, click the Files of type
dropdown and select All Files, or type *.* in the file
name text box.

2 - 13

Chapter 2

Understanding the Basics


Files of Type

Identifies the type(s) of files displayed in the File


Name list box.

Command Dialog Boxes


ACL command dialog boxes contain options and controls that affect the
processing of commands.
Common features of command dialog boxes include:
Title

Indicate the command or function being specified.

Command
option tabs

Indicate the area of options.


The [More] tab allows you to specify more options
for the command.
The [Output] tab allows to specify output options,
such as to the screen, a file, printer or a graph.

Command
buttons

Initiate an action or command.

Radiobuttons Select one option.


A black dot in the center of the button indicates that
the option is turned on. Within each group of
radiobuttons, you can turn on only one option.
Checkboxes

Mark an option for selection.


You can choose one or more checkbox options. An
_ or indicates that the option has been selected.

List boxes

Display a list of items, such as fields, from which you


make a selection.
Use the scroll bars to browse up and down through
the list.

Text boxes

2 - 14

Horizontal boxes in which you type information.

Chapter 2

Understanding the Basics

title
command options

list box

text box

command buttons

checkbox
radiobutton

Command dialog boxes also share a number of common buttons. In


addition to the previously described [OK] and [Cancel] buttons and the
[More] and [Output] tabs, these include:
[If]

Opens the Expression Builder for building


expressions and editing variables and filters.

[To]

Displays a standard Save dialog box for creating a file,


or appending to an existing one.

Selection/Edit Dialog Boxes


ACL provides selection/edit dialog boxes as an alternative to working
with the items in the Overview window. Use them to display, rename,
duplicate, copy, and delete input files, views, batches, variables, and
filters.

2 - 15

Chapter 2

Understanding the Basics

Opening Selection/Edit Dialog Boxes


Follow these procedures to open selection/edit dialog boxes:
1.

Open a document.

2.

Do one of the following:

click the right hand box of the status bar to display the Select
Input File Definition dialog box

select Data from the menu bar and choose Select to open the
Select Input File Definition dialog box

select Window from the menu bar and choose Open View to
open the Select View dialog box

select Edit from the menu bar and choose Filters to open the
Filters dialog box

select Edit from the menu bar and choose Variables to open the
Variables dialog box

select Edit from the menu bar and choose Batches to open the
Batches dialog box

click the middle box of the status bar to display the Set Global
Filter dialog box

select Tools from the menu bar and choose Set Global Filter
to open the Set Global Filter dialog box

In each selection/edit dialog box, the available items are listed in a list box.
For example, all available batches are listed in the list box of the Batches
dialog box. If there are no available items, the list box is blank.
ACL displays selection/edit dialog boxes when you want to create,
display, or make changes to input files, views, filters, variables, and
batches.
title

list box

2 - 16

Chapter 2

Understanding the Basics

Selection/edit dialog boxes have the following standard features in


common:

A title that identifies the dialog box.

A list box that displays selectable items. The items in the list vary
according to the work you are doing. For example, the Filters dialog
box lists all available filters. If no items are available, the list box is
empty.

In selection boxes that allow you to select more than one item, you
can Ctrl -click individual items or Shift -click to select a block of
neighboring items.

Besides the previously discussed [OK], [Done], and [Cancel] buttons,


selection/edit dialog boxes also contain one or more of the following
command buttons:
[Link Data
File]

Enables you to link the input file definition to a new


data file. This button is unique to the Select Input File
Definition dialog box.
For more information: See Linking an Input File
Definition to a New Data File on page 8 in the ACL for
Windows User Guide for more details.

[Index]

Allows you to select and activate an index for the


selected input file. This button is unique to the Select
Input File Definition dialog box.
For more information: See Index on page 65 in
the ACL for Windows User Guide for more details.

[No Index]

Unlinks an active index from the selected input file.


This button is unique to the Select Input File Definition
dialog box.
For more information: See Closing an Index File
on page 69 in the ACL for Windows User Guide for more
details.

[New]

Creates an item.

2 - 17

Chapter 2

Understanding the Basics


[None]

Closes the currently active item, if appropriate. This


button works differently, or is disabled according to
each selection/edit dialog box. For example, on the
Select Input File Definition dialog box, clicking
[None] closes the currently open input file.

[Copy
From]

Copies an item of the specified type from another


document.
Move the items you want in the From list box to the To
list box and click [OK]. ACL adds the copied items to
the list box.
The names of the copied items remain unchanged,
unless the name already exists in the current document,
in which case a unique number is added to the end of
the name. For example, if Demo already exists, the
imported item is renamed Demo2.

[Duplicate]

Duplicates the selected item.


ACL automatically assigns the original name followed
by the number 2 to the new item and displays a message
advising you of it. For example, if you duplicate a view
named RECVAL, ACL assigns the name RECVAL2 to
the new item.
If you duplicate field definitions, ACL displays a
message box asking if you want to copy or share the
field definitions. If you share the field definitions,
changes to a field in either file are reflected in the other
file. If you copy the definitions, the fields start out the
same, but change independently.

[Rename]

Renames the selected item.


Type a new name for the item in the message box
displayed by ACL and click [OK]. ACL changes the
name of the item in the list.
If you rename a view or report, you must link it to an
input file before you can use it. The first time you try to
open the renamed view or report, ACL displays a dialog
box with options to help you locate the input file.

2 - 18

Chapter 2

Understanding the Basics


[Delete]

Deletes the selected item or items.


ACL displays a message asking you to confirm the
deletion. Click [OK] to delete the selected item or
[Cancel] to leave the item as is.
ACL does not allow you to delete an item that is
currently in use.

Select Dialog Boxes


ACL displays a select dialog box whenever you need to select or create
fields, or when copying items from another document. This type of
dialog box is most commonly used to add fields to a view.
title

click to add
selected field
click to remove
selected field
click to add all
selected fields

list box

click to remove
all selected fields
click to edit a
selected field

select
input file

click to create a
computed field

Select the fields or items you want from the Available Fields list box, or
click [Expr] (for fields) and define an expression. ACL displays selected
and created items in the Selected Fields list box.
Select dialog boxes have the following standard features in common:

A title that identifies the dialog box and the type of items in the list
box.

An Available Fields list box on the left that displays a list of selectable
items. If no items are available, the list box is empty.

A Selected Fields list box on the right that displays a list of selected
items. If no items are selected, the list box is empty.

2 - 19

Chapter 2

Understanding the Basics

In selection boxes that allow you to select more than one item, you
can Ctrl -click individual items or Shift -click to select a block of
neighboring items.

For fields, a From Input File dropdown that lets you choose a related
file, if applicable, to be the input file.

One or more of the following command buttons:

[]

Copies a selected field into the Selected Fields list


box.

[]

Removes a field from the Selected Fields list box.

[Add All]

Selects all fields in the Available Fields list box and


copies them into the Selected Fields list box.

[Clear All]

Clears all items from the Selected Fields list box.

[Expr]

Displays the expression builder, allowing you to


construct a computed field.

[Edit]

Displays the expression builder, allowing you to


edit the selected field.

The following radiobuttons apply to commands that require sorting


order; such as Sort, Index, or Sequence:

Ascending

Processes the item(s) in ascending order.

Descending Processes the item(s) in descending order.

Message Boxes
ACL guides you through procedures by displaying message boxes that
indicate what you are doing wrong, what to do next, or to warn you of a
potential problem. ACL requires you to acknowledge messages by
clicking a command button in the message box. The message indicates

2 - 20

Chapter 2

Understanding the Basics

the consequences of each possible action, so read the message carefully


before responding.

When you click a command button (such as [OK]), ACL processes the
action and closes the message box.

Working with Notes


ACL lets you add comments, called notes, to provide descriptions of the
general ACL environment, or to document your detailed procedures.
Notes are like electronic post-it notes that you can add or remove as
required.
Notes are particularly useful for recording details on a process that is
repeated on a regular basis. When more than one person will be working
with the data file, notes make it easy for others to understand the
procedures you design.
Document Notes

To enter general information about a document or edit existing notes,


click the
(Edit the document note) button in the button bar, if
available, or select File from the menu bar and choose Document Notes.
ACL displays a window for entering comments that apply to the current
document. The name of the document to which the note applies is
displayed on the title bar.

2 - 21

Chapter 2

Understanding the Basics

Other Notes

In addition to document notes, you can also add notes to describe the
various document components, including batches, input file definitions,
views, workspaces, and fields. Wherever you see
, you can click it to
enter notes.
The
button (with the bottom half of the note darkened) indicates that
notes already exist and are available for viewing or editing.

Entering and Modifying a Note


To enter or modify a note, do the following:
1.

Click

2.

Type information as required using the techniques described in the


sections Using the Keyboard on page 2 in the ACL for Windows
User Guide and Editing Text below.

3.

Close the Notes window to save the note.

to display a Notes window.

The notes you enter remain intact until you modify or delete them. You
can add to existing notes, or delete notes that no longer apply. If more
than one person is using ACL, we suggest that each person who enters a
note add their initials and the time/date to the note.

Editing Text
Use options from the Edit menu to delete, copy, or insert text in the
command log, notes, batches, and other windows or dialog boxes where
you enter or modify text. You can recover the last delete with the Undo
command in the Edit menu or Ctrl -z.

Deleting
1.

Highlight the text that you want to delete.

2.

Press Delete

Note:

2 - 22

or Backspace

Information that is deleted using Delete or Backspace


cannot be pasted into another application or ACL window.

Chapter 2

Understanding the Basics

Cutting
1.

Highlight the text you want to cut.

2.

Select Edit from the menu bar and choose Cut, or use the keyboard
shortcut Ctrl -x.
The text is removed and stored on the clipboard. It can be pasted
into another ACL window or application such as a word processing
program or restored to its original location.

Copying
1.

Highlight the text you want to copy.

2.

Select Edit from the menu bar and choose Copy, or use the keyboard
shortcut Ctrl -c.
The text is copied to the clipboard so that you can paste it into
another ACL window or application such as a word processing
program. The original text remains in place.

Inserting
1.

Place the insertion point in the spot where you want to paste text that
has been copied or cut.

2.

Select Edit from the menu bar and choose Paste, or use the keyboard
shortcut Ctrl -v.
ACL pastes the contents of the clipboard into the location where the
cursor is positioned.

Note:

You cannot paste into the command log.

Copying and Pasting Cells


You can use the Edit menu to copy areas or sections of data in a view. You
cannot copy areas from a multiline view and you cannot copy the entire
field (column) by highlighting the column header.

2 - 23

Chapter 2

Understanding the Basics


To copy data in the view, do the following:
1.

Highlight the area of the data you want to copy.

highlight the area


you want to copy
to the clipboard

2.

Select Edit from the menu bar and choose Copy, or use the keyboard
shortcut Ctrl -c. ACL copies the data into the clipboard of your
computer.

You can paste the data into a text box, a note, or a different program. To
paste it into the view note, do the following:
1.

Click the

2.

Select Edit from the menu bar and choose Paste, or use the keyboard
shortcut Ctrl -v. ACL places the copied data into the View Notes
window.

Note:

(Edit view note) button.

The data you copy may be spaced slightly different when you
paste it.

Printing in ACL
You can print the contents of any active window or any highlighted
section of text by clicking the
(Print the active window) button in the
button bar, or by selecting File from the menu bar and choosing Print.

2 - 24

Chapter 2

Understanding the Basics

Setting up a Print Job


When printing, ACL uses the current settings for the printer connected
to your computer. To change the default settings, do the following:
1.

Click
to display the Print dialog box, and then click [Setup].
Alternatively, you can select File from the menu bar and choose Page
Setup.
ACL displays the standard Windows Page Setup dialog box, which
has options for setting up the print job.

2.

Choose options as required. You can change:

3.

default printer
paper orientation (portrait or landscape)
paper size
paper source

When you are finished choosing options:

Click [OK] to set up the printer according to the selected


options, or
Click [Cancel] to restore the options to their default settings.

Printing Information
1.

Click
on the button bar, or select File from the menu bar and
choose Print.
ACL displays the Print dialog box.

2 - 25

Chapter 2

Understanding the Basics


Choose options as required. The options that appear depend on the
currently selected printer. Common options include:

2.

All

Prints all the pages in your selected job.

Pages

To print one page or a range of pages, type in the start


and end page numbers in the From and To text boxes,
respectively.

When you have finished selecting options, click [Print] to print your
job. Otherwise, click [Cancel] to restore the options in the dialog
box to their original settings and cancel the print request.

By default, ACL provides half inch margins on all sides of printed output.
You can change these margins by selecting Edit from the menu bar and
choosing Preferences. Click the [Print Options] tab and change the
margin values. Margins are indicated as hundredths of an inch, that is, 50/
100 for half inch margins.
For more information: See Margins on page 7-18.
If you are working with a report, you can also use ACLs print preview
functionality. For more information on previewing your reports before
printing them, see Print Preview on page 29 in the ACL for Windows
User Guide.

Need Help?
Online help provides information on ACL commands, functions,
concepts, and processes.
If you require further help, select Help from the menu bar and choose
Contact ACL to display a number of methods for you to get in touch with
ACL Technical Support.

Displaying Context-Sensitive Help


ACL provides online help that is context-sensitive. Wherever you are in
ACL, pressing F1 will provide help that is specific to the active window
or dialog box.

2 - 26

Chapter 2

Understanding the Basics

To display topics for which there is online help, either select Help from
the menu bar and choose Contents or click
in the button bar.
ACL displays the ACL Help Contents window showing a list of help
subjects.

click to search for topics


click to view this page

click to print screen contents


click to move to previous screen
click to view subject

To display information on a topic relevant to a specific command or


action, click [Help] in the corresponding dialog box.

Navigating Help
To navigate ACL online help, you can either click any of the green,
underlined words, or click one of the buttons in the Help window.
[Contents]

Click to display Help contents.

[Search]

Click to search for topics using speed search, or by


scrolling through a list of topics.

[Back]

Click to go back to the previous help screen.

[History]

Click to display a history of the topics you have


viewed (not available with Windows 95).

2 - 27

Chapter 2

Understanding the Basics


[Print]

Click to print the contents of the current help screen


(not available with Windows 3.x).

You can also press F1 to learn how to use ACLs online help system.

Using Speed Search


Speed search enables you to locate a specific topic if you know exactly
what you are looking for and want to zero in on the information
quickly. For example, if you want help on computed fields, type a
unique keyword such as computed in the text box. ACL searches for the
first occurrence of the specified keyword and displays help on the topic.
To search for a topic using speed search, do the following:
1.

Click [Search].

2.

Type a keyword in the text box at the top of the window. The more
specific the keyword, the better chance you have of finding the topic.
For example, if you type the keyword co instead of computed,
ACL displays information on the first item that begins with co,
which may or may not be computed fields.

key word

topics

click to view subject

Click [Cancel] to return to the ACL Help Contents window.

2 - 28

Chapter 2

Understanding the Basics

Search by Scrolling
This method of searching lets you make a specific selection from a list of
topics. Use this method if you are unsure of which help topics are
available.
To search for a topic by scrolling, do the following:
1.

Click [Search] to display an alphabetic list of keywords.

2.

Scroll through the list until you find a specific keyword.

3.

Double click the keyword to display the associated topic.

Click [Cancel] to return to the ACL Help Contents window.

Saving Your Work


You can save your work at any time by selecting File from the menu bar
and:

choosing Save Document to save a document with the existing file


name

choosing Save Document As to save a document using a new file


name

Recovery Files
Should your ACL session unexpectedly terminate, you should restart
ACL and open the document in which you were working.
Because ACL saves a temporary file, you are prompted to use the
recovery file specific to that document. When it is opened, the recovery
file overwrites the document file of the same name.

To Exit ACL
Select File from the menu bar and choose Exit when you are ready to exit
ACL, or double click the ACL symbol in the top left hand corner of your
screen.

2 - 29

Key Concepts Chapter 3


This chapter provides a discussion of the key concepts behind how ACL
works. It also introduces the four basic steps involved in analyzing data
using ACL: obtaining, defining, and processing data and creating output
from your results.

ACL Documents
An ACL document contains batches, input file definitions, indexes, views,
and workspaces and their specified formats. The computerized data and
information that ACL analyzes is called a data file. The data files never
change.
The components shown in the document box below are the elements that
you create and manipulate.

ACL:

document
batches

index files

views

workspaces

input file
definition

data file

input file
definition

data file

input file
definition

data file

3-1

Chapter 3

Key Concepts
A document maintains a description of, for example, how your data is
stored in a data file, reports, and automated procedures you design to
analyze your data. The document does not contain any physical data.
When you work with ACL, you use an input file definition that acts as a
link to the data file (also called a source file). Due to the close connection
between the data file and the input file definition, they are often referred
to jointly as the input file.
The input file definition describes the structure and content of a data file.
It includes information such as field names, data types, where each field
starts, the length of each field, and any computed fields and expressions
you add. ACL analyzes the source file and provides you with some of this
information. You do not need to import data into a standard form.
Note:

dBASE files store enough descriptive information with their data


files that ACL automatically creates a complete input file definition
for you.
Although there is no reference to a log file within the document, each
document has an associated log file that retains a history of everything
you do from session to session until you explicitly clear it. At startup,
ACL looks for an existing log file with the same name as the document,
and creates a log if none is found.
When you first work with ACL, you create a document, select a data file,
and create an input file definition for the data file. Documents are
maintained by ACL and updated automatically as you work with data.
Each time you use a document, information related to the work session is
retained. ACL remembers the files you were working with, and the
arrangement of windows on your screen. The next time you use the
document, you can start at exactly the same point you left off.
For more information: For details on how to use documents, see
Working with Documents on page 4-1.

3-2

Chapter 3

Key Concepts

Using ACL
The following section introduces the four basic steps involved in
analyzing data using ACL.

Obtaining Data
The data source can be on a mainframe computer, a minicomputer or a
personal computer. It can have any record structure, a variety of data
types, and can be on hard disk, floppy disk, or other storage devices that
can be read by your PC. Data from a personal computer is easily accessed.
Data from a mainframe or minicomputer can be accessed by:

Data Files

downloading it to a hard disk on your personal computer

copying it to tape

using ODBC

A data file contains computer-based data to be analyzed. The data file is


not actually stored as part of an ACL document, but rather is linked to the
document by the input file definition. ACL does not alter the data file in
any way.
ACL supports most data types, including those found in specific
applications such as the numeric data type found in the ACCPAC
accounting system.

For more information: See Field Types on page 3-1 in the ACL for
Windows Reference Manual.

For more information: On how to access data, see Obtaining Data to


Analyze on page 6-1 in the ACL for Windows Reference Manual. You
should work closely with your information systems department in
making decisions about obtaining data from your system.

3-3

Chapter 3

Key Concepts

Opening a Database File


ACL automatically detects and analyzes dBASE files.
When you open a dBASE file, ACL displays the message: File is likely a
dBASE File. Create fields now?. Click [OK] to create an Input File
Definition for the dBASE file. ACL tells you that field definitions have
been created automatically.
You can then process the data like any other file.

Obtaining ODBC Data


ACL for Windows Version 6 lets you access ODBC-compliant databases.
You need the proper ODBC drivers installed in your computer before
you can access ODBC databases. If you can read ODBC data with another
software package, you know it is correctly installed and therefore ACL
can access your ODBC data.
Before you start ACL, make sure your ODBC data default directory is set
correctly. ODBC sets the default directory to where your driver locates its
data. To set the default directory, open ODBC in your computers
Control Panel. Select the data source directory from which you want to
import data. If you need assistance with ODBC drivers, contact your
systems administrator.

Importing an ODBC File


Open a document, if you have not already done so. To import an ODBC
file, do the following:

3-4

1.

Click the

(Overview) button.

2.

Click the
(Input File Definitions) button, and then click the
(New) button. ACL displays the Data Source dialog box with the
Disk radiobutton selected by default.

Chapter 3

Key Concepts
3.

Note:

4.
Note:

Select the ODBC radiobutton.

If you are working with a dBASE-compatible database (for


example, dBASE, FoxBaseTM or ClipperTM), select Disk as this will
be the most efficient method.
Click [OK].
If your company uses password protection, ACL displays a
dialog box to ask for the ID and password. If you need help with
the ID and password, contact yours systems administrator.
ACL displays the Select Data Source dialog box showing the available
data sources.

3-5

Chapter 3

Key Concepts
5.

Select the Data Source Name and click [OK]. ACL displays the Select
Database dialog box.

6.

Select the database you want to convert. Click [OK]. ACL displays
the Select Table dialog box.

Note:

ODBC imports both physical and logical tables.


To change the default directory, click the DATABASE dropdown
and locate the directory that contains the ODBC files you want to
import.

Note:

3-6

For ODBC servers that do not refer to data using a PC directory


structure, you can click the DATABASE dropdown to select a
directory.

Chapter 3

Key Concepts
7.

Select the table and click [Next]. ACL displays the Save As dialog
box.

8.

Select the directory and type a name in the File name text box for the
imported database table. Click [Save]. ACL displays the Select Fields
dialog box.

By default, ACL selects all Available Fields and lists them in the
Selected Fields list box. You can click [], [], [Clear All], or [Add
All] to change the selection to only the fields you want to import.
9.

In the WHERE text box, enter a Structured Query Language (SQL)


Where statement if you want to limit the records imported. This
SQL statement only applies to the selected database table.

3-7

Chapter 3

Key Concepts
For example, type Country =Canada to select only those
records with Canada in the COUNTRY field. If you need help with
the SQL Where statement, contact your systems administrator.
Note:

This is not an ACL If test. The Where statement is processed


by the ODBC driver and must be valid for this usage.

10. If you want to see approximately how much disk space the ODBC
database table requires, click [Apply] at the top right of the dialog
box. When you click [Apply], the title of the dialog box changes to
Counting Rows, and the bottom left of the dialog box displays an
estimate of how much disk space is required and approximately how
much free disk space is in your computer (in bytes). You can modify
the WHERE statement to limit the amount of data you are
importing, and then click [Apply] again until the database table fits
in your available disk space.
11. If necessary, set the Maximum Character Field Length and
Maximum Memo Field Length.
SQL permits two types of character fields:

Variable fields are limited to a maximum of 256 characters.


These fields are controlled by the Maximum Character Field
Length setting. To avoid importing fields too large for your use,
ACL sets the default for this type of variable field to 50. You have
the option of resetting these fields to any desired length up to
256 characters.

Variable fields with no size limit. These fields are controlled by


the Maximum Memo Field Length setting. To avoid importing
fields too large for your use, ACL sets the default for this type of
variable field to 100. You have the option of resetting these fields
to any desired length.

You can click [Apply] to see how much space the imported database
table requires.
When all the settings are correct, click [Next]. ACL displays a
progress dialog box showing you the ODBC conversion process. If
you want to abort the conversion, click [Cancel].

3-8

Chapter 3

Key Concepts

When the conversion is complete, ACL displays the Input File Definition
window.

You can now use the data as you would any other ACL data file.
If ACL displays a column title with blank data fields, it indicates that the
field contains no data in the source table. ACL does not import custom
field types, as there is no consistent way to properly import them.
Some numeric fields may default to two decimal places. When an ODBC
numeric field is set as a float numeric field, ACL sets a default of two
decimal places since the ODBC specification does not allow information
on decimals. Choose Edit from the menu bar and select Input File
Definition; then click the [Edit fields/expressions] tab to change the
decimal setting.

Updating an ODBC File


To update an ODBC database table, you do not need to import the
database again. Simply click the
(Refresh from source file) button in
the [Input File Options] tab of the Input File Definition window. ACL
asks if you want to refresh the data from its source. Click [Yes] to update
the ODBC table to the current data from the source table.
Note:

If the ODBC database is protected by a password, you will need to


provide the password to refresh the data.

3-9

Chapter 3

Key Concepts

Defining Data
ACL automatically defines some files that have an internal data definition
included with the data, such as dBASE files and ODBC databases.
However, most legacy data files (older data files generated mainly by
mainframe computers) do not have an internal data definition. The data
has been grouped into records, but within each record there is no
indication of where, for example, a department number ends and a
branch number begins.
For this reason, you should have access to a file description of the data
you will be working with, including its contents and the layout of its
records. A file description simplifies the process of defining the data
fields.
Input File Definitions

In ACL, each data file is associated with an input file definition (also
referred to as the input file), which describes the structure and content of
the data file. ACL automatically provides some of this information for
you, such as the file type, character type, media type, number of records,
and the record length, but you must supply the field definitions.
For more information: See Creating an Input File Definition on
page 4-5 and Linking an Input File Definition to a New Data File on
page 4-8.

Field Definitions

Field definitions identify and describe the data in a file. For example, in a
telephone book, each entry is a record, but the details about each entry
(name, address, telephone number, and so on) are stored in fields.
Typically, all records in a file are described by the same fields.
Spend some time thinking about the file contents and what you may want
to do with them. Identify the fields you require (the existing file layout
can assist you), keeping in mind that you need to define only the fields
that you will actually use.
When defining fields, you must provide the information about each of
the fields you want to work with in the data file, such as the field name,
where each field starts and other specific details.
For more information: See Defining Data Files on page 4-4.

3 - 10

Chapter 3

Key Concepts

When you are finished defining data fields, ACL displays a view of the
data in spreadsheet format. Each row is a record and each column is a
field.
A view displays the data in a file according to the way you define the files
fields. A view does not contain data, but rather is an arrangement or
presentation of the data. As such, you cannot manipulate the data itself
(ACL never alters the data file in any way).

Views

record

field

data

You can use a view to restructure the presentation of data by adding,


deleting, or rearranging columns. You can also change column widths to
suit your needs, and select different fonts for the heading and data. In this
way, you can have many different views of the same data file. For
example, this is a different view of the same file in multiple rows:

You can print views exactly as they appear on screen, or in report format
with headers and footers, page breaks, and other report specifications.

3 - 11

Chapter 3

Key Concepts

For more information: See Working with Views on page 5-4.


At a more advanced level, you can define filters to selectively exclude
specific records that do not meet a test or condition. You can also create
expressions.
For more information: On filters, see Working with Filters on page
6-22.
Expressions

Expressions can be used to perform calculations, specify conditions for a


test, or to create values that do not exist directly in the data. For example,
you might use an expression to count how many accounts were paid
more than 30 days late. An ACL expression can be a combination of data
fields or computed fields, operators, constants, functions, and variables.
For more information: See Expression Builder on page 6-1, which
helps you build expressions quickly and easily.

Computed Fields

A computed field is a special type of expression. A computed field does


not contain physical data like a data field. It is a virtual field that uses
data derived from a calculation or the result of an ACL command. For
example, in an inventory file, you can create a computed field that is
based on the quantity of items on hand multiplied by their unit cost.
ACL provides a quick and easy way to build computed fields and
eliminate much of the guesswork.
For more information: Details can be found in Working with
Computed Fields on page 4-28.

Functions

A function is a predefined routine that performs a calculation or


computation on specified data. Functions allow you to more easily
perform a wide range of computational tasks. ACL supports a variety of
functions as part of expressions.
For more information: See Working with Functions on page 6-28.

3 - 12

Chapter 3

Key Concepts
Variables

Variables are temporary values that usually exist in memory for the
duration of an ACL session. Variables can be any information you want
to retain from record to record, or command to command.
Some variables are automatically assigned by ACL whenever commands
such as Count, Total, and Statistics are executed. You can use these
variables, or those you create yourself, when processing other ACL
commands. A variable retains its value until it is changed, deleted, or
until you quit ACL.
For more information: See Working with Functions on page 6-28
for details on variables.

Processing Data
When processing data, keep in mind the following operating limits:

You can only have one document open at a time. If you open a
second document, ACL automatically closes the first.

You can look at only one view at a time. If you open another view,
ACL automatically closes the first.

ACL can handle record lengths up to 32,767 bytes.

ACL can handle file sizes of practically unlimited size.

Commands are the foundation of ACL. A command instructs ACL to do


a specific task. For example, the Count command counts the number of
records in a file, or the number of items that meet a particular test.
In ACL, you can issue commands in a number of different ways,
depending on your skills and work preferences. The two most common
ways of issuing commands are:

choosing commands from menus, and

clicking the buttons representing commands in the button bar

Alternatively, you might prefer to use the Command Log window to issue
commands. At a more advanced level, you can combine and store a series
of commands, executing them all at once in a batch or group.
For more information: For more details on how to issue ACL
commands, see Issuing Commands on page 1-2 in the ACL for
Windows Reference Manual.

3 - 13

Chapter 3

Key Concepts

Creating Output from your Data


Reports and other outputs show the results of ACL processing.
ACL provides a Report command for printing fully formatted reports,
including multiline reports. You can add headers and footers, sort the
records, exclude records that do not meet a specified condition or test,
produce subtotals at the end of each sort key field, and include other
printing specifications.
You can use HTML (HyperText Markup Language) as an output format
for your reports. All Web browsers that can read tables in HTML files can
read ACL reports. This new feature allows you to prepare your ACL
reports to be distributed or published via the World Wide Web. ACL
generates HTML files in HTML 3.0 format.

For more information: On creating reports with ACL, see


Producing Reports on page 5-20.

Some ACL commands produce data files that can be used by ACL for
further processing. You can also export data for use in a variety of
popular spreadsheet, database, and word processing programs using
ACLs Export command.

For more information: See EXPORT on page 2-62 in the ACL for
Windows Reference Manual.

Log Files

You can also print information as views and log files. A log file records all
commands issued in a document, their results, and a time/date stamp of
their occurrence. When an ACL document is created, a log file specific to
that document is automatically created.

For more information: See Views on page 3-11 for more details.
Results of Commands

3 - 14

ACL displays the results of all commands in the Command Log.

Defining Files and Fields Chapter 4


This chapter describes how to create documents and input file
definitions; how to link input file definitions to data files; and how to
define and format data fields, data filters, conditional fields, and
computed fields.

Working with Documents


This section describes how to create a document. ACL allows you to read
almost any type of data, but the data must be properly defined for use
with ACL.
For more information: For details on how to define data for use with
ACL, see Obtaining Data to Analyze on page 6-1 in the ACL for
Windows Reference Manual.
Documents are maintained by ACL and updated automatically as you
work. Whenever you open an input file definition in an ACL document,
ACL locates the data file and makes it available.
For more information: For a full description of ACL documents, see
ACL Documents on page 3-1.
To work with the data file, you must create an input file definition and
define the data fields. Defining the data fields tells ACL what information
is in the data file and how to display and print that information. These
procedures are described in detail in Creating an Input File Definition
on page 4-5.

4-1

Chapter 4

Defining Files and Fields

Creating a Document
To begin working with the data file, you need to create a document and
identify the location of your data file, by doing the following:
Name the Document

1.

Select File from the menu bar and choose New Document. ACL
displays a dialog box with options for naming and saving the
document.

2.

Name the document and specify the drive and directory where it is to
be located:

Select a different drive and directory if required.


Since, by default, ACL assumes that your data files are in the
same directory as the document, it is generally most convenient
to place the document with the data files.

Type a name in the file name box.


ACL automatically appends the extension ACL to the file,
indicating it is an ACL document.

3.

Click [Save]. ACL displays a dialog box with options for


selecting an input file definition.

Click [New] to display the Data Source dialog box with three
choices: Disk, Tape, or ODBC. Disk is selected by default. Most of
the time, your data source is a disk file. Click [OK].
For more information: On working with files from tape, see
Working With Tape on page 7-1 in the ACL for Windows
Reference Manual.

For more information: On working with ODBC files, see


Obtaining ODBC Data on page 3-4.

4-2

Chapter 4

Defining Files and Fields


4.

Identify the Data File

ACL displays a dialog box with options for identifying the data file
and its location.

ACL document
data file
log file

old version
ACL document

Note:

Do not click [Cancel]. It will leave you with a document that is


not yet linked to a data file.

5.

Use the dropdowns and list box to locate the data file.

6.

Click [Open]. ACL displays the Input File Definition window.

After you create a document and link a data file, you usually proceed
directly with creating the input file definition and defining the data fields.
This process is described in detail in Creating an Input File Definition
on page 4-5. Refer to this section if you want to continue defining the
input file and data fields.

Opening a Document
You can open an existing document by doing one of the following, as
appropriate:

Select File from the menu bar and choose the name of one of the
previously opened documents, or

Select File from the menu bar and choose Open Document. ACL
displays a dialog box with options for locating the document. Select
the drive, directory, and the file name from the appropriate list
boxes, and click [Open].

Click the leftmost box in the status bar to display a dialog box with
options for locating the document. Select the drive, directory, and
the file name from the appropriate list boxes, and click [Open].

4-3

Chapter 4

Defining Files and Fields


When you open a document, ACL displays the name of the last input file
you used in the right hand corner of the status bar.

name of document

number of records

name of input file

In addition, ACL displays the windows that were open when you last used
the ACL document. For example, if you had the Command Log and the
Overview windows open previously, ACL automatically opens them
when you open the document. Similarly, if you closed all ACL windows
prior to quitting, the application workspace appears blank the next time
you open the document.

Defining Data Files


After you have created a document and selected a data file, you must tell
ACL what type of data file you are using and how the data is structured.
ACL uses the input file definition to help you determine the type of data
file you are using. You can then define the fields in your data file in the
Input File Definition window.
ACL links a data file to an ACL document through an input file
definition, which tells ACL how the data in your file is structured. You
may have several input file definitions in one document all linked to the
same data file. Similarly, you can have several different documents linked
to the same data file.

For more information: To link to a different data file, see Linking an


Input File Definition to a New Data File on page 4-8.

Note:

4-4

In this manual, input file also refers to the data file and the input file
definition taken together.

Chapter 4

Defining Files and Fields

Creating an Input File Definition


There are two parts to creating an input file definition: selecting a data file
and defining the data fields.

Selecting a New Input File


1.

Open a document if you have not already done so.

2.

Either:

3.

Click Input File Definitions in the Overview window and


click
(New), or

Select Data from the menu bar and choose Select to display the
Select Input File Definition dialog box. Click [New].

ACL displays the Data Source dialog box with three choices: Disk,
Tape, or ODBC. Disk is selected by default. The most common data
source is a disk file.
For more information: On working with files from tape, see
Working With Tape on page 7-1 in the ACL for Windows Reference
Manual.

For more information: On working with ODBC files, see


Obtaining ODBC Data on page 3-4.
Click [OK] tab.
4.
Note:

ACL displays the Locate Data File dialog box, with options for
identifying the data file and its location.
ACL does not directly read spreadsheets (such as data produced
in Excel, LOTUS, and so on). Spreadsheets must be exported
from the spreadsheet package in one of three ways:

as a comma or tab delimited file, or

as an ASCII text file, or

as a dBASE file

This last option is the most preferable, because ACL automatically


recognizes dBASE files and creates the required input file definition.
Before exporting, include a field name in the first row for each
column in your spreadsheet.

4-5

Chapter 4

Defining Files and Fields


5.

After locating and selecting the data file you want to work with, click
[Open].
ACL automatically analyzes the file to determine the file type,
character type, and record length, and displays information resulting
from the analysis in the Input File Definition window. The drive,
directory path, and name of the data file currently being defined are
displayed as part of the title bar.

Input File Definition


Window

directory path
edit fields/expressions
add a new data filter
link to new data file
analyze file
convert delimited file
convert ODBC file

ruler
character set
data
check to view data
in hexadecimal format

Note:

If ACL suspects that the file represents a file in which fields are
usually separated by commas or tabs (delimited), you are
prompted to convert it to a fixed length file. If a dBASE file is
detected, ACL reads the field definitions in the dBASE file and
asks if you want to define the fields automatically.
The top portion of the Input File Definition window contains the
following information about the file:

4-6

Media Type

Identifies how the data is accessed.

File Type

Identifies the file as one of fixed record length,


IBM variable record length, or text file with
carriage return or carriage return and line feed
(CR or CRLF).

Chapter 4

Defining Files and Fields


Character Type

Identifies the character type as ASCII or


EBCDIC.

Record Length

The length of the record for fixed length files,


or the length of the longest record if the
records are variable length.

Skip Length

This value determines the number of bytes to


be ignored at the start of the file. Zero, the
default, means that the entire file is processed.
Specify a skip length greater than zero to
exclude data at the beginning of a file from
being analyzed. For example, if the first 32
bytes contain only header information, you
might specify the skip length as 32.

The lower part of the window displays some of the data in the file.
Each row is a record, with the record number being displayed in the
leftmost column. The ruler above the first record marks the byte
positions of data in the records.
To add comments concerning your input file definition, click the
(Edit input file definition note) button.
To view the data in hexadecimal format, check the Hex checkbox.
In most cases, ACLs analysis of your data is correct, and the records
displayed in the lower portion of the screen line up in vertical
columns. If they do not, the following table will resolve problems
with misaligned records:
Symptom

Problem

Solution

Fields in the
records area slant
down to the right.

The record length


is likely too short.

Increase record
length.*

Fields in the
records area slant
down to the left.

The record length


is likely too long.

Decrease record
length.*

4-7

Chapter 4

Defining Files and Fields

Symptom

Problem

Solution

The records area


consists mostly of
blank spaces and
punctuation
characters.

The character type


has been changed
from ASCII to
EBCDIC.

Click the
Character Type
dropdown and
choose ASCII.

The record length


appears too large.

The record length


is probably a
multiple of (2, 3, or
4 times) the actual
record length.

Try entering a
value* in the
Record Length text
box equal to a
fraction (1 2, 1 3
or 1 4) of the
displayed record
length.

The records
appear to snake.

The skip length is


too small.

Increase the skip


length.*

* If you change the record length or the skip length, press the Tab
key to register your change.
If you change the record length by mistake and cannot remember the
correct length, click the
(Analyze file) button to reset the length.
In the rare case that ACL does not recognize a delimited file (for
example, when the delimiters are not standard), click the
(Convert delimited file) button to specify the delimiters that file uses.
For more information: On using delimited files, see Using
Delimited Files on page 6-5 in the ACL for Windows Reference
Manual.
6.

To define the data fields, click the [Edit fields/expressions] tab and
follow the detailed given in Defining Data Fields on page 4-18.

Linking an Input File Definition to a New Data File


If you have followed the foregoing procedures to create or open a
document and create an input file definition, your input file definition is
already linked to the data file and you can proceed to define your data

4-8

Chapter 4

Defining Files and Fields

fields. ACL retains the input file definitions, data field descriptions,
formatting, and views you establish.
You can also link an input file definition to a different data file at any time
either from the Input File Definition window or by selecting Data from
the menu bar and choosing Select. The file structure of the newly linked
file must be identical to the structure of the file for which the input file
definition was originally created. For example, you may want to use this
option to link an input file definition to identically structured files from
different time periods or departments, such as general ledger (G/L) files.
When you link an established input file definition to another data file,
ACL automatically closes the link to the previous data file. When you
open an ACL document, if ACL cannot locate a previously defined data
file for that document, the link to that file will be closed.
To link a data file using the input file definition, do the following:
1.

Select Edit from the menu bar and choose Input File Definition.

2.

Click the
(Link to new data file) button to display the Locate
Data File dialog box.

3.

Select a data file to link to your current input file definition.

4.

Click [Open]. ACL displays the Input File Definition dialog box with
the name of the linked file in the title bar.

5.

Close the window. ACL tells you your changes will be saved.

4-9

Chapter 4

Defining Files and Fields


6.

Click [OK]. ACL displays the View window.

To link an input file definition to a new data file at any other time, do the
following:
1.

Select Data from the menu bar and choose Select.


ACL displays a dialog box listing the input file definitions in your
document and various options.

2.

Highlight the input file definition you want to link to the new data
file.

3.

Click [Link Data File] to display the Locate Data File dialog box.

4.

Select a file, drive, and directory from the appropriate list boxes, or
type the name of the data file you want to access in the current
directory, and click [Open].

Closing Input File Definitions


To close an input file definition, do one of the following:

In the Overview window, click the name of the currently open input
file and click
(Close), or

Select Data from the menu bar and choose Select. ACL displays a list
of input file definitions for the open document. Click the one you
want to close, and then click [None]. ACL closes the dialog box and
any views associated with the input file definition.

Maintaining Input File Definitions


Use the Overview window to duplicate, rename, and delete input file
definitions.
Duplicating Input Files

To duplicate an input file definition:


1.

Click the input file definition you want to duplicate.

2.

Click
(Duplicate). ACL displays a message box asking if you
want to copy or share the field definitions.
You have three options:

4 - 10

If you copy the definitions, the fields start out the same, but
change independently.

Chapter 4

Defining Files and Fields

If you have checked the Dont Share Input File Layouts


checkbox in the Input File Options preference, sharing the field
definitions, changes to a field in either file are reflected in the
other file.

If you have not checked the Dont Share Input File Layouts
checkbox in the Input File Options preference, the fields start
out the same, but change independently.

For more information: On sharing input file layouts, see Dont


Share Input File Layouts on page 7-5.
3.

Click [Share] or [Copy] as appropriate.


ACL displays a message box informing you that the input file
definition has been duplicated.

Renaming Input Files

To rename an input file definition:


1.

Click the name of the input file definition you want to rename.

2.

Either:

Click

(Rename).

ACL displays a dialog box with the current name of the input file
definition highlighted in the text box; or

Slowly double click the name.

ACL displays the name in a text box for you to rename it.
3.
Deleting Input Files

Type a new name for the input file definition and, if required, click
[OK].

To delete an input file definition:


1.

Click the input file definition you want to delete

2.

Click

(Delete).

ACL displays a dialog box asking you to confirm that you want to
delete the selected item.
3.
Note:

Click [OK] to delete the input file definition. Otherwise, click


[Cancel].
When you delete an input file, any default views associated with
that input file definition are also deleted.

4 - 11

Chapter 4

Defining Files and Fields

Field Definition
The way you define fields depends on the type of file you are reading.
There are three broad categories of files: single record type file, report file,
and multiple record type file.

Single Record Type File


In this type of file, the fields in all the records start and end at the same
location. Hence, in a file with the fields Name, Address, and Date of Birth,
Name will always be in the same location in each record and similarly
with Address and Date of Birth. For this type of file, you can go directly to
Defining Data Fields on page 4-18.

Report File
A report file is a text file that looks just like a printed report, typically with
page and column headings, and perhaps subtotals as well. This means
that the fields in the header and column records (lines) start and end at
different locations. The different types of information in the header,
subtotal, and detail lines are different record types. For this type of file
you would normally define one or more filters to filter out the
information you do not need, such as the headers and subtotals. As a
minimum you would want to be able to identify detail lines. You might
also want to identify headers, dates and so on if they contained desired
information. You can define filters to ignore the information you do not
need and only view the information you want to see.
After you define each filter, you would normally define its related fields
before moving on to the next filter.

Multiple Record Type File


A multiple record type file contains different types of records in the same
data file. To analyze such a file you must define the different types of
records in the file. This type of file is generally not in a printable format
but, like a report file, you need to be able to differentiate between the
various types of records in the file.

4 - 12

Chapter 4

Defining Files and Fields

Like report files, you would normally define a filter for each record type
and then define the fields relating to that type. Unlike report files, you can
use the filter definition process in the Defining Filters section, or define
logical computed fields following Defining Computed Fields on page 429 to identify each record type.

Defining Filters
When defining a file with a single record type, you normally do not need
to define filters. However, when defining a file that contains more than
one type of data format, such as report files and multiple record type files,
it is necessary to identify which type of record you are using at any time.
ACL uses the concept of filters to do this.
ACL offers a visual tool for defining filters for most report files, and some
multiple record type files.

Creating Filters When Defining Data Fields


When defining data fields, you can either create or apply a filter as part of
the process. The following example shows the effects of a filter on a print
image report file. However, you can follow these steps to include or
exclude any data in your file.
To create a global filter using the input file, do the following:
1.

Click the
(Edit File Definition) in the button bar or select Edit
from the menu bar and choose Input File Definition. ACL displays
the Input File Definition window.

4 - 13

Chapter 4

Defining Files and Fields


2.

Create a data filter


window

Click the [Add a new data filter] tab. ACL displays the data filter
options.

accept entry
clear entry

filter condition
click to include
condition in filter

The filter conditions are displayed in the top portion of the window,
and the records are displayed in the lower portion. The text box in
the middle of the screen displays selected values to be included in the
filter.
By default, ACL starts by excluding all records from the filter (in
other words, there is no filter condition). Records that are excluded
appear in reverse video on your screen. To define a global filter, you
simply specify conditions to include or exclude.
3.

Select a value from a record to include as a filter condition.


For example, a report file might have the decimal point in the 71st
column of each detail record. Because none of the header records has
a decimal point in the 71st column, they are filtered out, leaving just
the detail records for analysis.
Highlight the target text by either:

clicking a single character

clicking and dragging the mouse to select a range of characters

ACL highlights the selection and enters the value in the text box.
The button is set to include, because the text clicked is in reverse
video (presently excluded).

4 - 14

Chapter 4

Defining Files and Fields


4.

Click [Include] to include all records that correspond to the filter


condition (in this case, all records with a decimal point in the 71st
column).
ACL adds the condition to the list box, and displays all records to
which the filter condition applies in normal video.

initial filter condition


additional filter condition

filtered
records
detail, unfiltered
records

5.

Similarly, you can select text that is in normal video (presently


included) to define another filter condition.
For example, you could exclude all of the subtotals from the report
file. Because the subtotals all have a decimal in the 71st column, they
have not been excluded from the detail records. Notice, however,
that the subtotals have the text Class Totals starting in column 11,
whereas the detail lines do not.
To exclude all subtotals, in one of the subtotal records, highlight the
text Class Totals (columns 11 to 22) that corresponds to the
subtotal lines. Note that [Include] changes to [Exclude]. Click
[Exclude] to exclude all subtotal records.

4 - 15

Chapter 4

Defining Files and Fields

click to exclude
condition from filter

filter condition

6.

Repeat steps 3 and 4 for any other records that you want to include
(or exclude).

7.

When you are finished defining the filter conditions, click


accept the filter. ACL prompts you to name the filter.

8.

Enter a name for the new filter, for example, Detail. If the filter name
already exists, ACL displays a message and does not let you overwrite
it.

9.

ACL asks Keep this filter active? Generally, you would click [Yes]
and proceed to define the data fields for this record type.

to

10. ACL returns to the Input File Definition window showing the
defined fields list.
If you choose to keep a filter active, ACL:

4 - 16

displays the name of the active filter in the fields/filters dropdown on


the top right,

displays all the records that have been filtered out in reverse video in
the data area. This indicates that you are defining fields for this type
of record, and

displays only the fields that meet that filter condition in the fields/
expressions list box.

Defining Files and Fields

Chapter 4
You can change or remove the filter at any time by clicking the fields/
filters dropdown and choosing a different filter or all fields.

active filter

filtered records
appear in
reverse video

Now that you have applied a filter and are working with the data you
want, you must define the data fields as described in Defining Data
Fields on page 4-18.
Before you start to define fields, stop to consider the nature of this record
type. The first time you define a field with an active filter, ACL asks if the
record type is a header or detail record?

A header record contains information that pertains to the records


following it, while the information in a detail record only relates to that
particular record. Using an example of a printed report, such as a listing
inventory items, the page heading that lists the product category clearly

4 - 17

Chapter 4

Defining Files and Fields


relates to the inventory items that follow and is therefore a header type
filter, while the individual inventory lines themselves do not relate to
other areas.

Applying a Filter to an Input File


When you are defining data fields, you can apply a filter to an input file in
one of the following two ways:

After defining a filter in the Add a new data filter area of the Input
File Definition window, ACL asks whether you want to keep the filter
active. Click [Yes] to return to the define fields area of the Input File
Definition window with the filter active, or

If you have already defined a filter, you can apply it in the Input File
Definition window by clicking the dropdown beside the field names
list box and choosing one of the predefined filters.

ACL applies the conditions defined in the selected filter to the input file
with the following implications:

Any data fields you now define become conditional based on the
filter.

Any previously defined fields are compared to the conditions in the


filter. Fields that do not meet the filter conditions do not appear in
the Available Fields list box.

Records that do not meet the filter conditions appear in reverse


video.

Removing a Filter From an Input File


You can remove a filter from an input file in the Input File Definition
window by clicking the dropdown located beside the field names list box
and choosing All Fields.

Defining Data Fields


Data fields identify the data in a file. For example, when working with
inventory records, you may have data fields for unit cost, sale price,
quantity on hand, product numbers, and other related information.
When working with accounts receivable records, you may have data
fields for account numbers, telephone numbers, and transaction
amounts.

4 - 18

Chapter 4

Defining Files and Fields

Normally, you must define the data fields for your data files. In some
cases, such as dBASE or ODBC files, ACL automatically defines the fields
from the field definition information. With delimited files, ACL
automatically creates generic field names, such as Field_1, Field_2, etc.
You can then apply more meaningful names of your choice.
When you define data fields, you identify specific fields in the records,
giving each one a name and assigning a field type and a start and length.
You do not have to define all the data fields during one session; you can
define more fields as you need them.
To display the Input File Definition window, click
(Edit File
Definition) in the button bar, or select Edit from the menu bar and choose
Input File Definition.
Click the [Edit fields/expressions] tab. ACL displays the Input File
Definition window showing the fields and expressions list.

Input File Definition


Window

fields/expressions
list box

fields/filters
dropdown

accept entry
clear entry
edit field note
delete fields
field
area

add a new
data field
add a new
expression
ruler

data
area

Notice the fields/filters dropdown in the top right. This dropdown


normally shows All fields and ACL displays all the fields in the fields/
expressions list box. If you have defined a filter and chose to keep it active,
then ACL:

displays the name of the active filter in the fields/filters dropdown on


the top right,

4 - 19

Chapter 4

Defining Files and Fields

Note:

displays all the records that have been filtered out in reverse video in
the data area. This indicates that you are defining fields for this type
of record, and

displays only the fields that meet that filter condition in the fields/
expressions list box.

All fields defined with an active filter are automatically set as


conditional based on that filter.
There are a number of buttons in this window. Click:

(Accept entry) button to accept a data field definition

(Clear entry) button to reject changes to a data field definition

(Edit field note) button to edit the data field definition note

(Delete fields) button to delete field definitions

(Add a new data field) button to add a new data field definition

(Add a new expression) button to add a new expression

For more information: See also Expression Builder on page 6-1 for
details on building expressions.
Note:

If you try to delete fields referenced by the currently open view, a


message box informs you that the edit or deletion cannot take
place. Either close the open view or remove the field (column) from
your view and then make the change.
The Input File Definition list box displays the defined fields in
alphabetical, not physical, order.
For more information: See also List Fields in Physical Order on
page 7-3.
In addition to defining data fields in the Input File Definition window,
you can define filters for excluding fields based on certain conditions
and you can define expressions (see Defining Computed Fields on page
4-29).
Expressions are part of the input file definition and have a data type of
computed.

4 - 20

Chapter 4

Defining Files and Fields

To display the records in hexadecimal format, check the Hex checkbox in


the lower left hand corner of the window.
The character type (ASCII or EBCDIC) is carried over from the first part
of the input file definition, and is displayed in the rectangular area above
the record numbers. Click in this rectangle to toggle between character
types.
ACL shows information about the defined data fields and expressions in
the field area in the top portion of the Input File Definition window, and
displays the data in the lower portion. To view more or fewer records,
point to the line separating the two parts of the window until the pointer
changes to a double arrow and drag to change the window size.
To define data fields, do the following:
1.

Click in the data area on the start of the field, and hold down the
mouse button. Alternatively, click the
(Add a new data field)
button. The fields list screen changes to the format fields screen.
field type
text box

field name
text box

byte number
at start of field

length of field
in bytes

no. of
decimal points

field types for


current field

accept entry
clear entry

field
area

format numeric
and date fields

toggle between
ASCII and EBCDIC
data
area

ruler

2.

Drag the mouse to the end of the field (it is highlighted as you do so).

3.

Release the mouse button. The cursor begins to blink in the Name
text box.

4.

Type the name of the field in the Name text box.

5.

Press

or click the

(Accept entry) button.

4 - 21

Chapter 4

Defining Files and Fields


Note:

ACL reserves certain keywords for special purposes that cannot be


used as field names. For a list of reserved keywords, see Reserved
Keywords on page 4-34.
ACL assists with the field definition process by doing some activities
automatically:

When you click and drag in the data area, ACL automatically
assumes you are creating a physical data field.

While you are dragging the mouse, ACL continuously changes the
Valid Field Types list box to show only the valid field types,
depending on the data you are selecting.

When you release the mouse button, the start and length of this new
field are entered into the appropriate text boxes and the data type is
set to the most likely value (the top item in the Valid Field Types list
box).

The ruler shows the data areas you have defined in reverse video.

format
dropdown

format field
options
prevents
totalling
designates
control
total field

You can change any of these automatic values by clicking the values in the
text boxes or dropdown menus. To change the field click one of the other
valid field types in the Valid Field Types list box.
You can also choose a field type directly from the Type dropdown.
However, this is not recommended, as you may choose an invalid type.
When you choose a numeric field type, the cursor moves to the Dec.
(decimals) text box so that you can specify the number of decimal places.

4 - 22

Chapter 4

Defining Files and Fields

Formatting Data Fields


In addition to the basic field parameters, ACL provides a number of
formatting options. The data fields you define for a file appear as columns
in views and printed reports. You apply field formatting options in the
Input File Definition window
Note:

There is a difference between formatting a field and formatting a


column in a view. When you format a field, you tell ACL how to treat
the data in that field; for example, numeric with two decimal places.
When you format the column, you tell ACL how you want to display
the data in that field in your view; for example, with $ and two
decimal places.

For more information: See Working with Views on page 5-4. This
section discusses formatting a field.

When you add a column to a view, ACL uses the data field format as the
default to present the data in that column. You can then format the
column in whatever way you wish. The changes you make to the field
format do not affect the appearance of the data in the Input File
Definition window.
The field formats you define for an input file are used as default
formatting for all the views and reports associated with that input file
definition. However, you can override a fields formatting in the view.

For more information: See Formatting Views on page 5-20.

You format data fields in the Input File Definition window. To display the
Input File Definition window, click
(Edit File Definition) in the
button bar, or select Edit from the menu bar and choose Input File
Definition.
To set global field formats from the Input File Definition window, double
click a field in the data fields list box. You can then format the field. ACL

4 - 23

Chapter 4

Defining Files and Fields


changes the field area of the Input File Definition window to show the
field definition and format options.

format
dropdown
format
text box

format field
options

prevents
totalling
designates
control
total field

Format Options
When you start using ACL, all numeric and date fields are formatted
according to a default preference setting. The Format dropdown in the
format field area of the Input File Definition applies only to numeric and
date fields. It is initially blank to indicate that the format of that numeric
or date field follows your preference setting. You can keep using the
default preference setting, or select your own.

For more information: You can use a different format option for
your numeric and date fields, by changing the preference settings in
Numeric Options on page 7-15 and Date Options on page 7-11
respectively.

If you wish to use a different format option for certain fields, specify the
format options in the Input File Definition window for each of the fields
you want to change. You can either type your format in the fields/filters
text box or choose a predefined format from the fields dropdown. After
you specify a format, the fields/filters text box shows your selection.

4 - 24

Chapter 4

Defining Files and Fields

Formatting Numeric Fields


For numeric fields, the format describes how the number should appear
as output in reports and printed documentation. You can specify the
default numeric format by selecting Edit from the menu bar and choosing
Preferences. Click the [Numeric Options] tab and choose a format from
the Default Numeric Format dropdown.
By default, ACL displays all numbers using the basic format
of -99999999.99. For example, the number 12,458,211.62 is displayed
as 12458211.62. While this is functional, it is often difficult to separate
the thousands from the millions.
For more information: See Numeric Format on page 6-18.

Formatting Date Fields


For date fields, the format describes how the date should be input. In
other words, this is the format of the date field in the data file. You can
specify the output format for dates by selecting Edit from the menu bar
and choosing Preferences. Click the [Date Options] tab and choose a
format from the Default Date Format dropdown.
For more information: See Date Format on page 6-12.

Column Width
You can modify the width of columns that display the fields in your view.
By default, the Width text box in the Modify column dialog box shows the
width in your field definition. If the field has been previously formatted to
change the column width, the value may be different from the column
width in the Input File Definition window.
To change the width of a column in views or reports, click the column
title, then click
(Modify column) and type a new number in the
Width text box. Width is based on the average character width of the
current font.
ACL knows how large a number can be displayed in a column. If the
number doesnt fit in the column in your view, ACL replaces it with #

4 - 25

Chapter 4

Defining Files and Fields


signs to ensure that the field is not being misread and to indicate that the
fields contents have been truncated.
Here are some reasons you may want to adjust the column width:

The contents of a field are always much narrower than the designated
field width.

The numbers in a field exceed the designated field width. In the View
window, ACL replaces truncated numerical data with # signs.

To include white space in reports.

Your report includes subtotals, but the subtotals are wider than the
default field width (ACL usually leaves an extra three columns just
for this purpose).

A computed or ad hoc field is wider (or much narrower) than the


default width value. To change the default field width of numeric
computed fields or ad hoc numeric expressions, select Edit from the
menu bar and choose Preferences. Click the [Numeric Options] tab
and enter a new value in the Expression Field Width text box.

Changing Column Title


By default, the column title is the same as the field name. You can specify
a more meaningful name.
To change the column heading, in the Modify column dialog box, type a
new name in the Alternate Column Title text box. Column headings can
be split across more than one line. Start each line on a separate line in the
text box.
Column headings are automatically right justified over numeric
columns, and left justified otherwise.

Conditions
If you want the field to be subject to a condition or filter, select Edit from
the menu bar and choose Input File Definition. Click the [Edit fields/
expressions] tab, and double click the field to display the field formatting
options. Either type the condition in the If text box, or click the [If]
button and use the expression builder to construct a condition.
If the text box beside the [If] button contains a value, then the field is
conditional. This means that the field contents are only valid in the given

4 - 26

Chapter 4

Defining Files and Fields

situation. If a filter is already active, then the field is automatically filled in


with the name of the filter and this field has a value only when the filter is
True.
In some situations you may want to supply your own condition, rather
than use the automatic feature just described. In this case you may supply
any valid logical expression in the text box, which might be the name of a
filter or some other logical expression. The [If] button allows you to use
the expression builder to construct this expression.
For more information: This is discussed in more detail in Defining
Computed Fields on page 4-29.

Checkbox Options
A number of checkboxes in the Input File Definition window provide
added functionality to your fields. If the checkbox does not apply to the
particular field youre currently formatting, it appears greyed out.
Check the:

Suppress Totals checkbox to prevent automatic totalling of numeric


fields.
ACL automatically provides totals for all numeric fields in reports.
However, not all numeric fields require totalling. For example, an
item price and a charge account number may be numeric fields, but
totalling these numbers would produce a meaningless result.
If you have a choice of field types, you should choose a non-numeric
field type for these fields, such as ASCII or EBCDIC.

Static checkbox to identify static conditional fields (values that do


not change unless the condition is true). For more information on
static fields, see Defining Computed Fields on page 4-29.

Date checkbox to identify a numeric field, which is not stored in


character format (such as a PACKED date field), as a date.

Select Edit from the menu bar and choose Preferences. Click the [Date
Options] tab. Type a valid date format in the Default Date Format text
box, or click the Default Date Format dropdown and select one of the
predefined formats. In this case, the date format should not contain any
punctuation.

Control Total checkbox to identify the control total field.

4 - 27

Chapter 4

Defining Files and Fields


The input and output totals of the control total field are included in
the file history.
Note:

Control Total is used as a check to verify that files that are used
over a period of time are complete and consistent from one
session to the next. It is also used to reconcile data to external
sources.
Default Filter checkbox for logical fields.
This identifies the logical field as the default filter, which is
automatically activated when the file is opened.

When you are finished formatting the field, click


to accept your
changes and return to the Input File Definition window.
For more information: On conditional fields, see Conditional
Fields on page 8-50.

Working with Computed Fields


A computed field is a virtual field that uses data derived from a
calculation or the result of an ACL command. It does not contain
physical data (data that exists directly in the data file) as in a physical data
field. Computed fields allow you to perform calculations based on
information in the data file, without altering or changing the original data
in any way. For example, you can create a Value field that is based on the
quantity on hand multiplied by the unit cost.
Computed fields are formatted in the same manner as any other data
fields. You can use any valid expression, including parentheses, where
required. As with filters, computed fields can also contain character
strings (such as ABC) or logical (True/False) values.
Computed fields consist of at least a name and a default value. In
addition, you can specify one or more additional values and their related
conditions. Once created, you can refer to computed fields by name as if
they were physical fields. Field names are limited to 31 characters, and
must start with an alphabetic character. Spaces are replaced with the
underscore character.

4 - 28

Chapter 4

Defining Files and Fields

When ACL evaluates a computed field, each condition (if any) is


evaluated from first to last (top to bottom). The value associated with the
first true condition becomes the value of the field. Otherwise, if none of
the conditions are true or there are no conditions, the Default Value is
used as the value of the field.
ACL provides a quick and easy way to build computed fields and
eliminate much of the guesswork. You can save computed field
definitions, and use them again. Computed fields are useful for:

performing simple calculations


indicating meaningful conditions
performing complex calculations
building tables based on specific conditions

Defining Computed Fields


In its simplest form, a computed field is a named algebraic expression. A
classic example is the creation of a Value field that does not actually exist
in an inventory file. This can be calculated as the quantity on hand
(QTYOH) multiplied by the unit cost (UNCST).

Simple Calculations

To add this computed data field to your input file definition, do the
following:
1.

Click
(Edit File Definition) in the button bar or select Edit from
the menu bar and choose Input File Definition. Then click the [Edit
fields/expressions] tab. ACL displays the Input File Definition
window showing the fields/expressions list.

add a new
data field

add a new
expression
computed
field

4 - 29

Chapter 4

Defining Files and Fields


2.

Click the
(Add a new expression) button to display the Input File
Definition window showing the define expression options.

3.

Type VALUE in the Name text box, and UNCST * QTYOH in the
Default Value text box. Press
or click the
(Accept entry)
button.

Once the computed field is defined, you can add it to a view or printed
report, or use it in any command that uses numeric fields.
Meaningful Conditions

4 - 30

You can also use computed fields to indicate meaningful conditions. For
example, you could create a computed field, Error_Test, to display the
message ERROR whenever the inventory recorded value field has a
negative value (in other words, when the default value is False). In all
other instances, the field would display the message OK (Value=True).

Defining Files and Fields

Complex Calculations

Chapter 4

You can define a multi-value computed field with complex calculations.


For example, your company sells a product on which you pay differing
royalty percentages based on location. If the royalties payable are 10% on
European sales, 20% on American sales and 15% otherwise, you could
define a conditional computed field called ROYALTY (with a Default
Value of VALUE * .15) to help simplify your calculations.
The conditions would be based on the Location field (for example,
LOC=03 OR LOC=04 for American sales), and their Values would be
the corresponding Market Value percentage (for example, VALUE * .20
for American sales).

4 - 31

Chapter 4

Defining Files and Fields

Note the following:

Calculations are made more meaningful by building on existing


computed definitions.

The value of ROYALTY takes on a different value for each record in


the file, depending on each transaction's branch location.

Every conditional computed field must include a default value which


is not conditional. This value is shown in the Default Value text box.
For a given record, if all tests fail, the field assumes the default value.

Given the ROYALTY field, you can calculate the total worldwide royalties
payable using the Total command.

4 - 32

Defining Files and Fields


Tables, Code Expansion,
and Interpretation

Chapter 4
In the preceding example, the transactions are coded with a twocharacter field to identify the originating branch. This is typical of most
data files, because short fields are easier to process and take up less space.
However, coded fields tend to make interpretation more difficult.
A typical file might have the branches coded numerically, thus, it may be
difficult to identify the branch for a given transaction.
You can solve this interpretation problem by defining a conditional
computed field, City, with a Default Value of UNKNOWN. The
Conditions would be based on the Location field (for example, LOC=01
for London) and their Values would be the corresponding city (for
example, LONDON).

Note that this definition, like all conditional computed fields, has a
default value that is not conditional.
You can now use the City field to provide more meaningful information
while examining the data with more flexibility. Similar techniques can be
used for all coded information in data files.

4 - 33

Chapter 4

Defining Files and Fields

Maintaining Fields
You can rename or delete a field if it is not referenced by the currently
open view, or used in any computed fields in the currently open file. You
can edit a field to change its formatting, width, column title, and other
field options. Once you create a field, ACL treats the field in the same way
whether it is a data field, a computed field or conditional field. You can
edit, rename and delete these fields in the same way.
Note:

Meaningful Field Names

If you have views or batches that use the old field name, you must
edit those views and batches to reflect your changes.
When naming or renaming fields, use a field name that will help you to
identify the data in the field. You can use up to 31 characters for each field
name.
Field names must contain only numbers, letters, and the underscore
character, and must start with either a letter or an underscore. ACL
automatically replaces spaces with underscores. You can enter names
using both upper and lower case letters.

Reserved Keywords

4 - 34

ACL reserves certain keywords for special purposes. Field names cannot
be the first letter of, or identical to, any of the reserved keywords listed
below. For example, a field name such as A is invalid as it conflicts with
AS. REC conflicts with RECORD. On the other hand, ASK is fine as it
cannot be confused with AS. Dont worry if you dont understand the
meanings of the keywords at this point.
ALL

refers to all previously defined fields

AND

refers to the logical AND operator

AS

allows the output field or expression to be given a


name (which must be specified in quotes)

CANCEL

cancels the current command

specifies a descending sort sequence for the preceding


expression or field name

END

concludes the input stream and acts like a null line

Chapter 4

Defining Files and Fields

Field Types

EXPR

the prefix for the name of a default output field

refers to the FALSE value of a logical expression

NOT

refers to the logical NOT operator

OR

refers to the logical OR operator

PAGE

is used by the Report command to signal a page break


after a certain level

RECORD

refers to the entire input record as it exists

refers to the TRUE value of a logical expression

IF

specifies a filter condition

PICTURE

specifies a format for a numeric field

WIDTH

changes the default print width of a specified field or


expression

SUPRESS

blocks the output of numeric field totals

NOZEROS

causes zero values in a numeric field or report to be


printed, or displayed, as blank

NODUPS

blanks out the repetition of blank key fields in a report

TO

designates an output file for any command

ON

precedes a field list

OTHER

part of the Summarize command

FIELDS

part of the Export, Extract, Join, and Sample


commands

The field type is automatically set to the most likely type. If the displayed
field type is not correct, double click a valid field type in the Valid Field
Types list box. Field types are displayed in descending order of
likelihood, with their corresponding value shown to the right. The field
type you choose is entered automatically in the Type text box.
Alternatively, you can choose a field type from the Type dropdown,
however you must ensure your selection is a valid field type for the field
currently being defined.

4 - 35

Chapter 4

Defining Files and Fields

Date Fields

If you select the DATE field type, you must indicate how the date is stored
in the file. Type the format in the Format text box (for example,
YYMMDD), or click the dropdown and select one of the predefined
formats. See Formatting Date Fields on page 4-25 for complete details
on handling dates.

Numeric Fields

If you select the NUMERIC field type, you should enter the number of
decimals in the Dec text box (even if the number of decimals appears to
be obvious in the data). See Formatting Numeric Fields on page 4-25
for complete details.

Special Characteristics

If the field has any special characteristics (such as a PACKED date field or
a numeric field for which totals are not appropriate), see Formatting
Data Fields on page 4-23 for complete details on how to set these values.
You can rename, delete and change a field definition in the Input File
Definition window. Click
(Edit File Definition) in the button bar or
select Edit from the menu bar and choose Input File Definition to display
the Input File Definition window.
fields/expressions
list box

fields/filters
dropdown

accept entry
clear entry
edit field note
delete fields
add a new
data field

field
area

add a new
expression

ruler
data
area

If the fields/filters dropdown in the top right does not show All fields,
click the dropdown and select All fields to display all the fields in the
fields/expressions list box.

4 - 36

Defining Files and Fields

Chapter 4
To delete a field that is not referenced by the current view, click the field
name in the fields/expressions list box to select it, then click the
(Delete fields) button to delete its field definition.

Deleting Fields

You can select a list of fields for deletion by clicking the first field and then
shift-clicking the last field to select a list of fields. You can select noncontiguous fields by holding down the Ctrl key while clicking the
desired fields.
To change a field definition, double click the name of the field you want to
change in the fields/expressions list box. ACL changes the field area of the
Input File Definition window to show the field format options.

Editing and Renaming


Fields

format
dropdown
format
text box

format field
options

prevents
totalling
designates
control
total field

Information about the field, including its name, field type, length, start
and end positions, and other options are displayed in the appropriate text
boxes.
To rename a field that is not referenced by the current view, type a new
name in the Name text box.
You can change any field option by replacing any information in the
appropriate text boxes with new information, or you can check or
uncheck field options to turn them on or off.
You can change the field type by selecting a new one from the Type list in
Edit fields/expressions dialog box, or by double clicking one of the field
types in the Valid Field Types list box.

4 - 37

Chapter 4

Defining Files and Fields


If a field is referenced by another field or by the current view, you cannot
make changes to your field definition until you first redefine, or delete,
the other field or close the view.
When you are finished making changes, click
or press
complete the process and update the field definition. Click
your changes.

to
to discard

If you close the Input File Definition window without saving your last
field definition, ACL asks if you want to save or discard the changes to
that field. Click [OK] to save your changes.
Note:

4 - 38

Your changes take effect globally. If a field you edited is referenced


elsewhere (such as by computed fields), all other views containing
that field change to reflect your edits.

Working with ACL Chapter 5


This chapter deals with the ACL windows in which you do most of your
work: the Overview, View, and Command Log windows. Also discussed
in this chapter are how to produce reports and other outputs and how to
document your work.

Using the Overview Window


You can use the Overview window to switch between input files, to run
batches and to perform almost all document management tasks.
You can get an overview of the file structure at any time by opening a
document and clicking the
(Overview) button in the button bar.
Alternatively, you can select Window from the menu bar and choose
Open Overview.
The Overview window shows the Batches, Input File Definitions, Views,
Workspaces, and Indexes related to a specific document. Each
component is identified by an icon. The Overview window is the easiest
way to use and maintain all the components in your document. The icon
of any currently open item appears in color while unopened items are
grayed out

Overview Window

click to expand list


open
click to collapse list

currently open
input file definition

duplicate
delete
rename

export to
DOS file

5-1

Chapter 5

Working with ACL


You can click to expand any heading into its list of contents. To
collapse the list click .
You can use the keyboard to navigate in the Overview window. The up
and down arrows will highlight the previous and following item in the
Overview window respectively. You can expand the view of each item
with the right arrow or the plus key; and collapse the list with the left
arrow or minus key. You can open the highlighted item by pressing Enter.
You can delete the highlighted item with the Delete key. You can also use
the Home, End, Page Up, and Page Down keys to move up and down in
the Overview window.
In addition to showing the contents of your document, you can use the
drag-and-drop or point-and-click shortcuts in many of the document
management commands you commonly use.
The buttons in the Overview window include:
(New) button

To create an item, click Batches, Input File Definitions,


Views, Workspaces, or Indexes and click
(New).
(Open) button

To open an item, do one of the following:

Note:

Click the name of an item or its associated icon and click

Double click the name of an item or its associated icon,

Drag and drop the name of an item or its associated icon onto
, or

Drag and drop the name of an item or its associated icon onto
the application workspace.

If you select a view located under its input file definition, both that
view and its corresponding input file are opened. To open a view
using the current input file definition, choose one of the views
located under Views.

(Close) button
To close an item, select the item and click
onto
.

5-2

(Duplicate) button

, or drag and drop it

Chapter 5

Working with ACL


To duplicate an item, select the item and click
it onto
.
Note:

, or drag and drop

If you duplicate an input field definition, ACL displays a


message box asking if you want to copy or share the field
definitions. If you share the field definitions, changes to a field
in either file are reflected in the other file. If you copy the
definitions, the fields start out the same, but change
independently.
(Delete) button
To delete an item, select the item and click
, or drag and drop it
onto
. You cannot delete any item that is currently open.

Note:

Be careful when deleting input file definitions! If the Delete Data


File with Input preference is turned on, ACL also deletes the
source data file. This is a fast way of removing unwanted files
from your computers hard disk, but it will prevent you from
accessing the data in the future.
(Rename) button
To rename an item, select the item and click
, or drag and drop it
onto
. You can also click the name of a selected item to display the
name in a text box for you to rename it in place.

(Import from DOS file) button


To import a batch, input file definition, view or workspace from
DOS, select Batches, Input File Definitions, Views,
Workspaces, or Indexes, as appropriate, and click
, or
drag and drop it onto
.
ACL displays the Document dialog box with options for locating the
item to be imported. After locating the item you want to import, click
[OK]. ACL copies the items into your current document.

(Copy from another document) button


To copy a batch, input file definition, view or workspace from
another document, select Batches, Input File Definitions,
Views, Workspaces, or Indexes, as appropriate, and
click
, or drag and drop one of them onto
.
ACL displays the Locate Document File dialog box with options for
locating the document from which items are to be imported. After
locating the document, click [OK].

5-3

Chapter 5

Working with ACL


ACL displays the Import dialog box. Move the items you want to
copy in the From list box to the To list box and click [OK]. ACL
copies the items into your current document.

The

(Export to DOS file) button

To export any item (except an index) to DOS, select the item and
click
, or drag and drop it onto
. ACL displays a dialog box
with options for saving the item to disk.

Working with Views


A view is a way of arranging the data in your input file in order to look at
or print it. You can create many different views for each input file. Views
can contain any or all of the fields in the input file, can be arranged in any
order, and can be formatted as desired without affecting other views or
the data itself.
A view contains a number of columns. A column can contain the data
from a field, or it can contain a valid expression. While a column may
contain the data from a field, a column is not the field itself. Changes you
make to the column format affect only the column, not the field.

Copying a View
1.

From Another Document

Note:

5-4

To copy a view from one document to another, either:

In the Overview window, select Views and click


(Copy from another document), or

Select Window from the menu bar and choose Open View to
display the Select View dialog box. Click [Copy From].

2.

ACL displays the Locate Document File dialog box. Select a


document from the list and click [OK].

3.

ACL displays the Import dialog box, allowing you to choose which
view(s) to import. When you are finished making your selection,
click [OK].

4.

ACL imports the views into your current document.

If any columns in the view refer to fields that do not exist in the
current input file, an alert is displayed.

Chapter 5

Working with ACL


From Another Input File

You can also copy a view from another input file within the current
document, if the input file has similar fields, by either:
1.

In the Views list of the Overview window, select one of the views
whose input file definition does not correspond to the current input
file and click
(Open), or

2.

Select Window from the menu bar and choose Open View to display
the Select View dialog box. Check the Show Views for all Input Files
checkbox. ACL displays all the views for all input files in the
document. Beside the name of each, in brackets, is the name of the
input file to which it relates. Select a view and click [OK].

If any of the fields in the view are invalid for the current input file, ACL
displays an error message and excludes them from the view.

Displaying a View
To look at a view at any time, do one of the following:

Using the Overview window, select the name of a view located under
its corresponding input file and click
(Open), or

Open the appropriate input file. Select Window from the menu bar
and choose Open View, or click the
(Select view) button on the
button bar.
ACL displays the names of views that apply to the current input file,
along with command buttons for performing a variety of tasks. The
view you are currently working with is highlighted in the Select View
dialog box.
Select a view from the list and click [OK]. ACL displays the selected
view.

Note:

When a view that has undefined fields (due to the deletion of a


field or expression, or changing field names) is opened, ACL
displays a dialog box listing the errors. Either click [Cancel] and
redefine the input file, or click [OK] to continue working with the
modified view.

5-5

Chapter 5

Working with ACL

Creating a View
When you first define data fields, ACL automatically creates and displays
a view containing all the fields you defined.
1.

2.

You can create a view by either:

Selecting
(New), or

(Views) in the Overview window and clicking

Selecting Window from the menu bar and choosing Open View,
or clicking
(Select view) on the button bar. ACL displays the
Select View dialog box with options for selecting a view. Click
[New].

ACL displays the Add Columns dialog box.


Double click fields, or select a field and use the [] and [] arrows to
move fields between the Available Fields column and the Selected
Fields column.
Alternatively, you can click [Add All] to select all available fields and
move them to the Selected Fields column. If you make a mistake,
click [Clear All] to clear all entries from the Selected Fields column.

3.

You can also include expressions to create values that do not exist
directly in the data by clicking [Expr] and using the expression
builder.
For more information: On expressions, see Building
Expressions on page 6-1.

4.

When you are finished selecting data fields, click [OK].

ACL displays a view, called Untitled, containing the data fields you
selected. When you close the view, ACL prompts you to save the view or
click [Discard] to discard your changes. Give the view a meaningful
name that identifies the contents and click [OK].
Note:
View Window

When you delete an input file, the view named Default_View


associated with the input file is also deleted.
A view shows the following information:

5-6

Records in order filtered records are shown in gray. If the Hide


Filtered Records preference is turned on, filtered records are hidden
from view.

Chapter 5

Working with ACL

Defined columns each column appears separately. By default, the


column heading is the name of the field or expression.

The subtotal break bar the subtotal break bar is a thick vertical line
that appears between the record number column and the first data
field column.

A value for each column in a record.


column
headings

filter dropdown

edit the filter expression


go to next
unfiltered record
create a report
add view notes
add a field
subtotal break bar

change the font


record separator

A view has several purposes. It allows you to:

view data on the screen in a readable format, and to scan and review
the contents of the data file

format and print basic listings (print the view)

design the layout for a fully formatted report

Using the View window, you can:

Click the
(Edit view filter) button to create or edit a filter.
Alternatively, you can type the name of a filter or an expression in the
filter text box at the top of the window, or click the dropdown and
choose a previously active filter.
Click

to apply the filter or

to remove it.

Click the
(Go to next unfiltered record) button to display the
next unfiltered record in the view.

Click the

Click

(Report) button to create a report.


(Edit view note) to add or edit notes about the view.

5-7

Chapter 5

Working with ACL

Click the
(Add columns) button to add a defined field or
expression to the view.

Click
(Modify column) to modify the way columns are displayed
in the view. This is the same as double clicking a column heading.

Click
(Delete columns) to delete selected columns from the view.
You may also delete the selected column by pressing the delete key.

Click

Drag and drop columns to rearrange their order.

Use the vertical scroll bars to move up and down through the
records.

Use the horizontal scroll bars to move left and right through the
columns.

Click and drag on the right edge of a column to change its width.

Click and drag on the record separators in the record number


column to create a multiline view.

Click and drag the subtotal break bar to set subtotalling break fields.
The break fields must be the leftmost columns and they must be
character fields.

(Change font) to change fonts in the view.

Page Width Indicator


Views may show a dotted line on the right side to indicate the page width.

page width indicator

ACL will print only data to the left of the page width indicator.
Notice when you change the page orientation to landscape or change the
page margins, the page width indicator adjusts accordingly.

5-8

Chapter 5

Working with ACL


To change to landscape, do the following:

Click the

(Report) button. ACL displays the Report dialog box.

Click [Setup] to display the Page Setup dialog box.

Select the Landscape radiobutton, and click [OK].

Click [OK] again to close the Report dialog box.

Click [OK] to print the report or [Cancel] to return to the view in


landscape format.

The page width indicator moves to the right to display at the appropriate
place for a landscape page width.
For more information: See View Options on page 7-7 to turn off
the page width indicator.

Changing a View
Each column in a view represents a defined field or an expression. You
can add, delete or modify columns in a view.
Creating New Views

When you change a view, ACL prompts you to save the changes when you
close the view. You can create as many different views as you like by
saving them with a new name. Each view can contain only those data
fields required for a particular purpose.
For example, if you are working on a large inventory file, you can create
one view showing fields related to costs, and another view showing the
product description, quantity, etc.

Deleting a Column From a View


When ACL initially creates the Default_View, all the defined data fields
are shown in vertical columns (up to a maximum of 256). If you have
defined a number of fields, you may be unable to see them without
scrolling back and forth across the view.
To view a subset of the defined fields, you can easily delete specific
columns from the view by doing the following:
1.

Display the view for an open document.

5-9

Chapter 5

Working with ACL


2.

Click the headings to highlight the columns you want to remove.


Select a block of columns by clicking the header of the first column
and Shift -clicking the header of the last column. Use Ctrl -click to
select non-adjacent columns.

3.

Click
, or press the delete key, to delete the selected column(s).
ACL prompts you to confirm that you want to delete the selected
column(s).

4.

Click [Delete]. ACL removes the columns from the view.

Note:

When you use the above method to create a selected view from a
large selection of columns, it may be wise to save the new view
under a new name. This will save having to reinsert a large number
of columns at a later date.

Note:

Deleting a column from a view does not delete the field definition
from the input file definition. If you subsequently want to include
the data field in the view, you can reinsert the column.

Adding a Column to a View


You can add one or more columns to the view for fields that have been
previously defined, or for computed fields or unnamed ad hoc
expressions.
To add a column to the view, do the following:

5 - 10

1.

Display the view for an open document.

2.

Select the location for the additional columns by clicking the heading
of a column in your view. The additional columns are added to the
immediate left of the highlighted column. If no column is selected,
the additional columns are added after the last column on the right.

Chapter 5

Working with ACL


3.

Click

to display a list of data fields.

click to add fields


click to remove
fields
click to add all
fields
click to remove
all fields
click to edit a
selected field
click to create a
computed field

Double click fields, or select a field and use the [] and [], to move
fields between the Available Fields list box and the Selected Fields list
box.
Click [Add All] to select all available fields and move them to the
Selected Fields column. To delete a field from the Selected Fields box,
double click it. To clear all entries, click [Clear All].
4.

To add an expression or a new computed field, click [Expr] to


display the expression builder.
For more information: For details on using this dialog box, see
Expression Builder on page 6-1.
To edit one of the fields in the Selected Fields column, highlight it
and click [Edit] to display the expression builder.

5.

When you are finished selecting data fields, click [OK].


ACL adds the fields in the Selected Fields list box to the view.

Rearranging Columns
Use the drag and drop capabilities of ACL to rearrange columns as
follows:
1.

Display a view for the current input file.

2.

Point to the column heading of the column you want to move. Press
and hold down the mouse button; a hand
appears.

5 - 11

Chapter 5

Working with ACL


3.

Drag the hand to the new position and release the mouse button near
the boundary between two columns. The column is placed between
those columns.

Changing Column Width


Changing the width of columns in a view is most easily done by dragging
the line that separates two columns to a new position, as follows:
1.

Display a view for an input file.

2.

Point to the right column separator (vertical line) in the heading area
of a column.
When you are positioned directly over the separator, the pointer
changes to a thick, double-headed arrow.

3.

Click and drag the line to make the column narrower or wider.

Alternatively, you can click the


(Modify column) button to display
the Modify column dialog box and enter a number in the Width text box.
Click [OK] and the view instantly reflects the new column width.

Specifying Break Columns


When you are formatting a view for a report, you can specify the columns
to be used as break columns. Subtotals are automatically generated on
these break columns every time their value changes. This procedure only
affects reports and does not affect the way a view displays or prints.
1.

Rearrange the order of the columns so that your break columns are
adjacent to each other, starting with the leftmost column. All break
columns must be of character type.

2.

Move the pointer to the column heading area on top of the subtotal
break bar, which is a thick vertical line located between the record
number column and the first column in the view. The pointer
changes to
. Ensure that you do not choose
, which is used for
changing column widths.

3.

Drag the break bar to the right of the last column you want to
include.

If the break bar does not move as far to the right as you expect, this is
probably because you are trying to include a non-character column.

5 - 12

Chapter 5

Working with ACL

For more information: See STRING( ) on page 4-73 in the ACL for
Windows Reference Manual for details on how to convert numeric data to
characters for use as a key field.
Note:

ACL expects the columns to the left of the break bar to be sorted. If
you havent explicitly sorted these break columns using the Sort
command, you can have ACL sort them for you by checking the
Presort checkbox in the Report dialog box.

Formatting Columns in a View


Formatting columns in a view is much the same as defining global field
formats, however your changes apply to the specific column only. The
formatting overrides any global formatting done when defining data
fields.
For more information: See Formatting Data Fields on page 4-23 for
more information on defining global field formats.
Note:

You cannot change the field type in the Modify column dialog box.
To change a field type, use the Input File Definition window.
For more information: See Defining Data Files on page 4-4.

5 - 13

Chapter 5

Working with ACL


To format columns in a view, do the following:
1.

Display the Modify column dialog box by either double clicking the
column header or selecting the column and then clicking
.
column value
identifies
sorted data

sort order
identifies break
columns
format text box

suppress
numeric totals
blank out
zeros

2.

The columns value is displayed in the Column Contents text box.


To change the column value to any valid field or expression, click
[Column Contents] and use the expression builder or type an
expression in the column value text box. Modify the column value as
desired.

3.

Change the column name by typing a new name in the Alternate


Column Title text box.

4.

For numeric fields, if the default format is in effect, the text box is
blank. You can type a new format in the Format text box, or choose a
predefined format from the Format dropdown. This will override
any defaults set in the field definition.
For more information: See Formatting Numeric Fields on page
4-25 for details on the available alternatives.

5.

5 - 14

To change the column width, you can enter a number in the Width
text box. Alternatively, you can drag the column separator in the
view, as described previously.

Chapter 5

Working with ACL


6.

The Print Options section applies only to reports. It does not affect
the way ACL displays date formats.

If you want this column to be sorted, make a choice from Sort


Key Column checkbox. This indicates that the data is either
already sorted, using the Sort command, or that you want ACL
to sort it for you.

Note:

If you want ACL to sort the column for you, you must check the
Presort checkbox in the Report dialog box.

Note:

Where there is more than one presorted column, they are sorted
from left to right.

If the column is designated as a sort field, you must indicate the


sort order for the column. Select either the Sort Ascending or
Sort Descending radiobutton.

To have ACL produce a subtotal each time the value of a


specified column changes, check the Break Column checkbox.
Break columns must be specified as sorted. If you dragged the
break bar to designate the column as a break field (see
Specifying Break Columns on page 5-12), the Sort Key
Column checkbox is already checked.
Break columns must be the leftmost columns in the view, and
must be sorted.

Note:
7.

Check the Page Break checkbox to have ACL insert a page break
each time a break column changes value.

To suppress printing duplicate key fields, check the Suppress


Duplicates checkbox.

By default, ACL totals all numeric columns. To suppress the


totals for a numeric column on your report, select the column
and check the Suppress Totals checkbox.

To suppress zero values for numeric fields, check the Blank if


zero checkbox. This lets you easily see the important non-zero
values in your report.

This option affects both the view and the printed report.
When you are finished, click [OK] to close the Modify column dialog
box.

ACL changes the view according to the column formatting specifications.

5 - 15

Chapter 5

Working with ACL

Changing the Font


The font is applied to specified area of a view or report. You cannot
change the font for just a single column, column title, record, or total. For
example, if you change the font for a column title, you will change the font
for all column titles in that view or report.
You can specify different fonts for titles and data for the View window
and reports. You can also change the font for the header, totals, and
footer in reports.
You can change fonts as following:
1.

In the View window, click


dialog box.

. ACL displays the Select View Fonts

preview of font

2.

5 - 16

Click [Header], [Titles], [Data], [Totals], or [Footer] to display the


Font dialog box and change the font for the area you have selected.
Alternatively, you can simultaneously change all the fonts by clicking
[All].

Chapter 5

Working with ACL

Notice that when you select a font, the Sample box displays a
preview.
Note:

Only the fonts installed on your computer are available.

3.

Select a font for the display that suits you and click [OK] to return to
the Select View Fonts dialog box.

4.

Click [OK] again to apply your changes to the view.

The default font for the header and footer is the same as the data in the
View window.

Constructing Multiline Views


ACLs multiline capability allows you to rearrange your views to more
closely approximate the way you want your final reports to look.
move column
headings to
new lines
OR
move data
cells to
new lines

record number column

topmost line

drag to suppress
header printing

5 - 17

Chapter 5

Working with ACL


To add or delete one or more rows, drag any horizontal line in the record
number column, as follows:

If you drag downwards, rows are added to the bottom of both the
column heading and data cell areas.

If you drag upwards, rows that you previously added are deleted
from the bottom of both the column heading and data cell areas. You
can only delete blank rows.

The exception to the rule is the topmost line in the record column:

Note:

If you drag downwards, rows are added to the top of both the column
heading and data cell areas.

To delete a blank row located above the column headings and data
cells, click the line in the record column located just above the first
column heading and drag upwards.

You cannot add or delete blank rows from only the column heading
area or data cell area. You can only add or delete rows from both
areas simultaneously.
To rearrange your column headings, click in a column heading and drag
it to a new line. When you release the mouse button, the column heading
snaps to the leftmost side of the line. To push the column to the right,
drag its left hand column divider
To suppress the printing of headings drag the thick black dividing line,
located between the column headings and the vertical scroll bar, upwards
to cover those column headings you do not want to print. You must leave
a heading of at least one line (which may be blank).

Printing a View
To print a view at any time, do the following:
1.

Display the view you want to print as the active window.

2.

Click
in the button bar, or select File from the menu bar and
choose Print. ACL displays the Print dialog box.
To specify other printing options, click [Setup] to display the Page
Setup dialog box. Select a printer, page orientation, and paper size.
Click [OK] to return to the Print dialog box.

3.

5 - 18

Specify the print range and click [Print] to print your view to the
default printer.

Chapter 5

Working with ACL


Note:

Printing a view is different from printing a report. Printing a view


produces a relatively plain output with little formatting and no
subtotals. Printing a report provides full formatting.
By default, ACL provides half inch margins around the page. You can
change these margins by selecting Edit from the menu bar and choosing
Preferences. Click the [Print Options] tab and change the values in the
Margin text boxes.

Maintaining Views
Use the Overview window to duplicate, rename, and delete views.
Duplicating Views

To duplicate a view:
1.

Click the view you want to duplicate.

2.

Click

ACL displays a dialog box informing you that the view has been
duplicated.
Renaming Views

To rename a view:
1.

Click the view you want to rename.

2.

Click

ACL displays a dialog box with the current name of the view
highlighted in the text box.
3.
Deleting Views

Type a new name for the view and click [OK].

You cannot delete the current view. You can delete a view that is not
open:
1.

Click the view you want to delete


ACL displays a dialog box prompting you to confirm you want to
delete the selected item.

2.

Click [Delete] to delete the view, or click [Cancel].

5 - 19

Chapter 5

Working with ACL

Producing Reports
Reports in ACL are based on views. The report specifications are saved
as part of the view. You may want to use names for your report views that
readily identifies them as reports, and indicates each reports content.
You can produce reports in both printed or HTML (HyperText Markup
Language) format for use on World Wide Web pages.
There are three steps to producing a formatted report:
1.

Format the view.

2.

Design the report layout.

3.

Preview and/or print the report.

If you want to run a report again, open the view using the Overview
window, or by selecting Window from the menu bar, and choosing Open
View. When you click
(Report), the report specifications from the
last time you used the view are displayed in the Report dialog box.

Formatting Views
The first step in creating a report is to format a view. This includes adding,
deleting and arranging the columns as desired, changing the fonts, and
formatting the columns. It also includes specifying the key columns for
sorting, and determining other sorting and subtotalling characteristics.
For more information on formatting your view, see Changing a View
on page 5-9.
To change the way dates are displayed in your report, you must change
the preference settings.

Date Format
Note:

5 - 20

Changing the date preferences will change the way dates are
displayed throughout the document:
1.

Select Edit from the menu bar and choose Preferences.

2.

Click the [Date Options] tab and enter the desired values in the
Day, Month, and Year text boxes, or click the Default Date Format
dropdown and choose one of the predefined formats.

Chapter 5

Working with ACL

Suppress Duplicates
You can create clearer presentations of your analysis by choosing not to
display duplicates in your reports. You can only suppress duplicates for
break fields.
For example, you may have a report where the br and gl break fields are
repeated on each detail line:
Page ..
2
03/20/98 16:05:23
Produced with ACL by: ACL Software
br gl

batch date

22
22
22
22
22
22
22
22

30008
99999
30000
99999
30020
30072
30078
99999

101
101
101
101
101
101
101
101

10/31/84
10/31/84
11/30/84
11/30/84
12/31/84
12/31/84
12/31/84
12/31/84

amount dp t co
-458364.86
426245.51
-426245.51
1317226.78
-1317226.78
404302.85
-808605.70
404302.85

22 101

-458364.86

22

-458364.86

23
23
23
23
23
23
23
23
23
23
23

101
101
101
101
101
101
101
101
101
101
101

30001
30008
30000
30054
99999
99999
30000
99999
30020
30054
99999

10/31/84
10/31/84
11/30/84
12/31/84
12/31/84
10/31/84
11/30/84
11/30/84
12/31/84
12/31/84
12/31/84

T
S
T
S
T
T
T
S

01
01
01
01
01
01
01
01

124840.80
T 01
124840.80
T 01
-124840.80
T 01
-367876.39
T 01
367876.39
S 01
-204390.04 13 S 01
204390.04 13 T 01
-86864.53 13 S 01
86864.53 13 T 01
80159.78 13 T 01
-80159.78 13 S 01

23 101

124840.80

23

124840.80

You can use the Suppress Duplicates option to make your report clearer
by printing the br and gl fields only when they first appear in the report.
To use the Suppress Duplicates option, you must first prepare your data
by designating the key fields and checking the Suppress Duplicates
checkbox.

5 - 21

Chapter 5

Working with ACL


To designate key fields, do the following:
1.

In the view, move the columns for which you want to suppress
duplicates farthest to the left.

2.

Either use the Sort command to sort the columns or check the
Presort checkbox in the Report dialog box.

3.

Drag the break bar to the right of the columns to designate them as
break fields.

For more information: See Specifying Break Columns on page 5-12


and Formatting Columns in a View on page 5-13.
To turn on the Suppress Duplicates option, do the following:

5 - 22

1.

Double click the break field header, or highlight the break field and
click
(Modify column). ACL displays the Modify Column dialog
box.

2.

In the Modify column dialog box, check both the Break Column and
Suppress Duplicates checkboxes.

3.

Click [OK] to close the Modify Column dialog box.

4.

Click

5.

Click [Preview]. Your report now looks similar to this:

in the view to display the Report dialog box.

Chapter 5

Working with ACL


Page ...
2
03/20/98 16:09:56
Produced with ACL by: ACL Software
br gl

batch date

22 101 30008
99999
30000
99999
30020
30072
30078
99999

10/31/84
10/31/84
11/30/84
11/30/84
12/31/84
12/31/84
12/31/84
12/31/84

amount dp t co
-458364.86
426245.51
-426245.51
1317226.78
-1317226.78
404302.85
-808605.70
404302.85

22 101

-458364.86

22

-458364.86

23 101 30001
30008
30000
30054
99999
99999
30000
99999
30020
30054
99999

10/31/84
10/31/84
11/30/84
12/31/84
12/31/84
10/31/84
11/30/84
11/30/84
12/31/84
12/31/84
12/31/84

124840.80
124840.80
-124840.80
-367876.39
367876.39
-204390.04
204390.04
-86864.53
86864.53
80159.78
-80159.78

23 101

124840.80

23

124840.80

13
13
13
13
13
13

T
S
T
S
T
T
T
S

01
01
01
01
01
01
01
01

T
T
T
T
S
S
T
S
T
T
S

01
01
01
01
01
01
01
01
01
01
01

Notice how much clearer your report is when the br and gl fields are
not repeated with each description line.

Blank if Zero
You can suppress zero values to help you to quickly focus on the nonzero values with the Blank if zero Option.
Note:

This option affects both the View and the printed report.
To suppress zero values for a numeric field, do the following:
1.

Double click the field header for a numeric field, or highlight the field
and click
(Modify column) to display the Modify Column dialog
box.

2.

Check the Blank if zero checkbox and click [OK] to close the Modify
Column dialog box.

5 - 23

Chapter 5

Working with ACL


Notice that the view no longer displays zero values for that field. If you
check the Blank if zero checkbox, zero values are not printed in your
reports.

Designing Report Layouts


When you are finished formatting the columns in a view, you can design
the layout of your report. Click
(Report) to use the Report dialog box
to format report pages.

filter condition
detail line spacing
check to sort key fields
check to summarize
key fields
check to suppress
blank detail lines

click to set up printer

click to preview report

Header

If you want a header at the top of your printed report, type the text in the
Header text box. The header can be one or more lines, and as long as you
require. ACL automatically centers the header on the report.

Footer

If you want a footer at the bottom of your printed report, type the text in
the Footer text box. The footer can be one or more lines, and as long as
your require. ACL automatically centers the footer on the report.

Condition

As an option, you can type a condition in the If text box, or click [If] and
use the expression builder to create a condition or local filter for your
report.
You can have both a global filter and a local filter in effect at the same
time. For example, you might have a global filter set for your view that
includes only inventory records for product class 8. You may want to use

5 - 24

Chapter 5

Working with ACL

a local filter so that your report includes only items in product class 8 that
have a large value.
As with all local filters, the condition only affects the contents of the
report. It does not affect the view.
Presort

Check the Presort checkbox to ensure that the report is sorted correctly
before printing. Leave the box unchecked if you are sure of the sort order.

Summarize

Check the Summarize checkbox to produce a summarized report that


includes only subtotals for each of the key fields you specified, as well as
totals.
Note:

By default, reports are single spaced. Use the dropdown on the lower right
side of the Report dialog box to choose two or three spaces between each
detail line.

Detail Line Spacing

Note:
Suppress Blank Detail
Lines

No detail lines are included.

This option does not apply to a summarized report.


Check the Suppress blank detail lines checkbox when you want ACL to
print reports without extra blank lines. This is especially useful in
multiline reports where some fields are blank. For example, a data file
may have three lines for a street address but the second and third lines are
usually blank. You can use the suppress blank detail lines option to
remove the blank address lines.
Another example is when you have many key fields and you do not want
to see the repetitive key fields cluttering the report. To see the difference
between before and after using the Suppress blank detail lines option, do
the following:
1.

You must first construct a multiline view.


For more information: On building multiline views, see
Constructing Multiline Views on page 5-17.

2.

When you have constructed a multiline view, leave the repetitive key
fields on the first line and move the other fields to the second line. In
our example, you would leave the br and gl fields on the first line and
move all the other fields to the second line. Make sure you use the
Suppress Duplicates option for the break fields.

3.

Click

in the view to display the Report dialog box.

5 - 25

Chapter 5

Working with ACL


4.

Leave the Suppress blank detail lines checkbox unchecked to see


what your report looks like without this option.

5.

Click [Preview]. Your report looks similar to this:

Page ...
1
03/22/98 09:07:20
Produced with ACL by: ACL Software
br gl
batch

amount date

dp t co

01 101
70005

-6448.95 10/31/84

T 01

70016

-4800.00 10/31/84

T 01

70016

-2785.00 10/31/84

T 01

70017

-10846.21 10/31/84

T 01

30001

-124840.80 10/31/84

T 01

30012

0.10 10/31/84

T 01

30012

0.50 10/31/84

T 01

30012

-18.98 10/31/84

T 01

30012

-51.26 10/31/84

T 01

30012

-7.47 10/31/84

T 01

30012

-4.80 10/31/84

T 01

Notice that even though the repeating br and gl fields are suppressed,
they still occupy a blank line as you did not use the Suppress blank
detail lines option.

5 - 26

6.

Click [Close].

7.

Click

8.

This time, check the Suppress blank detail lines checkbox.

in the view to display the Report dialog box again.

Chapter 5

Working with ACL


9.

Click [Preview]. Your report now looks similar to this:

Page ...
1
03/22/98 09:07:20
Produced with ACL by: ACL Software
br gl
batch
01 101
70005
70016
70016
70017
30001
30012
30012
30012
30012
30012
30012

amount date

-6448.95
-4800.00
-2785.00
-10846.21
-124840.80
0.10
0.50
-18.98
-51.26
-7.47
-4.80

dp t co

10/31/84
10/31/84
10/31/84
10/31/84
10/31/84
10/31/84
10/31/84
10/31/84
10/31/84
10/31/84
10/31/84

T
T
T
T
T
T
T
T
T
T
T

01
01
01
01
01
01
01
01
01
01
01

The blank br and gl fields are now suppressed.

Printing a Report
Click
(Report), in the Report dialog box, click [Setup] to display the
Page Setup dialog box, which lets you specify printing options, such as
printer name, page orientation, and paper size and source.

Page Setup

Note:

These options are specific to the current report only.


To specify the margins for a report, select Edit from the menu bar, choose
Preferences and click the [Print Options] tab. Margins are measured in
hundredths of an inch from the edge of the page. For example, entering a
value of 100 specifies a margin of one inch. Type a new value in each of the
margin text boxes.

Margins

Note:

Because they are set as preferences, the margins you specify apply
to everything you print in ACL.
For more information: See Margins on page 7-18..

Report History

To include the report history when you print a report, select Edit from the
menu bar and choose Preferences. Click the [Print Options] tab and
check the Print File History with Reports checkbox. Check the Include
View Note in Report History checkbox to include any notes associated
with the view.

5 - 27

Chapter 5

Working with ACL


In the Report dialog box, click the [Output] tab to display the Report
output options. Choose whether to print a report, save it to a file or
display it to the screen by clicking the appropriate radio button. You can
also save the report to a file by typing a name in the Name text box.

Output

For more information: On using the [Output] tab, see Producing


Other Output on page 5-32.
Note:

When sending a report to a file or displaying it on the screen,


formatting is not preserved.
You can choose to save a report as a text file or an HTML (HyperText
Markup Language) file which you can use in World Wide Web pages. All
Web browsers can read files in HTML format. This new feature allows
you to prepare your ACL reports to be distributed or published via the
World Wide Web. ACL generates HTML files in HTML 3.0 format.

HTML Output

To produce a report in HTML format, do the following:

Note:

5 - 28

1.

In the Report dialog box, click the [Output] tab to display output
options.

2.

Click the File radiobutton to specify output to a file.

3.

Click the File Type dropdown and select HTML Text File as your
output.

4.

In the Name text box, type a name for the HTML output file.

5.

Click [OK] to create the HTML file.

Since most ACL report output is in table format, a Web browser that
support tables, such as Netscape 3 or higher, Internet Explorer 3 or
higher, etc., is required to view the output.

Chapter 5

Working with ACL

Print Preview
To preview your report before printing, click [Preview].

view next page


view previous page
view last page
zoom in or out
print report
close preview
click white space to
zoom in or out

ACL displays a view of your report, laid out with the orientation and page
size you specified in the Page Setup dialog box.
Note:

Preview is available only if you select print as the output option.


Click [Next] to view the next page, [Previous] to view the previous page,
or [Last Page] to jump to the last page of your report.

Note:

Truncated numeric fields (which are replaced by # signs in the view)


appear in full on the print preview screen and on your printed
reports. To ensure that printed numeric fields are not truncated, ACL
uses the surrounding white space or margin. This feature avoids
discrepancies, however your data may not appear properly aligned.
To magnify the print preview, place your cursor over the preview page of
your report. Your cursor changes to a magnifying glass with a plus inside.
Click the area of the page you want to zoom.
Place your cursor over the maximized preview section of your report.
ACL changes your cursor to a magnifying glass with a minus inside. Click
the preview to minimize your report to one page on the screen.
Alternatively, click [Zoom In], which changes to [Zoom Out]. Click the
page or click [Zoom Out] to minimize your report.

5 - 29

Chapter 5

Working with ACL


If you are satisfied with the way your report looks, click [Print] to send it
to a printer. Otherwise, click [Close] and continue working with your
data.

Page Numbering

ACL automatically numbers the pages in your report when it is printed.


Page numbers appear in the upper left hand corner of each page.

Date and Time Stamping

ACL automatically date and time stamps your report. The date and time
stamp appear in the upper right hand corner of each page.

Summary of Formatting Options


The following table summarizes the report formatting features available,
and the dialog box or option used to define them.
Formatting Feature

Dialog Box or Option Used

Add column
Delete column
Rearrange column
Add a computed field
Change font
Column heading
Column width

Click
in the View window
Click
in the View window
Drag and drop column in the View window
Click
in the View window
Click
in the View window
Click
in the View window
Drag column separator in the View
window
Click
in the View window

Numeric formatting
Sort key column
Sort order of column
(Ascending; Descending)
Suppress totals
Break column
Page break
Suppress Duplicates
Header
Footer
Filter condition
Presort
Summarize

5 - 30

Click
Click

in the View window


in the View window

Click
Click
Click
Click
Click
Click
Click
Click
Click

in the View window


in the View window
in the View window
in the View window
in the View window
in the View window
in the View window
in the View window
in the View window

Chapter 5

Working with ACL

Formatting Feature

Dialog Box or Option Used

Suppress blank detail


lines
Detail line spacing
Date format

Click

Paper size
Paper source
Margins
Page numbering
Date and time stamp

in the View window

Click
in the View window
[Date Options] tab in the
Preferences dialog box
Click [Setup] in the Report dialog box
Click [Setup] in the Report dialog box
[Print Options] tab in the
Preferences dialog box
Automatic
Automatic

Creating a New Report


You can create a report from a new view. When youve created the view,
format the fields and pages of your report as described in this section.
Save the new view with an appropriate name.
For more information: See Creating a View on page 5-6 for details.
You can also create a report based on an existing one. Display the view
and format it for your new report, changing the view as required. When
you close the View window, ACL prompts you to save your new view. If
you give it a new name, ACL leaves the original view and report
specifications intact.
As an alternative, you can select a source view in the Overview window,
click
(Duplicate), and then modify the copy.

Maintaining Reports
Because reports are based on views, you can rename, duplicate, and delete
reports by managing the views with which they are associated.
For more information: See Maintaining Views on page 5-19.

5 - 31

Chapter 5

Working with ACL

Producing Other Output


The choices for outputting your data can be found by clicking the
[Output] tab in any command or dialog box in which it appears.

output to printer
save to file

output to screen
output to graph

Depending on the particular command, you can choose to:

display your data to the screen by clicking the Screen radiobutton

print your data by clicking the Print radiobutton

display your data to the screen as a graph by clicking the Graph


radiobutton

save your data to a file by clicking the File radiobutton

You can type a name for the file in the Name text box. Alternatively, you
can click [Name] to display a Save File As dialog box with options for
naming the file and locating a directory in which to save it.
In many commands, you can include a header and/or footer with your
output by typing one in the Header and Footer text box, respectively. If
you need more than one line, click either [Header] or [Footer] to display
a scrolling dialog box.
Output options that do not apply to a particular command appear grayed
out.

5 - 32

Chapter 5

Working with ACL

Graph Output Option


You can create graphs of Histogram, Stratify, Classify, and Age command
results.
Note:

ACL stores your output setting only for the duration of the session.
When you restart ACL, the output option for that command is the
default setting.
ACL produces character-based output for commands, as before.
However, you can now create graphs of these commands by double
clicking the text output in the command log.

Graphing Histogram Results


When you execute the Histogram command, the display automatically
defaults to graph.
To display a graph of Histogram results, do the following:
1.

Select Analyze from the menu bar and choose Histogram.

2.

Select a field name from the dropdown.

3.

Enter a maximum and minimum value in the text boxes for numeric
fields.

4.

Click [OK]. ACL displays the result in a default 3D bar graph:

edit graph properties


print graph
rotate pie graph
copy graph to .bmp file
copy graph to clipboard
edit the command

grid lines

command description

5 - 33

Chapter 5

Working with ACL

For more information: On displaying different graph types or


formats, see Changing Graph Types on page 5-35.

Graphing Stratify, Classify or Age Results


To create a graph of Stratify, Classify, or Age results, first select the
command.
For example, to create a graph of Stratify results, do the following:

5 - 34

1.

Select Analyze from the menu bar and choose Stratify.

2.

Enter a minimum and maximum value, and select the fields you want
to Stratify.

3.

Click the [Output] tab and select the Graph radiobutton.

Chapter 5

Working with ACL


4.

Click [OK]. ACL displays the result in a graph.

Using the Command Log to Graph


You can use the results in the Command Log window to create graphs.
Note:

ACL indicates command results that you can graph by displaying


<<<Graphable Data>>> under the command line.
1.

Select Window from the menu bar and choose Open Command Log,
or click the
(Command Log) button in the button bar.

2.

In the command log, double click the graphable data and ACL
immediately redraws the graph using the data in the command log.

3.

You can change the graph properties or command parameters:

click

(Edit graph properties) to change graph properties

click

(Edit the command) to change command parameters

Changing Graph Types


ACL displays the graph in a default 3D bar graph. You can display graphs
in 2D or 3D bar, 2D or 3D stacked, 2D or 3D pie graph, 3D layered, or line
graph formats. Only the options that apply to the data in your graph are
available; options that do not apply are grayed out.

5 - 35

Chapter 5

Working with ACL


To change the graph format, do the following:
1.

Click the
(Edit graph properties) button in the graph window.
ACL displays the Edit Graph Properties dialog box with the [Type]
tab selected.

2D bar graph
3D bar graph
2D stacked graph
3D stacked graph
2D pie graph
3D pie graph
3D layered graph
line graph

When your results contain a single item, ACL grays out the stacked
and 3D layered graph options. When your results contain multiple
items, the stacked and layered graph options are available while the
pie graph options are grayed out.
2.

Click one of the available graph formats for that command and click
[OK]. ACL displays the results in the format you selected.
In the Histogram example, if you click the 2D pie graph icon, and
then click [OK], ACL displays the Histogram results in a pie graph.

5 - 36

Chapter 5

Working with ACL

Click the
(Rotate pie graph) button to rotate the graph counter
clockwise by 22.5 degrees. Keep clicking
until the display suits you.
To change the display again, click

(Edit graph properties).

In the Histogram example, if you click the line graph icon, and then click
[OK], ACL displays the same Histogram result in a line graph.

In the Stratify example, if you click the 3D layered graph icon, and then
click [OK], ACL displays the same Stratify result in a layered graph
format.

5 - 37

Chapter 5

Working with ACL


To try a different option, click

to edit the graph.

Click the 3D stacked graph icon, and then click [OK]. ACL displays the
result in a stacked graph.

Changing Graph Labels


To change graph labels, click
select the [Labels] tab.

to edit the graph properties, and then

You can make your graph easier to read when there is a large amount of
data by checking the Skip Overlapping Labels checkbox. When you check

5 - 38

Chapter 5

Working with ACL

the Skip Overlapping Labels checkbox, some labels will not be displayed
because ACL suppresses all overlapping labels. You can also change or
enter a title, subtitle, and x or y axis labels. Click [Font] to change the font
for labels of the graph.

Changing Graph Options


To change graph options, click
select the [Options] tab.

to edit the graph properties, and then

ACL grays out options that do not apply.


You can choose to hide the dotted grid lines, include the percentage for a
pie graph, or change the bar direction in the graph.
ACL displays graphs on one page. If there is a large amount of data, it may
take a long time to draw the graph on the screen or it may be difficult to
read. Click [Select Data to Graph] to display only the fields you want the
graph to display.

5 - 39

Chapter 5

Working with ACL

The Available Fields list box only displays the fields you selected when
you first executed the command. If you want to include different fields, or
change the order in which the fields are displayed, click
(Edit the
command) and include all the fields you want in the graph.
Click [OK] twice to display any changes you have selected. For example,
if you add a subtitle, change the bar direction to horizontal, change the
fonts, hide the dotted gridlines and deselect the COUNT field, your graph
would look something like this:

hide grid lines

5 - 40

Working with ACL

Chapter 5
For 3D graphs, if there are negative values, the tops of the bars along the
zero gridline are black. This lets you easily see which bars have small
negative values and which have small positive values.

For 3D layered graphs, you can click the legend to change the bars from a
solid color to transparent. This is useful when the tall bars in front block
shorter bars at the back. Clicking the legend again changes the bars back
to a solid color.

click to make
bar transparent

5 - 41

Chapter 5

Working with ACL


ACL lets you save the graph as a bitmap (.bmp) file. Click the
(Copy
graph to .bmp file) button. ACL displays the Save Graph As dialog box.
Select the location and name the .bmp file to use it in another program.
You can also copy the graph to the clipboard. Click the
(Copy graph
to clipboard) button. You can then paste the graph into a presentation or
another program.

Editing the Graph Command


In the graph window, you can click the
(Edit the command) button to
display the command dialog box that produced that graph. You can
change command options and parameters to produce a graph that suits
your needs.

Output Data Files


Some commands produce data files as output. When ACL produces a
data file as output, it automatically creates an input file definition. This
means you can use these files immediately as input files for further
processing and analysis in ACL.
The Command Options in Preferences in the Edit Menu contains the
Automatic Output Filenames Option.
If you turn on this option, ACL suggests a file name whenever it creates a
data file as output. You can accept the name or change it. The file name
ACL suggests represents the name of the command and is sequentially
numbered to uniquely identify the results each time the command is
processed.
By default, ACL automatically closes your existing file and opens the
newly created file as soon as the command is executed. If you want ACL to
always keep the current file open, turn off the Use Output File preference.
The following commands produce data files as output:

5 - 42

Classify
Duplicates
Extract
Index
Join
Merge
Sample

Chapter 5

Working with ACL

Sort
Summarize

Exporting Files
Use Export to create a file that can be used directly by other software
programs for further processing.
Export has a number of applications. You can:

produce a mail merge document, then export to a word processor


format to prepare confirmation letters

export to a presentation graphics package to produce high quality


presentation materials based on your data

export specified fields to a software system that provides different


reporting functionality than ACL

Export also allows you to use ACL as a data conversion tool, taking data
from one package and producing an export file in a format readable by
another package.
For more information: See EXPORT on page 2-62 in the ACL for
Windows Reference Manual.

Append to Existing File


On the [More] tab in applicable commands, you can check the Append
To Existing File checkbox to add the output to the end of a specified
output file.

5 - 43

Chapter 5

Working with ACL


For example, select Data from the menu bar and select Extract. Click the
[More] tab. ACL displays additional parameters for that command:

If you are extracting information from a current file and want to add it to
an existing file, check the Append To Existing File checkbox to instruct
ACL to add the current extraction to the bottom of the file.
Append bypasses the warning message telling you the file already exists
and you do not have to choose to either Overwrite, Append, or Cancel.
Note:

If you choose to automatically append to an existing file, ACL does


not check to ensure the file structures are the same. You should
predetermine that you want to append the files, rather than
overwriting one with the other. ACL updates the File History to
reflect the additional records appended to the file.
Other commands that have the Append To Existing File option on the
[More] tab include: Export, Summarize, Sort, Join, Merge, Statistics,
Stratify, Classify, Histogram, Age, Sequence, Gaps, Duplicates, Verify,
Sample, and Random.
The Append option is only available when you select the File output
option.

5 - 44

Chapter 5

Working with ACL

Command Log Window


To view the contents of the Command Log window, click the
(Command Log) button in the button bar. Alternatively, you can select
Window from the menu bar and choose Open Command Log.
Commands in the command log are prefixed by the @ symbol. ACL
displays the results following each command.

dropdown
command
result

You can scroll forwards and backwards to look at every command and
result in the log. This includes commands and results from previous ACL
sessions, up to the last time the log was cleared.
You can choose to display only commands, only results, the last result, or
the log file showing both commands and results by clicking the
dropdown in the top portion of the window and choosing the appropriate
option.
You can use the log to review the activity of your ACL document at any
time.

Printing the Command Log


You can print all or a selected portion of the command log.
To print the entire command log, either:

Make the Command Log window the active window. Select File from
the menu bar, choose Print Documentation and check the Log
checkbox; or

Click
Print.

or select File from the menu bar and choose

5 - 45

Chapter 5

Working with ACL


To print a portion of the command log:

Make the Command Log window the active window. Highlighted the
section of the log you want, then either click
or select File
from the menu bar and choose Print and OK.

In the Print dialog box, choose a print range and click [Print] to the
default printer.
To specify other printing options, click [Setup] and use the Page Setup
dialog box to change the default printer, page orientation, and paper size.
Click [OK] to return to the Print dialog box, and then click [Print].
ACL displays a message advising you that the command log is printing.
Click [Cancel] if you want to cancel the print job.
For more information: On printing the contents of the Command
Log window, see Documenting Your Work on page 5-47.

Using the Command Log to Issue Commands


Use one of the following two ways to issue commands in the Command
Log window:

Type a command string along with appropriate keywords and


parameters in the command log text box. Press
or click
execute the command, or

to

Click a previously issued command. Commands are preceded by an


@ symbol in the command log. ACL copies the command to the text
box. Press
or click
to execute the command, click the
(Edit the command) button to display the commands
corresponding dialog box, or edit the command directly in the text
box.
When working in the command log text box, you can press F2 to
display the Insert Fields dialog box. Select fields from the list box and
click [OK]. Your selection appears in the command log text box.

You can also use a combination of these methods. For example, you
could type the command Total in the text box, press F2 to display the
Insert Fields dialog box and choose Amount. Click
and add a
condition before clicking [OK] to execute the command.

5 - 46

Chapter 5

Working with ACL

For more information: See Command Mode on page 8-37 for


details on entering commands from the Command Log window.

Last Result
To view the result of the command you just executed, open the
Command Log, click the dropdown and choose Last Result. ACL displays
the result of your last command.

command

results

If the Command Log window is not already open, ACL will automatically
opened it whenever a command is executed.
For more information: See Command Log Window on page 5-45.

Documenting Your Work


ACL provides a high degree of flexibility and control in documenting the
work you perform.

Automatic Command Log


ACL automatically opens a log file as soon as you open a document. It
records every activity, command and message, even when running

5 - 47

Chapter 5

Working with ACL


batches. Commands in the command log are prefixed by the @ symbol
and are recorded using command mode syntax. ACL displays the results
following each command.
The log also includes the date and time the log was opened. If the Time
Stamp Commands preference is turned on, ACL date and time stamps
each entry.
Note:

You can turn off command logging with the Set Echo command so
that passwords sent by batches are not recorded in the command
log.
For more information: See SET ECHO on page 2-182 in the ACL
for Windows Reference Manual.
You can view, add comments to, print, and clear the log.
You can also specify a different log file for your ACL document. You can
log different activities in different log files.
For more information: See SET LOG on page 2-186 in the ACL for
Windows Reference Manual.

Viewing the Command Log


To view the command log, do the following:
1.

Click
in the button bar, or select Window from the menu bar and
choose Open Command Log. ACL displays the Command Log
window.

2.

Click the dropdown to display a list of options.


By default, ACL displays both commands and results in the
command log. However, you can choose to display just the
commands, or just the results.

3.

Select what you would like to see from the list of options.

You can scroll forwards and backwards to look at every command and
result in the log since the last time the log was cleared.

5 - 48

Chapter 5

Working with ACL

Including comments in the log


You can include comments in the log at any time. This allows you to
enhance the documentation by including explanations for future
reference, or notations to assist in subsequent review and reference.
Comments do not affect processing in any way. You can add as many
lines as you want by doing the following:
1.

Select Tools from the menu bar and choose Comment to display
the Comment dialog box.

2.

Type your comments or explanation in the Comment dialog box.

3.

Click [OK] to finalize and exit the dialog box.


The comment is recorded in the log and displayed in the Command
Log window.

Clearing a Section of the Log


To clear only a selection of the log, using the Clear Log File dialog box:
1.

Scroll through the log and place your cursor at the start of the section
you want to delete.

2.

Click and drag, or scroll and shift click to highlight the information
you want to select.

3.

Select File from the menu bar and choose Clear Log File. ACL beeps
and displays the Clear Log File dialog box.

4.

Select the Clear selection radiobutton to clear only the highlighted


selection. If you did not select a section, the Clear selection
radiobutton is grayed out.

5.

Click [OK]. ACL deletes the highlighted section and records the
message A range of the Log has been deleted where the section of
the log was deleted.

5 - 49

Chapter 5

Working with ACL


Note:

ACL only deletes complete lines. Partially selected lines are not
deleted.

Clearing the entire log


You can choose to clear all commands and results from the command log,
or only up to the cursor position, using the Clear Log File dialog box.
Note:

Review the contents of the command log before clearing any


information in it. Once you clear information, it cannot be
recovered.
To clear the entire log, do the following:

Note:

1.

Scroll through the log to ensure that you do not want to retain any of
the information in it.

2.

Select File from the menu bar and choose Clear Log File.

3.

Select the Clear entire Log radiobutton and then click [OK] to
clear all commands and results from the log.

Be sure you really want to clear the entire log as there is no


confirmation dialog box.
To clear the log from the beginning of the log up to the current cursor
position, do the following:

Note:

1.

Scroll through the log and place your cursor to the left of the
information you want to retain.

2.

Select File from the menu bar and choose Clear Log File.

3.

Select the Clear Log to Cursor radiobutton.

4.

Click [OK] to clear all commands and results up to the position of


your cursor.

ACL only deletes complete lines. If your cursor is in the middle of a


line, that line is not deleted.

File History
A file history tells you exactly when and how the data file was created. It
includes all the steps and conditions used in the process of creating the
file, each with its own date and time stamp and any notes, concerning the
input file, that you may have entered in the Data Fields window.

5 - 50

Chapter 5

Working with ACL


Note:

Whenever ACL creates a data file as output, it also creates a file


history.
You can include the file history in the command log, and therefore in
your documentation, by selecting Tools from the menu bar and choosing
File History. You can view the history in the Command Log window.
For more information: See FILE HISTORY on page 2-69 in the
ACL for Windows Reference Manualfor details.
To print the file history as the last page of a report, or when printing the
Last Result of a command, select Edit from the menu bar and choose
Preferences. ACL displays the preferences dialog box. Click the [Print
Options] tab and check the Print File History with Reports or Print
History with Last Result checkbox, respectively.
To include the input file definition when printing file history, check the
Include Field Definitions in History checkbox. To include notes about
the report view, check the Include View Note in Report History
checkbox.

Printing Documentation
ACL offers a range of options for printing documentation. You can print
just the command log or include other reference items such as input file
definitions, view definitions, batches, indexes, workspaces, preferences,
and document notes.
You print documentation as follows:

5 - 51

Chapter 5

5 - 52

Working with ACL


1.

Select File from the menu bar and choose Print Documentation to
display the Print Documentation dialog box.

2.

Choose options as required:

The ACL default font size is set at 9 point. You can change it by
entering the character size you want in the Font Size text box, if
it is different from the default.

Check the All Input File Definitions checkbox to print all


the input file definitions in the list, or select one or more input
file definitions from the list box.

Check the All View Definitions checkbox to print all the


view definitions in the list, or select one or more views from the
list box.

Check the All Batch Definitions checkbox to print all the


batches in the list, or select one or more batches from the list
box.

Check the All Index Definitions checkbox to print all the


indexes in the list, or select one or more indexes from the list
box.

Chapter 5

Working with ACL

Check the All Workspace Definitions checkbox to print


all the workspaces in the list, or select one or more workspaces
from the list box.

Check the Preferences checkbox to print a list of all your current


preference settings.

Check the Document Notes checkbox if you want to include a


printout of the general notes that apply to the document.

Notes are different from comments in that they are not included in
the command log.

3.

Check the Log checkbox to include a printout of the


command log, including all commands, comments, and results
currently listed in the log. If you want to print just a portion of
the command log, see Printing the Command Log on page 545.

Check the Page Break after each Category checkbox to start


each category on a new page.

Check the Page Break after each Item checkbox to start each
item on a new page.

When you finish selecting options, you can either:

Click [Print] to print the documentation, or

Click [Cancel] to restore the options in the dialog box to their


default settings, and cancel the request to print the
documentation.

5 - 53

Building Expressions Chapter 6


This chapter contains an overview of the expression builder and many
examples of the expressions you can build with it. The components of the
expression builder, including operators, constants, filters, and variables
are also explained.
This chapter also contains a discussion of each ACL function in detail
including:

description of the function

suggested uses

the function format

Expression Builder
ACL's expression builder helps you build expressions quickly and easily.
An ACL expression can be a combination of data fields, functions,
constants, variables, and operators. Expressions range from the very
simple Quantity * Cost to the complex SUBSTRING(UPPER(Name),1,3)
+ STRING (Salary,5).
Instead of typing, you can select fields, functions, and variables from lists
and click operators. If you are working with related files, you can click the
From Input File dropdown to select the input file. The expression appears
in the Expression text box which has a scroll bar to display long
expressions. You can save your expression by typing a name in the Save
As text box.

6-1

Chapter 6

Building Expressions

expression
text box

save as
text box
functions
dropdown

fields
list box

files
dropdown
variables list box
filters listbox

operators
function parameter

select to paste function parameters


function name

The expression builder lists all defined fields in the Available Fields list
box, including both data fields and computed fields (named expressions).
A field with an N following it indicates a numeric field. A field with a D
following it indicates a date field.
You do not have to memorize the parameters required for each function.
If you are accessing the functions from the expression builder, simply
check the Paste Parameters checkbox before selecting the function. When
you select the function, the text box displays the function name and a
description of its parameters.

Examples
Each function description includes examples to show you how the
function operates. Many of the function examples are presented as
definitions. For example:
ABS(-7.2) = 7.2

where = 7.2 shows you the value or result of the function, and is not
an example of how you use the function.
Other examples show you how to use the function in conjunction
with ACL commands. These examples display the commands
associated dialog box with all the appropriate parameters filled in.
Note:

6-2

Entries inside brackets (<>) indicate optional parameters.

Chapter 6

Building Expressions

The expression builder lists the current input file as well as all related files
in the From Input File dropdown. If there are no related files, only the
current file is listed. Choose the file for which you want to build an
expression and ACL displays the available fields for that file in the
Available Fields list box.
Field names from related files use the format IFDname.fieldname to
indicate the source of the data. IFD refers to the input file definition. For
example, customer.name shows that the field name came from the
Input File Definition customer.
You can build expressions or filters with fields from related files, even if
those fields do not appear in your current view. You can also build filters
with fields from related files and see the results in your view whether or
not you add those fields to your view.
If you want to save your expression, type a name in the Save As text box.
ACL displays named expressions in the Available Fields list box.
Note:

Unnamed expressions are saved only if they are columns in a view.


In any other case, they are not saved.
The expression builder keypad (located in the center of the expression
builder dialog box) contains operators that tell ACL how to evaluate the
expression.
By default, all functions are listed in the Functions list box. To display a
subset of functions, click the Functions dropdown and choose a category
from the list. Functions are a convenient shorthand for performing
standard computational tasks.
All filters that you can use in building expressions are displayed in the
Filters list box. Filters let you limit the records to which a command
applies based on whether or not a condition is true.
All variables that you can use in building expressions are displayed in the
Variables list box. Variables hold temporary values for (in most cases) the
duration of an ACL session.
After constructing an expression, you can verify it by clicking [Verify].
Click [Help] for help on how to use the expression builder.

6-3

Chapter 6

Building Expressions

Using the Expression Builder


Use the expression builder to create or edit ad hoc expressions, filters,
variables, and simple computed fields.
1.

Display the expression builder by doing one of the following:

Click [If] or [Expr] in a dialog box,

Click

Select Edit from the menu bar, choose Variables and click
[New], or

Select Edit from the menu bar, choose Filters and click [New].

(Edit view filter) in the View window,

click to verify
expression

functions
list box

2.

Build the expression by choosing items from the various list boxes,
clicking operators and typing values as required. Double click an
item in a list box to choose it.
When building expressions, keep these guidelines in mind:

6-4

When you are choosing a function from the Functions list box, if
you check the Paste Parameters checkbox, ACL guides you by
displaying the elements of the selected function in the
Expression text box.

Function parameters surrounded by brackets (<>) are optional.


You should either supply a value for the parameter and delete
the brackets, or delete everything within the brackets including
the brackets.

Enclose character values in matching single or double quotes


when comparing a character field to another value. For example,
PRODCLS='05'.

Chapter 6

Building Expressions

Date constants must be entered in YYMMDD or YYYYMMDD


format, enclosed in reverse quotes (the ` character located below
the ~ sign on most North American keyboards). For example,
`961231`.

Numeric values are restricted to a leading minus sign where


applicable, a decimal point, and the digits that make up the
number. For example, -234.56.

Every valid expression has a type; numeric, character, logical, or


date. For example, Amt+1 is a numeric expression, while
Amt>1 is a logical expression. Depending on the point at which
you start the expression builder, there may only be certain types
of expressions that are valid; for example, when building a filter,
only logical expressions are valid.

3.

Click [Verify] to check the validity of the expression you entered. A


message advises that the expression is either valid for use in ACL or
invalid.

4.

If this is an expression you want to use again, type a name in the Save
As text box. This is particularly useful for in avoiding the need to
rebuild complex expressions. Unnamed expressions are not saved.

5.

Click [OK] to create the expression and close the expression builder.
The name of your expression is copied into the text box from which
the expression builder was accessed. If you did not name the
expression, the entire expression is copied.

You can use the expression builder to do the following:

create and save a filter for current and future use

create an unnamed ad hoc field for current use only

name an expression so it can be used for future use

define variables

For example, in the Invent file, you might make a local filter that displays
only those records in the view for which the SALEPR is greater than $100.
To create this filter, do the following in the expression builder:
1.

Double click SALEPR in the Available Fields list to copy it into the
Expression text box.

2.

Click

3.

Type 100 and click [OK] to close the expression builder.

(greater than).

6-5

Chapter 6

Building Expressions
Notice that ACL displays the records that do not meet the filter condition
in gray. If your preference is set to hide filtered records, those records are
not displayed. See Hide Filtered Records on page 7-7. for details.
As another example, you might make a named expression called
PROFIT, which is the difference between the SALEPR and UNCST fields.
To create this named expression, do the following in the expression
builder (except as a view filter expression):
1.

Double click SALEPR in the Available Fields list.

2.

Click

3.

Double click UNCST in the Available Fields list.

4.

Type PROFIT in the Save As text box.

5.

Click [Verify] to verify that the expression is valid.

6.

Click [OK] to close the verify message box.

7.

Click [OK] to close the expression builder.

(minus).

For more information: On creating filters, computed fields


(named expressions), and variables, see Working with Filters on page
6-22,Working with Computed Fields on page 28 in the ACL for
Windows User Guide, and Variables on page 85 in the ACL for Windows
User Guide.

Operators
ACL provides a number of operators from which you can select when
building an expression. Operators of equal precedence are evaluated
from left to right. Operators can be any of the following symbols, in
decreasing order of precedence:

6-6

Operator

Description

()
^
*/+
+>

Function calls and parentheses


Unary minus (as in -14)
Exponentiation
Multiply, divide and character concatenation
Add and subtract
Greater than

Chapter 6

Building Expressions

Operator
<
=
>=
<=
<>
NOT
AND or &
OR or |

*
*
*
*
*

Description
Less than
Equal
Greater than or equal
Less than or equal
Not equal
Logical NOT
Logical AND
Logical OR

* These operators all have equal precedence.

How Expressions are Evaluated


Expressions are evaluated from left to right, according to the following
rules:

Operators are evaluated in the order of precedence shown in the


table above. Use parentheses ( ) to modify the order in which the
expression is evaluated. Each operator works only if its operands are
of an acceptable type.

When character strings of different lengths are compared, the


shorter of the two lengths is used. If the Exact Character
Comparisons preference is turned on, the longer of the two lengths is
used.

If numbers with different precision are mixed in numerical


operations, the result retains the decimal places of the operand with
the largest number of decimal places in the expression. For example:
4+5.0=9.0
1.1*1.1=1.2
6*2.000000=12.000000

Examples of Expressions
The following are some typical examples of ACL expressions,
demonstrating the use of most of the operators, parentheses, and
functions.

6-7

Chapter 6

Building Expressions
For the following examples, assume that for a given record the contents of
some of the fields are as follows:
Field

Contents

Field Type

Salepr

numeric

Name

ABC

character

Cost

numeric

Descr

de

character

The following table shows various forms of expressions, and the results
you could expect using the fields described above.
Expression

Result

3+5*6
Cost+5*Salepr
(3+5)*6
(3+5)*Salepr
Cost^Cost
3^Cost*4
ABC+Descr
Name+Descr
Salepr>10
Salepr>3
Name>Descr

33
33
48
48
27
108
ABCde
ABCde
F (False)
T (True)
F (in ASCII, uppercase
characters are lower than
lowercase characters when
compared)
T
T
T
F
T
T
F
AB

Name<LMN
Cost>=3
Cost<=3
Salepr>3 AND Cost>5
Salepr>3 OR Cost>5
Salepr=6 OR Salepr=7
Salepr=6 AND Salepr=7
SUBS(Name,1,2)

6-8

Chapter 6

Building Expressions

Expression
SUBS(lmnop,Cost+1,1)

Result
o
BC

SUBS(Name,AT(1,B,Name),2)

Fixed Point Arithmetic


ACL uses fixed point arithmetic, rather than floating point, for all its
numeric operations for two reasons. Fixed point arithmetic:

improves processing speed


allows user control over decimal numbers and rounding

Fixed point arithmetic has two significant implications that you should
remember when dealing with more complex numeric expressions:

Results or intermediate calculations cannot exceed the maximum


numeric size of 22 digits, including decimal digits. If this size is
exceeded, ACL warns you that the most significant digits have been
lost.

Calculations (particularly division) may round the result. ACL


applies rounding at every level in a calculation. This is the most
common cause of numeric errors in ACL.

Example 1: rounding errors


Whenever two values are involved in an arithmetic operation, the result
takes on a fixed number of decimals, often resulting in rounding. ACL
takes the largest number of decimals from the two operands. This rule is
applied at the lowest level in any calculation, and repeatedly until the
expression is evaluated.
For example:
7/3 = 2
The true answer is 2.333333333..., but ACL rounds this to zero decimals
since neither operand has any decimals.
Further examples are:
7/3.00 = 2.33
7.0000/3.000 = 2.3333

6-9

Chapter 6

Building Expressions
Rounding occurs most commonly in division and is usually insignificant
in multiplication.
An example using multiplication shows that awareness of significant
decimal places helps to avoid surprises:
1.1*1.1 = 1.2 (not 1.21 as expected)
whereas 1.10*1.10 = 1.21
Another example of how ACL processes an expression that includes
division, multiplication, and parentheses involves calculating one day's
interest on $100,000 at 12%:

ACL first divides .12 by 365 (giving 0.00), and then multiplies this result
by 100000 to yield 0.00. The correct answer is 32.876712..., but since the
example uses parentheses to force ACL to evaluate the interest rate first,
the result is rounded to zero.
If the parentheses are removed, the answer is correct to the penny:
100000*.12/365 = 32.88
While leaving out extra parentheses is not always the answer, it should be
the first thing you check. In general, you should always consider the
implications of rounding in complex expressions.
Note:

6 - 10

Be careful when using division! Remember the ACL rules of rounding


to avoid serious miscalculations. To avoid rounding, you can add
the number of decimal places you require to a calculation by
multiplying by one followed by a decimal point followed by a

Chapter 6

Building Expressions

number of zeroes equal to the number of decimal places you


require.

Example 2: overflow errors


Although unlikely, multiplication can cause problems with oversized
numbers. For example, this expression might be expected to return the
value, UNCST, with two decimals:

However, in the unlikely event that UNCST has more than eleven digits to
the left of the decimal (as in $1,234,567,890.12), the intermediate
calculation UNCST * UNCST overflows, resulting in an error. Overflows
cause ACL to stop with an overflow error message.
To prevent this:

Note:

select Edit from the menu bar and choose Preferences

click the [Numeric Options] tab and uncheck the Stop on


Numeric Overflow checkbox

If you turn this preference off, the result will be incorrect, but the
processing will continue.
Oversized numbers generally result from calculations involving many
decimal places, such as financial calculations, percentages, and present
values.
6 - 11

Chapter 6

Building Expressions

Working with Dates


Date fields are one of the main building blocks of expressions. This
section summarizes the many ways ACL allows you to format and work
with dates.

Date Format
When you select Date as the field type, you must tell ACL how each date
in your data file is stored and how you want dates to appear in your views
and reports. ACL gives you flexible formatting options for storing date
fields, displaying them in your view and printing them in your reports.

Formatting Output
Dates

1.

Select Edit from the menu bar and choose Preferences.

2.

Select the [Date Options] tab.

3.

Type a format specification in the Date format text box, or select a


predefined format from the dropdown.

There are several standard date conventions in common use:


Format

Type

Example
using Dec 31, 1997

DD MM YY
MM/DD/YY
YYDDD

European
American
Julian

31 12 97
12/31/97
97365

An input date format can be any length. ACL interprets date formats as
follows:

6 - 12

YY

Year, 1 - 99 *

YYYY

Year, 1900 - 9999

MM

Month, 1 - 12

MMM

Month, Jan Dec**

Chapter 6

Building Expressions
DD

Day, 1 - 31

DDD

Day, 1 - 366

All other characters are treated as formatting characters (filler). Common


examples of filler are the slashes in 11/28/92 (MM/DD/YY), or the blanks
and commas in Nov 28, 1992 (MMM DD, YYYY).
However, the format specification must match the data in the field
exactly. Putting a / in the format when it is not in the data file (or vice
versa) causes ACL to incorrectly interpret the date. This usually results in
a zero value (01/01/00) for the field.
If your data file contains a date
that looks like this:

You should use this date format


specification:

Feb 28, 1998


28/02/98
98, 059
1998-02-28

MMM DD, YYYY


DD/MM/YY
YY, DDD
YYYY-MM-DD

Preference settings determine how dates appear on all outputs, regardless


of the format the date is stored in. To specify the date preference:

Formatting Output
Dates

Note:

1.

Select Edit from the menu bar and choose Preferences.

2.

Click the [Date Options] tab and specify the way you want dates to
be displayed.

ACL uses the same conventions for specifying output dates as it does
for input dates.
For more information: See Date Options on page 7-11..
In command mode, the date format preference is SET DATE.

6 - 13

Chapter 6

Building Expressions

For more information: See SET on page 2-179 in the ACL for
Windows Reference Manual.

Date Field Type


When you specify that a field is a date field, ACL reads and formats the
field to display and print the date correctly.
For more information: On how ACL treats the date field type, See
DATE on page 3-5 in the ACL for Windows Reference Manual.

Date Field Modifier for Numeric Fields


Sometimes, date fields are stored in PACKED or another numeric-only
format. To display these date fields correctly:

6 - 14

1.

Select Edit from the menu and choose Input File Definition.

2.

Select the date field from the data area and type the date field name in
the name window.

3.

Check the Date checkbox in the Definition window showing field


format options.

4.

Specify a date format in the Format dropdown.

Chapter 6

Building Expressions

designates date
field modifier
format field
options

For example, if you have a date stored in a four byte UNSIGNED field as
YYYYMMDD, you would define the field as UNSIGNED in the usual
way, check the Date checkbox and enter a format of YYYYMMDD. Note
that for these types of fields, you would never have punctuation in the
format.
For more information: See Checkbox Options on page 4-27..
In command mode, the date field modifier for numeric fields is the
NDATE modifier. This modifier tells ACL that this numeric field should
be treated as a date. You can see the NDATE modifier for numeric fields
when you edit a Workspace.
For more information: See Editing Workspaces on page 8-94..

Date Constants
Date fields are usually defined when you create an input file definition.
However, when creating expressions, you may need to enter a date
yourself.
You can use a date constant in your expressions to specify a date that
never changes, such as dates that indicate a fiscal or calendar year.
6 - 15

Chapter 6

Building Expressions
Typically, you enter a date constant in the Expression text box of the
expression builder.
For example, suppose you need to list all transactions before January 31,
1997. To do this, you must place the date constant in YYMMDD or
YYYYMMDD format between reverse quotes (using the ` character
located below the ~ sign on most North American keyboards), as follows:

The date constant must be in either YYMMDD or YYYYMMDD format


regardless of the format of the date field or the date preference you have
chosen. For example, December 31, 1996 may be either 961231 or
19961231. No other format is valid.

Date Expressions
A date expression is an expression that uses dates in its calculations. You
can use dates in your calculations to produce either another date or the
number of days between days. Some of the date expressions you can
create are:

6 - 16

subtract two dates to find the number of days between them

add a number or numeric field to a date to find the date that number
of days ahead

compare two dates using any of the comparison operators such as


the > (greater than) or < (less than) operators to find which date is
later or earlier

Chapter 6

Building Expressions
Some examples of valid date expressions are:
Expression

Result

960229 - 960201
20000101 - 19970701
960228 + 1
960228 > 960301

28
914
02/29/96
F

Date Functions
ACL provides date functions for you to perform calculations and
conversions on date fields.

For more information: See Date and Time Functions on page 4-4
in the ACL for Windows Reference Manual.

Start of Century
This option is especially useful for Year 2000 or Y2K applications with
two-digit years that need to interpret dates beyond the year 2000. If all the
dates in your data have four-digit years, then you are all set for the next
century and you need not use this option. In command mode, the SET
CENTURY command sets the start of the next century.

For more information: See Start of Century on page 7-13.. See


SET on page 2-179 in the ACL for Windows Reference Manual.

Working with Numbers


Numeric fields are one of the main building blocks of expressions. This
section summarizes the many ways ACL allows you to format and work
with numbers.
6 - 17

Chapter 6

Building Expressions

Numeric Format
You can format how numeric fields are displayed in your views and
printed in reports. The formatting is not stored in the data file. The
format is only a way to display and print the numeric field. For this
reason, you can display and print the same field differently in different
views and reports.
You can include formatting characters for numeric fields such as commas
for the thousand separator, the period (.) for the decimal point, the dollar
symbol, the minus sign or parentheses for negative numbers, and so on.
By default, ACL displays all numbers using the basic format of 99999999.99. For example, the number 12,458,211.62 is displayed as
12458211.62. While this is functional, it is often difficult to separate the
thousands from the millions.
To change the default representation:
1.

Select Edit from the menu bar and choose Preferences.

2.

Select the [Numeric Options] tab.

3.

Type a format specification in the Format text box.

Follow the numeric formatting examples listed on page 19. Alternatively,


you can select a predefined format from the Format dropdown.
The numeric format consists of three components:

The negative indicator is the characters that signify negative


numbers. ACL recognizes a negative sign, parentheses, or CR as
valid indicators (and only these). The indicator can either lead or
trail the digits.
If the negative indicator is omitted, a leading minus is added for
negative numbers.

Punctuation includes the thousands separator (usually a comma),


the decimal place character (usually a period), and any other
punctuation such as % or $.
You can change these options by selecting Edit from the menu bar
and choosing Preferences. Then click the [Numeric Options] tab
and use the Decimal Place Symbol and Thousands Separator text
boxes to specify how you want numeric data to be displayed.
You can use any other punctuation (such as a floating $ or %), as
required. There is no restriction on optional punctuation.

6 - 18

Chapter 6

Building Expressions

Digits are always represented by 9s. In ACL 9s imply a blank fill, not
a zero fill.
If you specify more digits than required, the extra digits and anything
between them, such as commas, are removed.
If you do not specify enough digits in the numeric format, the extra
digits in your data are added immediately to the left of the leftmost 9,
with no additional punctuation. See example 3 below.
ACL does not zero-fill numeric fields, or provide any other kind of
leading fill characters. All numeric fields are blank-filled from the
left, and any punctuation in front of the first digit is automatically
floating.

Some examples of how numeric formatting affects the display are


illustrated below:
This Numeric
Format Specification

Formats
This Number

Like This

-999,999,999

1234.55

1,234.55

-999,999,999CR

-1234.55

1,234.55CR

999,999,999-

-1234.55

1,234.55 -

(999,999.99)
(999,999.99)
$9 999,99

-1234.55
1234.55
9871234.55

(1,234.55)
1,234.55
$9871 234.55

9871234.55

Note the absence of


formatting for the
three leftmost
digits
$9,871,234.55

$9,999,999.99

Numeric Field Types


Different data files can use different ways to store numeric fields.

6 - 19

Chapter 6

Building Expressions

For more information: For a summary of different numeric field


types, See Field Types on page 3-1 in the ACL for Windows Reference
Manual.

Numeric Constants
To create a numeric constant, type the number and, if necessary, a minus
sign or decimal point. No other punctuation is allowed.
For example:
Type:1234.56
Do not type:1,234.56

Numeric Expressions
To create numeric expressions to perform calculations, see Expression
Builder on page 6-1.

Numeric Functions
You can use numeric functions in your expressions to perform
calculations and convert numeric fields.
For more information: See Logical Functions on page 5 in the ACL
for Windows User Guide and See Mathematical Functions on page 4-5
in the ACL for Windows Reference Manual.

Working with Character Strings


Character fields are one of the main building blocks of expressions. This
section summarizes the many ways ACL allows you to format and work
with character strings.

6 - 20

Chapter 6

Building Expressions

Character Field Types


There are two character field types: ASCII and EBCDIC.
For more information: See ASCII on page 3-2 and See EBCDIC
on page 3-6 in the ACL for Windows Reference Manual.

Character Constants
You can use a character constant in your expressions to specify a
character string that never changes.
To create a character constant, surround the character with matching
double or single quotes. If your string needs to contain a single or double
quote, surround the string with the other quote. Some examples of valid
character constants are:
ABC
ABC
ABC
ABC

Character Expressions
You can use character expressions to do the following:

compare two-character strings or expressions

perform functions on character strings or expressions

concatenate two character strings or expressions

Character Functions
You can use character functions in your expressions to perform
conversions, comparisons, or to identify the existence or location of
characters within a field. To do this, see See Summary of Functions on
page 4-3 in the ACL for Windows Reference Manual.
6 - 21

Chapter 6

Building Expressions

Character Comparisons
When you compare two character strings of different lengths, ACL uses
the shortest string to do the comparison. For example, AB is considered
to be equal to ABC and ABLMNOP.
You can change this behavior by setting the Exact Character
Comparisons preference. Select Edit from the menu bar and choose
Preferences. Click the [Input File Options] tab and check the Exact
Character Comparisons checkbox. In command mode, use the SET
EXACT command.
For more information: See Exact Character Comparisons on
page 5. See SET on page 2-179 in the ACL for Windows Reference
Manual.

Character Concatenation
Other than comparison, the only operator valid for character strings is
+ for concatenation. For example:
ABC + def = ABCdef

Working with Filters


A filter is a logical expression, which determines if the filter expression is
true or false for each item.
Creating and applying filters is one way of using expressions. Filters allow
you to select records based on whether or not a condition is true. For
example, you could apply a filter that would select all prices under $100 in
a column called Sale Price. The condition is that a sale price must be
under $100. The effect is to filter out all other sale prices.
A filter can be named and saved, and then used when required.
A global filter applies to all commands whether submitted from the
menu, button bar, or in command mode and to all views for an input file
definition. Global filters stay in place until removed or until the file is
closed.

6 - 22

Chapter 6

Building Expressions

You can create and save a number of different filters, and then apply one
when and where needed.
You can create and apply a filter when you are defining data fields. You
can then define additional fields based on the filters you have created.
For more information: For details, see Creating Filters When
Defining Data Fields on page 13 in the ACL for Windows User Guide.
When a filter is applied, ACL hides the records that do not meet the filter
condition. This is the default condition. Using the sale price example, all
records with sale prices over $100 are hidden. Alternatively, you can have
ACL display the filtered records in reverse video in the view. To do this:
1.

Select Edit from the menu bar and choose Preferences;

2.

Click the [View Options] tab.

3.

Uncheck the Hide Filtered Records checkbox.

If the Hide Filtered Records preference is off, filtered records appear in


gray in the View window.

filter condition

unfiltered record

filtered record

6 - 23

Chapter 6

Building Expressions

Hiding Filtered Records

If the Hide Filtered Records preference is turned on, filtered records do


not appear in the View window.

filter condition
unfiltered records

The records in the view retain their numbering sequence and you can see
which records have been filtered out by examining the list of record
numbers.
You can click the
(Go to next unfiltered record) button to go to the
next unfiltered record.
Keep the following points in mind when working with hidden filtered
records:

6 - 24

Page up/page down and scrolling up and down may not behave as
expected. If the filtered view shows, for example, 20 records out of a
2,000-record file, pressing Page Up or Page Down may only scroll the
view one record. This is because there is likely to be a large number of
hidden records between each record on your screen. For example, if
the first record on your screen is number 12 and the second record is
number 201, you must scroll down or page down 179 records before
number 12 disappears off the top of your view. Instead click the
(Go to next unfiltered record) button to view the records near the
end of the file.

If the scroll bars behave too erratically, the best solution is to extract
a subset of the data and work with that subset. Scroll bars will then
work exactly as expected.

Chapter 6

Building Expressions

For more information: See EXTRACT on page 2-65 in the ACL for
Windows Reference Manual.

Creating Filters
There are two ways to create filters in ACL:

use the expression builder to build a filter

define a filter when defining data fields

Creating filters with the expression builder


Select the appropriate input file and do one of the following:

Click
(Edit view filter) in the View window. If you create a filter
using this option, the filter is automatically applied when you are
finished.

Click the
(Set filters) button in the button bar. Alternatively, you
can click the middle box of the status bar, or select Tools from the
menu bar and choose Set Filter.
ACL displays the Set Filter dialog box. Click [New].

Select Edit from the menu bar and choose Filters to display the
Filters dialog box. Click [New].

6 - 25

Chapter 6

Building Expressions

Type an expression in the Expression text box, or choose items


from the list boxes, click operators and type in values to build
your expression.
Because filters are logical expressions, make sure that the
expression you create has a true or false result. For example,
AMOUNT>100 can be answered true or false, but
AMOUNT+100 cannot.
To create a True or False logical constant, use uppercase (or
lowercase) T or F (t or f). No special punctuation is required.
If you type in a name for the filter in the Save As text box, your
filter is saved permanently for later use.

When you are finished, click [OK] to close the expression


builder.

If you used the Set Filter option, the filter is applied immediately. In any
other case, the filter is either saved for later use (in the case of the Filters
option), or displayed in the text box of the View window. To apply a filter
displayed in the text box of the View window, click
to apply your
filter.

Setting a Global Filter


You can set a global filter at any time. Once set, all subsequent commands
are subject to that filter until it is removed.
Note:

Only one global filter can be in effect at a time, unless the AND
operator is used.
To set a filter, do the following:
1.

Select the appropriate input file.


Data fields must already be defined before applying a filter.

2.

6 - 26

Either:

In the View window, click the dropdown, choose one of the


previously set filters and click
, or

In the View window, click


, choose a filter from the Filter list
box of the expression builder, click [OK], or

Click
in the button bar. Alternatively, you can select Tools
from the menu bar and choose Set Filter, or click the center box
of the status bar. ACL displays the Set Filter dialog box. Select
the filter that you want to apply from the list, and click [OK].

Chapter 6

Building Expressions

ACL applies the conditions defined in the selected filter and displays the
name of the global filter in effect in the center of the status bar.

Removing a Global Filter


When you turn off the global filter currently in effect, the filter conditions
are not altered. You can reapply the filter at any time.
Depending on where you want to remove the filter, either:

In the View window, click

, or

Click
in the button bar. Alternatively, you can select Tools from
the menu bar and choose Set Filter, or click the center box in the
status bar. ACL displays the Set Filter dialog box. The currently
applied filter is highlighted. Click [None] to turn off the current
filter and [Done] to close the dialog box.

Editing Filters
Use the expression builder to change the conditions that apply to a filter.
Editing modifies a filter but does not apply it.
To edit a filter, do the following:
1.

Select Edit from the menu bar and choose Filters.


ACL displays a list of filters.
click to
create
a filter

filters list box

click to close
dialog box

2.

maintenance
commands

Select the filter you want to change and click [OK].


ACL displays the expression builder. If the filter you select is
conditional, ACL displays the Expressions window.

3.

Modify the expression as required and either:

6 - 27

Chapter 6

Building Expressions

Click [OK] to close the expression builder, or

In the Expressions window, click


complete the edit.

to accept your changes and

Maintaining Filters
Use the Filters dialog box or the Set Filter dialog box to manage your
filters by doing the following:
1.

Select the appropriate input file.

2.

Either:

Select Edit from the menu bar and choose Filters to display the
Filters dialog box, or

Click
in the button bar, or click the center box on the status
bar, or select Tools from the menu bar and choose Set Filter to
display the Set Filter dialog box.

3.

Select a filter from the list box and then click [Duplicate], [Rename],
or [Delete]. After duplicating, typing a new name or deleting a filter,
click [OK].

4.

Click [Done] when you are finished.

Working with Functions


Functions are a convenient way to perform standard computational
tasks. For example:

6 - 28

You may have a customer name field that was stored in all upper
case, you might want to reformat it into proper case for inclusion in
a confirmation letter. To do this, you could create a computed field
whose value was: PROPER(NAME). This would turn JOHN
SMITH into John Smith. You could then export this new field
instead of the original field.

You may need to know the age of each transaction for the calculation
of daily interest. You could include AGE(INV_DATE) in your
calculation. This would return how old each transaction is in days,
correctly accounting for month and year ends, as well as leap years.

To count all the records that have New York anywhere in the
record, you can build a filter test FIND(New York), and use it
with the Count command.

Building Expressions

Chapter 6
These are only three examples of the many uses of functions. See
Working with Functions on page 4-1 in the ACL for Windows Reference
Manualfor a detailed discussion of ACL functions and their applications.

6 - 29

Customizing ACL

Chapter 7

This chapter shows you how to set up your ACL work environment
according to your skills, level of experience, and personal preferences.
The customizing options fall into two categories:

setting up the preferences that control the general system behavior, as


well as how ACL operates, sets dates and characters, and prints data

setting up the button bar by choosing the number, type, and order of
buttons that appear on the button bar

Setting Preferences
You can change eight preference categories that control how ACL
operates: Interface Options, Input File Options, View Options,
Command Options, Date Options, Numeric Options, Print Options, and
Application Font Options.
Your preferences are stored in a preference file and ACL displays the path
and preference file name at the bottom of the Preference dialog box.

For more information: You can set preferences in command mode


using the Set command. See SET on page 2-179 in the ACL for Windows
Reference Manual.

To change your preferences, select Edit from the menu bar and choose
Preferences.
ACL displays the preferences dialog box. The first time you open the
Preferences dialog box, ACL displays the [Interface] tab. After that, ACL
displays the tab you selected when you last closed the Preferences dialog
box.

7-1

Chapter 7

Customizing ACL

your preference
file location

Turn options on and off by clicking in the checkbox beside the preference
option:

An empty checkbox indicates the option is turned off.

A checkbox with a indicates the option is turned on.

New

The New symbol indicates a new preference that was not


in Version 5 of ACL for Windows.
The keyboard symbol shows the command mode syntax
for the preference, when applicable.
You can also click [Help] to display on-line help.

When you have finished selecting options, click one of the following:

Note:

[OK] to set the preference settings for the duration of the current
session only

[Cancel] to cancel any changes made to preference settings

[Save] to save all your current preferences

[Factory] to reset all preferences to their default settings

[Factory] does not reset the button bar to its default configuration.
The sections that follow describe each of the preference options, and
indicate their default (factory) setting.

7-2

Chapter 7

Customizing ACL

Interface Options

Show Button Bar


This option displays the button bar at the top of the screen. If you turn
this option off, ACL does not display the button bar on your screen.
Show Tooltips
This option displays yellow notes that pop up to reveal a description of
the function of any button over which you place your cursor.

List Fields in Physical Order


This option lets you change the field lists from alphabetical to physical
order.

Include Logicals in Field Lists


Logical type fields are normally excluded from field lists. Select this
option when you want to include logical fields in field lists.
Because filters are actually implemented as logical fields, you can use this
option to have filters appear in field lists so you can apply commands to
them.
7-3

Chapter 7

Customizing ACL
Set Safety On
This option displays a warning before ACL overwrites an existing input
or data file.

If you turn this option off, ACL overwrites files without asking for
confirmation. By turning this option off, you can avoid interruptions
while executing a batch.
Command mode syntax: SET SAFETY ON|OFF

Beep(s) Upon Task Completion

This option indicates the number of beeps that sound when ACL
completes a task. Type a number from 0 to 255. This notification is
especially useful when you expect a task to take a long time. The default
is 0.
Command mode syntax: SET BEEP 0-255

Input File Options

Automatically Profile on Open


If you turn this option on ACL automatically executes the Profile
command on all numeric fields when you open a document, change input
files, or change global filters.

7-4

Chapter 7

Customizing ACL

ACL retains the information and uses it to provide minimum/maximum


values for histograms and stratifications, as well as absolute values for
sample populations.
Note:

Large files may open more slowly when you turn this option on.

Open View Window


This option automatically opens a View window when you select or
create an input file. If a Default View exists, ACL opens it. Otherwise,
ACL opens another available view, or creates a Default View if none is
available.
If you turn this option off, you must open a View window each time you
require one.

Delete Data File with Input


If you turn this option on ACL automatically deletes the linked data file
when you delete an input file definition. You can use this option to
quickly remove unwanted files from your hard disk, but it will prevent
you from accessing the data in the future.
Note:

Use this preference with caution! It is the original data file that is
deleted along with the input file definition.

Dont Share Input File Layouts


If you turn this option on ACL creates a new input file definition when
you execute a command that creates an ACL data file as output, such as
Sort or Extract. ACL shares the same input file definition, if possible,
when this option is turned off.

Exact Character Comparisons


When this option is off ACL compares character fields or expressions that
are not of equal length, based on the shortest character field or
expression. For example, AB is considered to be equal to ABC and
ABLMNOP.
If you turn this option on ACL compares character fields or expressions
based on their full length, which must be exactly the same. Two strings of
different lengths, therefore, are never equal. For example, AB is not
considered equal to ABC.
7-5

Chapter 7

Customizing ACL

Command mode syntax: SET EXACT ON|OFF

Display Format on Open

If you turn this option on ACL automatically displays the current input
file definition and computed field definitions when you open a new input
file. The results appear in the command log.
Command mode syntax: SET FORMAT ON|OFF

Max RAM (MB)


This option specifies the maximum amount of memory you want ACL to
use. The default setting of four megabytes (MB) is adequate for most
purposes and is recommended in most cases. If you want to sort or
classify very large files, you can specify a larger number, anywhere from 1
to 16 MB. When you change this number, you must save your
preferences, exit and restart ACL to put the new setting in effect.
If you specify a larger amount of RAM than is available for ACL to use,
ACL slows down. It creates and uses virtual memory on your hard drive
for the additional requirements. If you specify too small a number,
commands such as Sort and Index execute slower than usual.
Please contact ACL Technical Support if you have questions about this
option.

Buffer Size (k)

This option specifies the size of the data block read. The value indicated is
in kilobytes (k). Type a number from 5 to 240. The default is 15,
indicating that 15 kilobytes are read at a time.
Command mode syntax: SET READAHEAD <TO> buffer-size

Sort Order
This option indicates the sort sequence for character fields. The default is
ASCII, which ACL implies with an empty text box. If you are working
with international character sets or other special cases, you can specify a
different sort order.

7-6

Chapter 7

Customizing ACL

Any characters that you type in the text box are sorted in the order they
appear. Any characters that do not appear in the text box sort after the
supplied characters in the same order as the default ASCII sort sequence.
For example, typing AaBbCc and so on causes uppercase and lowercase
letters to sort together before any other characters.

Command mode syntax: SET ORDER <TO> string

EBCDIC
This option allows you to select EBCDIC as the sort order. If you turn this
option on, ACL automatically inserts the specification for the EBCDIC
sort order in the Sort Order text box.

View Options

Hide Filtered Records


If this option is on ACL displays only those records that match the filter
condition in effect.
If this option is turned off, all records in the current input file are shown.
If a filter is active, records that do not meet the test appear in reverse
video.
7-7

Chapter 7

Customizing ACL
Show Grid Lines
This option displays grid lines on views. If you are formatting a view for a
report, you may want to turn this preference off.
Test Column Widths
When this option is on and you change the width of a column, ACL
prompts you to save or discard your work when you close a view.
If you turn this option off and the only changes to a view are column
width changes, the changes are discarded.
Show Right Edge of Page
ACL displays a dotted line in the View window to indicate the right
margin.

page width indicator

The margin is based on the print setup options for the report.

Display Invalid Data as Blanks


When this option is off, ACL accepts all invalid characters in a field.

7-8

If you turn this option on, ACL blanks out the field from the first invalid
character to the end of the field. The Display Invalid Data as Blanks
option is most useful with variable length data fields, because it allows
ACL to correctly display them.
Command mode syntax: SET CLEAN ON|OFF

Chapter 7

Customizing ACL

Redraw Seconds
This option displays the maximum amount of time in seconds that ACL
will take to redraw the view. If redrawing takes longer than the specified
amount of time, ACL interrupts processing and displays a message. The
default time is 10 seconds.

Global Page Title

Whatever you type in this text box will appear (left justified) under the
page number at the top of each page you print. By default, ACL uses your
company name. However, you can also type in another designation of
your choice, or leave the text box blank.
Command mode syntax: SET DESIGNATION designation

Command Options

Autoexecute Commands
This option allows you to select commands from the button bar or a
menu and have ACL immediately execute them without displaying a
dialog box. You do not have the opportunity to edit the command or
apply a local filter.
If ACL has enough information, you only need to highlight the columns
in the view you want to process, and select the command from the button
bar or menu. For this feature to work on commands that create output
files, you must also turn on the Automatic Output Filenames option.
7-9

Chapter 7

Customizing ACL

Automatic Output Filenames


If you turn on this option, ACL suggests a name for any file a command
creates. The name contains the command name and an incremental
number starting at 01. You can accept the name, but it is advisable to use
something more meaningful.

Time Stamp Commands


If you turn this option on, ACL records the time and date of each
command you issue in the command log.
Use Output File
This option controls whether or not the Use Output File checkbox, found
in command dialog boxes that create files, is initially checked. You can
always change this default setting command by command.
If you turn the Use Output File option on, the Use Output File checkbox
is checked. When you issue a command, ACL automatically closes the
current file and opens the file created by the command.
If you turn the Use Output File option off, the Use Output File checkbox
is not checked and ACL stays in the current file.
Show Group Tests in Log
When you run a batch, this option affects the display of group results as
they appear in the command log. ACL displays the group results of If,
While, For, and Next tests beside the commands to which they apply.
Because more than one test in a group can apply to each command, the
syntax can get very long.
If you turn this option off, ACL does not display the tests when a batch is
run.
For more information: On groups, see Command Groups on page
29 in the ACL for Windows User Guide.

7 - 10

Command mode syntax: SET TEST ON|OFF

Chapter 7

Customizing ACL

Intervals
This option indicates the number of intervals for a stratification or
histogram. Type a number from 1 to 255. The default is 10.

Error Limit
This option sets the default number of errors after which ACL stops
processing the Duplicates, Gaps, Sequence, or Verify commands. The
default is 10.

Date Options

Day, Month, Year


You can change the D, M, or Y character in the Day, Month, or
Year text boxes, respectively, to characters that match your usual format.
ACL globally displays the characters you specify in every alpha date
format representation. This is intended for foreign languages using
different letters in their language.

Default Date Format


ACL globally displays the format you specify in every date field.
Note:

This does not affect the date formats ACL can read, only the way it is
displayed.
7 - 11

Chapter 7

Customizing ACL
Date formats use the following conventions:
yy

Year 1 - 99

yyyy

Year 1900 - 9999

mm

Month 1 - 12

mmm

Month Jan - Dec

dd

Day 1 - 31

ddd

Day 1 - 366

Choose one of the following options from the Default Date Format
dropdown to control how ACL displays the date on views and in your
reports and other output:

7 - 12

yy/mm/dd

Choose this option to display dates numerically in


the order year, month, day.
For example, ACL displays December 31, 1995 as
95/12/31.

mm/dd/yy

Choose this option to display dates numerically in


the American order: month, day, year. For
example, ACL displays December 31, 1995 as 12/
31/95.

dd/mm/yy

Choose this option to display dates numerically in


the European order: day, month, year. For
example, ACL displays December 31, 1995 as 31/
12/95.

yyddd

Choose this option to display dates in the Julian


order: year, day. For example, ACL displays
Sunday, December 31, 1995 as 95365.

mmm dd, yyyy

Choose this option to display dates in the order


month, day, year. For example, ACL displays
December 31, 1995 as Dec 31, 1995.

Alternatively, you can use the preceding conventions to supply your own
date format. Just type your choice in the Date Settings text box.
Command mode syntax: SET DATE 1|2|string

Chapter 7

Customizing ACL

Start of Century
This option is especially useful for Year 2000 or Y2K applications with
two-digit years that need to interpret dates beyond the year 2000. If all the
dates in your data have four-digit years, then you are all set for the next
century and you need not use this option.
Start of Century lets you use ACL to set and process two-digit year dates
in the twenty-first century. ACL can read four-digit year dates to 9999.
Start of Century accepts up to two digits to indicate the year you choose to
separate this century and the next. The default is zero, that is, all YY dates
are treated as 1900 dates.
To indicate the year separating this century and the next for dates with a
two digit year, enter a number from 0 to 99.
For example, if you choose to set 1960 as the separating year, enter 60 in
the Start of Century text box. ACL then treats years 60 to 99 as 1960 to
1999 and years 00 to 59 as 2000 to 2059.
The following table illustrates possible Start of Century dates:

:
New

Start of Century
date:

Years:

Display as dates:

0 (default)

00 to 99

1900 to 1999
(cannot display after 1999)

60

60 to 99
00 to 59

1960 to 1999
2000 to 2059

40

40 to 99
00 to 39

1940 to 1999
2000 to 2039

05

05 to 99
00 to 04

1905 to 1999
2000 to 2004

Command mode syntax: SET CENTURY 0-99

Periods
This option sets the default age periods for the Age command. If you use
a specific set of age periods frequently, you can enter the set in the Periods
7 - 13

Chapter 7

Customizing ACL
text box. ACL uses the setting in the Periods text box as the default Age
periods (buckets) for the Age command. This saves you from having to
change the default age periods every time you use the Age command. You
can still override the periods in the Age dialog box, when you need to.

:
New

Enter the periods in days, separated by commas without spaces. You can
set as many age periods as you wish.
Command Mode Syntax:
SET PERIODS <TO> 0,30,60,90,120,10000

Abbreviations for Month Names


This option sets the default abbreviations for month names. Each month
can be up to three letters long separated by a comma.
This is most useful when using languages other than English which use
different abbreviations for month names, or if you send your output to
people who use a different language.
Note:

7 - 14

ACL uses the month names text string for both input and output of
MMM dates. The abbreviation you use must match the abbreviation
used in the file you are accessing. If it does not, ACL will not read the
date in the file you are accessing.
Command Mode Syntax:
SET MONTHS <TO>
Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,
Nov,Dec

Chapter 7

Customizing ACL

Numeric Options

Stop on Numeric Overflow


This option terminates processing whenever a numeric overflow (such as
division by zero) occurs.

If you turn this option off, ACL continues to process a command when a
numeric overflow occurs. ACL replaces division by zero with a very large
value and significant digits may be lost.
Command mode syntax: SET OVERFLOW ON|OFF

Verify Data
If you turn this option on, ACL automatically checks the validity of any
data you use. Processing stops when an error occurs, unless the Blank
Invalid Data option is also on.

If you turn this option off, ACL does not test for data validity, improving
processing speed.
Command mode syntax: SET VERIFY ON|OFF|BLANK

Blank Invalid Data


This option is only available when the Verify Data option is turned on. If
you turn Blank Invalid Data on, ACL automatically replaces invalid data
with blanks or zeros (as appropriate), and adds an entry to the error log.
7 - 15

Chapter 7

Customizing ACL
ACL displays the message: Invalid data encountered in file, values
zeroed. See file ERROR.LOG.

You cannot store the error log as part of your document. To view or print
the log, you can use a word processor or text editor to open it in the
directory in which you store your working files. You can access the error
log while in ACL, by using the Type or Dump commands.
Command mode syntax: SET VERIFY BLANK

Expression Field Width

This option indicates the default field width for numeric computed fields,
or ad hoc numeric expressions, for which ACL cannot determine the
maximum width. The default is 12 character widths, depending on the
current font.
Command mode syntax: SET WIDTH <TO> n

Decimal Place Symbol


ACL uses a period as the default decimal place character. To change the
default setting, type a new character in the text box.

Thousands Separator
ACL uses a comma as the default thousands separator for numeric
output. To change the default setting, type a new character in the text box.

List Separator
ACL uses a comma as the default list separator, which is used primarily to
separate function parameters. To change the default setting, type any
character, other than the one you used for the decimal place character, in
the text box.

Default Numeric Format


Choose a default numeric format from the dropdown, or specify your
own.
Note:

7 - 16

When you use $ (dollar characters) in the default numeric format,


ACL uses this globally, formatting even ACL generated numeric

Chapter 7

Customizing ACL

columns such as Count or Classify with $. Caution is recommended


when using this option.

Print Options

Print File History with Last Result


This option includes the file history as the last page when you print the
Command Log window using the Last Result option from the dropdown.
Print File History with Reports
This option includes the file history as the last page of a printed report.

Include Field Definitions in History


Turn this option on to include a description of the input file definition
and computed fields as part of the file history.

Include View Note in Report History


Turn this option on to include the notes associated with the view, as well
as the file history in printed reports.
7 - 17

Chapter 7

Customizing ACL

Margins
The Left Margin, Top Margin, Right Margin, and Bottom Margin text
boxes allow you to specify left, top, right, and bottom margins,
respectively, on all printed output.

Values for these variables are set in hundredths of an inch. For example,
100 specifies a margin of one inch. The default setting for each of the
margin variables is inch (50/100). The margins are measured from the
edge of the paper. For most printers, the printable area starts at inch
(25/100) from the edge of the paper. When you specify a number smaller
than your printers printable area, ACL uses the start of your printers
printable area as the margin.
Command mode syntax: SET MARGIN
LEFT|RIGHT|TOP|BOTTOM <TO> n

Application Font Options

The Font Options affect the way data is displayed in all windows, except
the View window.

Fixed Font
ACL uses fixed fonts for information displayed in the Data Definition,
Command Log, Batch, and Workspace windows. You can change the
fixed font used in these windows by clicking the Fixed Font dropdown
and selecting one of the fonts in the list box.

7 - 18

Chapter 7

Customizing ACL

ACL automatically uses the Courier font to display fixed ASCII text on
screen. This is appropriate for most Western European languages.

Global Font
The default is Helvetica. Choose from the list box to change the font for
data that uses a proportional font, such as the Overview window.

Language Version
The options on this dropdown allow ACL to properly read and display
local language characters. Click the Language Version dropdown and
choose one of the options to have ACL correctly interpret data in your
local language.
ACL correctly interprets both ASCII and EBCDIC data, and allows for
lowercase and uppercase (where applicable) character translation.

Setting Up the Button Bar


You can use the button bar to select commands or options faster than
using a menu. Instead of selecting a command or option from a menu,
you simply click a button in the button bar.
The first time you use ACL, a number of buttons are displayed in the
button bar. Each button is linked to a command or option from an ACL
menu. When you click the button, ACL performs the corresponding task
or action.
If you prefer, you can customize your own button bar. By adding the
commands and options you use most often, and remove those you use
less frequently. You can also change the order in which the icons appear
on the bar.
The number of icons that can fit in the button bar depends on your
computer systems video adapter setting. For example, at very high
resolutions (such as 1024x768 or 800x600) the icons are smaller and you
can fit more on the button bar.
7 - 19

Chapter 7

Customizing ACL

Default Button Bar


This is how the default button bar is set up. If you or someone else
customizes the button bar in your copy of ACL, it may not appear exactly
as shown.

To customize your button bar, click


(Customize button bar) or
choose Tools from the menu bar and select Customize Button Bar. You
can customize your default button bar by including any of the available
buttons, in any order, and with alternate spacing, until it best suits your
needs.
The default button bars icons are arranged in the following order, from
left to right:

Button Displays

Corresponding Command

A list of input file definitions Select Data from the


and options for working with menu bar and choose
them.
Select.
A list of filters to allow you to Select Tools from the
select and apply a filter.
menu bar and choose Set
Filter.
Existing document notes and Select File from the menu bar
allows you to enter new
and choose Document Notes.
notes.
A list of all the batches, input Select Window from the
menu bar and choose Open
file definitions, views,
workspaces, and indexes in Overview.
the document.

7 - 20

Chapter 7

Customizing ACL

(Continued)

Button Displays

Corresponding Command

The Command Log window, Select Window from the


menu bar and choose Open
so you can review the
Command Log.
command log or work in
command mode.
The Relations dialog box to
set relations to other files.

Select Data from the menu bar


and choose Relations.

The Index dialog box to


create indexes.

Select Data from the menu bar


and choose Index.

The Input File Definition


window to define fields,
filters, or expressions.

Select Edit from the menu bar


and choose Input File
Definition.

Options for totaling numeric Select Analyze from the menu


fields.
bar and choose Total.
Options for analyzing
numeric fields and
displaying a variety of
statistical information.

Select Analyze from the menu


bar and choose Statistics.

Options for extracting data.

Select Data from the menu bar


and choose Extract.

Options for producing aged


summaries of data.

Select Analyze from the menu


bar and choose Age.

Options for stratifying


numeric data.

Select Analyze from the menu


bar and choose Stratify.

7 - 21

Chapter 7

Customizing ACL
(Continued)

Button Displays

Corresponding Command

Options for classifying data


based on the value
of character fields.

Select Data from the menu bar


and choose Classify.

Options for checking for


duplicates in your file.

Select Analyze from the menu


bar and choose Duplicates.

Options for rearranging a file Select Data from the menu bar
and choose Sort.
into a new physical record
sequence.
Options for customizing the
button bar.

Select Tools from the menu


bar and choose Customize
Button Bar.

Options for printing.

Select File from the menu bar


and choose Print.

On-line help.

Select Help from the menu


bar and choose Contents.

Customizing the Button Bar


You can use the Customize Button Bar dialog box to add, delete, or
replace buttons at any time. You can also add a separator bar to separate
groups of buttons.
There are icons available for all the commands you can access from
menus, as well as for most other menu options.

7 - 22

Chapter 7

Customizing ACL
1.

Select Tools from the menu bar and choose Customize Button Bar.

select a command

click to insert a button


click to replace a button
click to delete a button

click to insert
button to be inserted
separator
click to insert a menu command

click to insert
blank button

2.

Click:

the Insert radiobutton to add a new button to the button bar

the Replace radiobutton to exchange a button in the button bar

the Delete radiobutton to remove a button from the button bar

ACL displays a message in the message area asking you to Select


Menu Item to see icon.
3.

Either:

delete buttons by clicking each one you want to delete

add or replace buttons by first selecting a command from one of


the menus on the menu bar

ACL displays the command and its icon in the message area.
You can add, delete, or replace a menu command, a blank button, or
a separator bar to separate the buttons in the button bar.
Click the position in the button bar in which you want to add or
replace a button.
4.

ACL adds, deletes or replaces the icon in front of the position you
clicked, and shifts the other icons as necessary. If the buttons fill
more than one line, ACL wraps the buttons to multiple lines.

5.

Click [OK] to save the changes you made to the button bar, or
[Cancel] to leave the button bar unchanged.

7 - 23

Advanced Techniques

Chapter 8

Command mode, batches and groups, workspaces, startup parameters,


and variables provide alternative ways of processing data.
This chapter describes how to work in command mode, how to use
command groups (also known as groups in this manual), and batches
effectively, how to work with indexes and workspaces, how to use startup
parameters to customize how ACL starts up, how to use variables in ACL,
and how to process multiple record type files.

Batches
A batch is a series of ACL commands stored in an ACL document. This
series of commands can be executed repeatedly and automatically. Any
command can be stored in a batch.
Entering Commands

Use the following guidelines for entering commands in batches:

Start each command in the batch on a new line.

Insert a new line by moving the insertion point to the end of a line
and pressing
.

You can type commands in uppercase or lowercase, or a


combination of both.

To make changes to entries, use the Cut, Copy, and Paste options
from the Edit menu, or use standard keyboard text editing
techniques.

To undo the last typing or edit you did, use the Undo option from the
Edit menu, or use Ctrl -z.

You can structure a batch so that it either runs unattended or prompts for
information. You can vary your responses to the prompts each time the
batch is run. Batches are especially useful when users regularly repeat
applications. The user does not have to be the creator of the batch to use it
effectively.

8-1

Chapter 8

Advanced Techniques

Creating a Batch
There are several different ways to create a batch:

Open a new batch and enter commands using any of the following
methods:

type commands directly in the batch window

use menu selections

copy and paste from the command log

Commands are entered in the batch window, but are not executed
until you run the batch.

Note:

Create a batch from a view.

Turn the Batch Recorder on and execute commands. ACL performs


all the commands you issue and automatically records them in a
batch.

Only commands can be captured in a batch. Procedures such as


building expressions must be added manually. As a general rule, if
the command appears in the command log, it can be captured into a
batch.

Create a batch from an existing batch by duplicating and changing it,


or by changing it and saving it under a different name

Using the batch window


After selecting the appropriate input file, do the following:
1.

8-2

In the Overview window, click Batches and click


(New).
Alternatively, you can select Edit from the menu bar, choose Batches
and click [New] in the Batches dialog box.

Chapter 8

Advanced Techniques
2.

Batch Window

ACL displays a batch window. ACL calls the batch Untitled until you
give it a name.

edit the command


find and replace
edit batch note
group
else
end
loop
build new dialog

You can click the:

3.

(Edit the Command) button to display the command dialog


box and edit the command you have selected

(Find and Replace) button to search for (and optionally


replace) text strings

(Edit batch note) button to create and/or edit the batch note

(Group) button to enter a Group command

(Else) button to enter an Else command

(End) button to end an End command

(Loop) button to enter a Loop command

(Build new dialog) button to build a custom dialog box

Enter commands in the new batch by doing one of the following:

Typing commands, starting each one on a new line. You can


undo your last edit by pressing Ctrl -z or selecting Edit from the
menu bar and choosing Undo, or

Selecting ACL commands from the Data, Analyze or Sampling


menus to open a command dialog box. Enter command
options, fields, parameters and keywords. When you click [OK]
the command and specified parameters are pasted into the batch
window (but not immediately executed), or

Copying commands from the command log. For ease of use,


click the dropdown in the Command Log window and choose

8-3

Chapter 8

Advanced Techniques
Commands. Because the log now displays only commands, you
can copy a number of commands at once.
Highlight the commands you want in the command log and press
Ctrl -c to copy the command. Make the Batch window the active
window and press Ctrl -v to paste the commands at the insertion
point, or

4.

Copying commands from another batch. Open a batch, copy the


commands you want and close the batch (you cannot have more
than one batch window open at a time). Now open or create a
batch and paste the commands into it, or

Double clicking a command in the batch and clicking the


(Edit the Command) button to edit command options, fields,
parameters and keywords.

When you are finished entering commands, close the batch window.
ACL prompts you to save the changes and name the batch.

5.

Type a new name in the text box. Click [OK] to change the name of
the batch from Untitled to the new name.

Your batch is created and can now be run.

Using a view to create a batch


Create a batch from an existing view to automate the process of viewing
data or producing a printed report. This enables you to create a batch that
exactly reproduces the steps required to produce the current view, saving
you the time and trouble of recreating it manually.
ACL keeps track of all the steps you go through to create a view, including
all the commands that were processed to produce the file, and uses this
information to create the batch. The batch performs whatever file
processing is necessary to produce the file and the view.
1.

Open an input file and issue commands (such as those commands


under the Data menu) that result in the creation of data files.
ACL displays the default view of the new data file.

8-4

2.

Arrange your view as desired.

3.

If the view is still named Default View, you should save it under a
different name by selecting the view in the Overview window and
click
(Rename).

Chapter 8

Advanced Techniques
4.

Reopen the view if you closed it while executing step 3. Select Tools
from the menu bar and choose Create Batch from View.
ACL prompts you to save and name the batch.

5.

Type a new name in the text box. Click [OK] to change the name of
the batch from Untitled to the new name.

The batch is created. You can run it at any time to produce the exact same
report. Since the commands are stored in the batch, you can edit the
batch itself if you want to make any changes to processing.

Using the batch recorder to create a batch


Use ACLs Batch Recorder to create a batch based on commands entered
while processing data. When you turn the Batch Recorder on, ACL
records all subsequent commands and tasks executed and copies them to
a new batch. When you turn the Batch Recorder off, ACL prompts you to
save and name the batch so that you can use it again.
1.

Turn on the Batch Recorder by selecting Tools from the menu bar
and choosing Set Batch Recorder On.

2.

Use ACL commands to process data.

3.

When you are finished processing data, turn the Batch Recorder off
by selecting Tools from the menu bar and choosing Set Batch
Recorder Off.
ACL prompts you to save and name the batch.

4.

Type a new name in the text box. Click [OK] to change the name of
the batch from Untitled to the new name.

Using batch editing to create a batch


You can make changes to an existing batch and save it using a different
name.
1.

To create a batch in this way, either:

In the Overview window, select a batch to edit, click


(Open)
and then click [Edit] in the dialog box displayed by ACL, or

Select Edit from the menu bar, choose Batches, and double
click one of the batches displayed in the Batches dialog box.

ACL displays the batch.

8-5

Chapter 8

Advanced Techniques
2.

Enter or edit commands in the batch using the Cut, Copy, and
Paste options from the Edit menu, or using standard keyboard text
editing techniques.
You can click a command and then click
edit the command dialog box.

(Edit the Command) to

You can also click


(Find and Replace) to search for (and
optionally replace) a string.
Note:
3.

You cannot search for strings that split across two lines.
When you are finished editing the batch, close the batch window.
If you have made changes, ACL prompts you to save the batch.

4.

Type a new name for the batch and click [OK] to save it.

Running a Batch
You can only run one batch at a time, although the batch you are running
can call other batches. You cannot continue working in the current ACL
session while a batch is running. If you want to interrupt the processing of
a batch, click [Cancel] in the Status of Task dialog box or press Esc .
1.

From the Overview


Window

In the Overview window, double click a batch. ACL displays a


message box with options to either edit or run the batch.
You do not have the option of specifying an IF test when running a
batch from the Overview window.

2.

You can specify an IF test when running a batch by doing the following:

Using an IF Test

1.

Note:

8-6

Click [Run] to run the batch or [Cancel] to cancel the action.

Display the list of available batches by:

Clicking the
available, or

(Do a batch) button on the button bar, if

Selecting Tools from the menu bar and choosing Do Batch

2.

In the Do a batch dialog box, select a batch from the list and enter an
IF test in the If text box, or just click to select a batch to run without
an IF test.

3.

Click [OK] to run the batch or click [Cancel] to cancel the action.

This usage of an IF clause is different than for most commands.


Rather than controlling which records are processed, IF, in this
context, determines whether the batch is executed at all. For this

Chapter 8

Advanced Techniques

reason, using the IF parameter in interactive mode is uncommon. Its


use is primarily for conditionally executing one batch from within
another, based on conditions determined at run time.
You can use a batch to access ODBC databases using the Import or
Refresh command. If the data file is protected by a password, use the
Password command to prompt for the user for the password at the
beginning of the batch. The Import and Refresh command can then use
that password to access the data file. For details, see PASSWORD on
page 2-124 in the ACL for Windows Reference Manual.

Accessing Password
Protected Files

When a batch is running, ACL displays the processing status on the left
side of the status bar.

name of the currently running batch

When processing is complete, the results appear in the Command Log


window.
Note:

You can turn off command logging with the Set Echo command so
that passwords sent by batches are not recorded in the command
log, although the PASSWORD command is the preferred method.
For more information: See PASSWORD on page 2-124, SET
PASSWORD on page 2-186, and SET ECHO on page 2-182 in the
ACL for Windows Reference Manual.

Printing Batches
You do not have to display a batch to print it. Select File from the menu
bar and choose Print Documentation. Select one or more batches in
the batch definitions list box and click [Print].
Alternatively, you can make the batch the active window and do one of
the following:

click

(Print the active window) on the button bar

select File from the menu bar and choose Print

8-7

Chapter 8

Advanced Techniques

Maintaining Batches
Use the Overview window to duplicate, rename, and delete batches.
Duplicating Batches

To duplicate a batch:
1.

Click the batch you want to duplicate.

2.

Click

(Duplicate).

ACL displays a dialog box informing you that batch ABC has been
duplicated as ABC2.
Renaming Batches

To rename a batch:
1.

Click the batch you want to rename.

2.

Click

(Rename).

ACL displays a dialog box with the current name of the batch
highlighted in the text box.
3.
Deleting Batches

Type a new name for the batch and click [OK].

To delete a batch:
1.

Click the batch you want to delete.

2.

Click

(Delete).

ACL displays a dialog box prompting you to delete the selected item.
3.

Click [OK] to delete the batch. Otherwise, click [Cancel].

Using Interactive Batches


Interactive batches are distinguished from other batches because they
interact with the user. This interaction may take the form of requesting
from the user which files to use, parameter values or even the steps to be
performed.
ACL provides three commands that allow batches to interact with the
user. The Accept command is the simplest and is suitable for many
parameter oriented interactions. The Dialog command is a much more
powerful alternative that is suitable for any user interaction requirements.
The PASSWORD command is specifically designed for entering
passwords.
The Accept command is a special purpose command designed
specifically for batches. Given that a batch is a series of stored commands,

8-8

Chapter 8

Advanced Techniques

it is useful to have some means of specifying run-time information to the


batch.
For example, you could design a batch that performs a sample with an
interval of $1,000,000. The next time you run the same batch, however,
you may want to use a different interval. One solution is to edit the batch
and change the interval each time you run it. Another, much easier
approach, is to have the batch ask what the interval should be. The
Accept command does just that.
The command mode syntax for Accept is:
ACCEPT prompt-string <FIELDS field-types> TO variablename...
The prompt-string is displayed in a dialog box when the batch is
run, and ACL waits for a reply from the user. The characters entered are
stored in variable-name as a character string. Each Accept command
can include more than one prompt-string (and associated variable).
The optional FIELDS keyword causes the text box in the prompt dialog
box to be replaced by a dropdown containing valid names. The field type
can be specified as:
Field Type

Generates a dropdown containing:

character fields

character variables

numeric fields

numeric variables

logical fields (filters)

logical variables

date fields

date variables

xr

views and reports

xb

batches

xf

input files

8-9

Chapter 8

Advanced Techniques
More than one specifier can be used for field-types. Specifying
FIELDS CNLD generates a dropdown containing the names of all
fields.
Note:

If the variable requested by the Accept command already has a


value, it is included as a default in the text box.

Interactive Batch Examples


The following example creates a batch that asks for a department code
and totals the amounts for that department:
ACCEPT Enter the DEPT.:" TO DEPT_CODE
OPEN DEMO
TOTAL AMOUNT IF DEPT=DEPT_CODE
The next example asks for an interval and a random start value, opens the
file and then performs the sample:
ACCEPT "Enter the sampling interval:" TO SAM_INT,
"Enter the random start:" TO RAN_START
OPEN DEMO
SAMPLE AMOUNT INTERVAL SAM_INT FIXED RAN_START
It is a good idea to place all the Accept commands at the beginning of the
batch.
For more information: See ACCEPT on page 2-1 in the ACL for
Windows Reference Manual for more details on the Accept command.
The Dialog command is also available for more complex user interaction.
For more information: See Using Dialog Boxes in Batches on page
8-11.

8 - 10

Chapter 8

Advanced Techniques

Calling Other Batches


One batch can call another batch. In practice, this operates much like a
subroutine call in programming. If a batch includes the lines
DO BATCH_A
DO BATCH_B
DO BATCH_C
as part of its commands, it first executes the commands stored in the file
BATCH_A. When BATCH_A is complete, processing returns to the
original batch and BATCH_B is executed. Similarly, BATCH_C is
executed after BATCH_B is completed. In this way, you can include sets
of standard commands in your batches whenever required. Called
batches can call other batches as well.
When batches are called in this manner, it is possible to conditionally or
repeatedly call a batch automatically:

DO batch IF test
Executes the batch, but only if the test is true.

DO batch WHILE test


Executes the batch repeatedly, until the test is false.

When using DO WHILE, you must ensure that the test is eventually false.
Otherwise, processing enters an infinite loop and you must press EscE to
terminate it.
Note:

You cannot use the Do Batch command in a Group.


For more information: On calling other batches, see DO BATCH
on page 2-48 in the ACL for Windows Reference Manual.

Using Dialog Boxes in Batches


The Dialog Builder lets advanced users design their own batch dialog
boxes that prompt the user for input and selections in interactive batches.
This versatile feature lets you build interactive batches that prompt for
user input in as flexible a manner as possible.
Use the Dialog Builder to do all the functions of multiple Accept
commands and in place of commands that limit what a user can enter.
Unlike the Accept command, the Dialog Builder lets you select a full

8 - 11

Chapter 8

Advanced Techniques
range of controls, including radiobuttons and checkboxes. You also have
the freedom to customize the size and placement of each control.
The Dialog Builder offers you the flexibility and control to design highly
sophisticated and personalized dialog boxes that best suit your needs.

Planning a Batch Dialog Box


The power of the Dialog Builder makes it essential that you plan your
batch and have a firm understanding of your files before you use it. Take
a few moments to think about your objective and lay out how you want
the dialog in your batch. Better yet, you should build the batch first,
before you build the dialog boxes for it. This allows you to concentrate
first on the functionality of the batch and then the user interface. When
using this approach, just Assign the variable values at the beginning of the
batch, and then go back later and replace the Assign commands with
Dialog boxes.
Some of the issues you should consider before you create a dialog box are:

What will the batch do?

Will it contain custom dialog boxes, and if so:

What information will they collect?


Where and how will they be used?

What errors can occur and how will they be handled?

Who will run the batch?

The time you spend planning the batch may save you time and effort
later.

Creating a Batch Dialog Box


Batch dialog boxes are best placed at the beginning of a batch so that
remaining steps can proceed unattended.
To use the Dialog Builder in a batch, do the following:
1.

8 - 12

In the Overview window, click the


either:

(Batches) button, and then

Click the

(New) button to create a batch, or

Double click the batch in which you want to use the Dialog
Builder. ACL asks you if you want to edit or run the batch. Click
[Edit] to change the batch.

Chapter 8

Advanced Techniques
ACL displays the Batch window.

Build new
dialog

2.

In the Batch window, click the


(Build new dialog) button. ACL
displays the Dialog Builder with a default title of User Dialog. You
should give the dialog box a meaningful name to indicate its purpose
by double clicking the gray definition area.

text
editbox
checkbox
radiobuttons
dropdown list
document item list
delete
snap to grid
gray definition area
drag to resize
dialog box

Notice that the [OK] and [Cancel] buttons are placed in the upper
right corner by default. You can change the size and position of these
buttons, but you cannot delete them. They are integral to the Dialog
function.

Adding Controls
Use the Dialog Builder to select controls that will instruct the user during
batch processing. There are six controls. These controls are the building

8 - 13

Chapter 8

Advanced Techniques
blocks you use to build a custom dialog box. You can use controls to
display:

custom text messages to prompt or inform the user using the Text
control

text boxes to accept user input using the Edit control

checkboxes to present options to the user using the Checkbox


control

radiobuttons to present options where the user must select one using
the Radiobutton control

dropdowns of custom lists for the user to select one item using the
Dropdown list control

item lists to display fields of any type, variables of any type, lists of
batches, Input File Definitions, Views, Workspaces, or Indexes using
the Document item list control

Each type of control is added in the same way:


1.

Click the button of the control you want to add.

2.

Move the mouse to the definition area. The cursor changes to a


(box with a plus at the top left corner).

3.

Click in the definition area where you want the top left of the control
to be placed. ACL immediately displays the control edit dialog box
for the type of control you have selected.

4.

When you are finished entering parameters for that control, click
[OK].

ACL places the control in the Dialog Builder.

Editing Controls
You can edit each type of control in the same way. Simply double click the
control to display the control edit dialog box. Then edit the controls
parameters and click [OK]. For details on each controls parameters, see
the following sections.
To change a controls position in the dialog box, drag the control to a new
position.
To change a controls size, click the control and move your cursor over
any of its size handles (the black squares) until your cursor changes to a
double arrow. Then drag the size handle to resize the control.

8 - 14

Chapter 8

Advanced Techniques

To edit the dialog boxs title and size, double click anywhere in the gray
definition area where there is no control to display the User Dialog dialog
box.

Make the changes and click [OK]. Alternatively, you can change a dialog
boxs size by dragging the size handle at the bottom right of the dialog
box.
To Add a Text Message to the Dialog Box

To include a static text message in your dialog box to prompt or inform


the user, use a Text control.
Click the
(Text) button and then click in the gray definition area
where you want to place the top left of the control. ACL displays the Text
dialog box.

ACL displays this


text in the dialog box

8 - 15

Chapter 8

Advanced Techniques

Label

Specifies the message you want to display in your


custom dialog box. For example, type (QWHU#WKH#
'HSDUWPHQW=.
Maximum: 250 characters including spaces.

Alignment

Specifies whether the message is aligned left, center,


or right.

To Add an Editbox to the Dialog Box

To add an edit box to accept user input, use the Editbox control.
Click the
(Editbox) button and then click in the gray definition area
where you want to place the top left of the control. ACL displays the
Editbox dialog box.

default variable name

Variable

Specifies the name of the variable to be created to


contain the result of this control. Since the default
variable name is not very informative, you should
change it to a more meaningful name.
This control creates a character variable which
contains the contents of the Default Text text box.

Default Text

8 - 16

Specifies the text to be displayed in the Editbox as the


default text.

Chapter 8

Advanced Techniques
To Add a Checkbox to the Dialog Box

To add a control to present True or False (or On or Off) options to the


user, use a Checkbox control.
Click the
(Checkbox) button and then click in the gray definition area
where you want to place the top left of the control. ACL displays the
Checkbox dialog box.

Variable

Specifies the name of the variable to be created to


contain the result of this control. Since the default
variable name is not very informative, you should
change is to a more meaningful name.
This control creates a logical variable that is True if
the checkbox is checked and False is the checkbox is
unchecked.

Label

Specifies the text to be displayed beside the


checkbox.

Initial State

Specifies whether the checkbox is checked or


unchecked when the control is first displayed.

To Add Radiobuttons to the Dialog Box

To add a control to present mutually exclusive options where the user


must select one, use a radiobutton control.

8 - 17

Chapter 8

Advanced Techniques
Click the
(Radiobuttons) button and then click in the gray definition
area where you want to place the top left of the control. ACL displays the
Radiobuttons dialog box.

Variable

Specifies the name of the variable to be created to


contain the result of this control. Since the default
variable name is not very informative, you should
change it to a more meaningful name.
This control creates a numeric variable which
contains 1 if the first radiobutton is chosen, 2 if the
second radiobutton is chosen, and so on.

Label List

Lists the text to be displayed beside each radiobutton.


Click a label to select it. You can then click the
appropriate button to replace, delete, or set that
radiobutton as the selected radiobutton by default.

8 - 18

Alignment

Specifies whether the radiobuttons are positioned


horizontally side-by-side or vertically one on top of
another.

Label

Specifies the text to be displayed beside each


radiobutton.

Chapter 8

Advanced Techniques
[Add]

Adds the label in the Label text box to the bottom of


the Label List.

[Insert]

Inserts the label in the Label text box above the


selected item in the Label List.

[Replace]

Replaces the selected item in the Label List with what


is in the Label text box.

[Delete]

Removes the selected item in the Label List.

[Set Default]

Makes the highlighted item in the Label List selected


by default.

To Add a Dropdown List to the Dialog Box

To add a control for the user to select one item from a custom dropdown
list, use a Dropdown control.
Click the
(Dropdown list) button and then click in the gray
definition area where you want to place the top left of the control. ACL
displays the Dropdown list dialog box.

8 - 19

Chapter 8

Advanced Techniques

Variable

Specifies the name of the variable to be created to


contain the result of this control. Since the default
variable name is not very informative, you should
change it to a more meaningful name.
This control creates a character variable which
contains the text of the item the user selects.

Label List

Lists the text to be displayed in the dropdown list.


Click a label to select it. You can then click the
appropriate button to replace, delete, or set that label
as selected by default.

Label

Specifies the text to be displayed in the dropdown


list.

[Add]

Adds the label in the Label text box to the bottom of


the Label List.

[Insert]

Inserts the label in the Label text box above the


selected item in the Label List.

[Replace]

Replaces the selected item in the Label List with what


is in the Label text box.

[Delete]

Removes the selected item in the Label List.

[Set Default]

Makes the highlighted item in the Label List selected


by default.

To Add a Document Item List to the Dialog Box

A Document item list displays a dropdown of definitions that are in your


ACL document. You can display one or more categories of definitions,
including character, numeric, logical, or date fields, character, numeric,
logical, or date variables, input file definitions, batches, views,
workspaces, and indexes.
For example, you can create a document dropdown list to display all the
input file definitions. When the user selects an input file definition, the
batch can use a macro command to open that input file definition and
analyze the data. For more information on using macros, see Using
Macros in Batches on page 27 in the ACL for Windows User Guide.

8 - 20

Chapter 8

Advanced Techniques

To add a dropdown of one or more categories of definition, use the


Document item list control.
Click the
(Document item list) button and then click in the gray
definition area where you want to place the top left of the control. ACL
displays the Document item list dialog box.

select the category of


item to display
ACL displays these
categories of items from
your ACL document

Controls

Each control has a dialog box that allows you to change the characteristics
of the control.
While each of these dialog boxes is unique, they have one feature in
common: the group of parameters labeled Position and Size. Most of the
time, you do not need to use these parameters, as you can more easily
change the position and size of a control by dragging it in the Dialog
Builder itself.
If you do choose to edit these values directly, the parameters have the
following meanings:
x and y

Specifies the horizontal and vertical positions of the


control respectively, in pixels. This is the position of
the upper left corner of the control.

8 - 21

Chapter 8

Advanced Techniques

Width

Specifies the width of the control in pixels.


If the Auto checkbox is checked, then ACL
automatically supplies a width large enough to
include the contents you have put into the control.

Height

If the Auto checkbox is not checked, you can specify


the width manually.
Specifies the height of the control in pixels.
For single line controls, ACL uses the standard height
according to your computer.
If the Auto checkbox is checked, then ACL
automatically supplies a height large enough to
include the contents you have put into the control.
If the Auto checkbox is not checked, you can specify
the height manually.
Specifying a height too small for the contents will
cause multiline controls to be squashed together and
even overlap.

Note:

For the most consistent look, we recommend that you do not


change the size manually. If you make a control narrower, text
will wrap to multiple lines, in which case you need to increase
the height.

Variable

Specifies the name of the variable to be created to


contain the result of this control. Since the default
variable name is not very informative, you should
change it to a more meaningful name.
This control creates a character variable which
contains the text of the item the user selects.

Category
List

Lists the categories of objects to be displayed in the


dropdown.
Click a label to select it. You can then click the
appropriate button to replace, delete, or set that
category as selected by default.

Category

8 - 22

Specifies the category of definition to be displayed in


the dropdown list.

Chapter 8

Advanced Techniques
[Add]

Adds the category in the Category dropdown to the


bottom of the Category List.

[Insert]

Inserts the category in the Category dropdown above


the selected item in the Category List.

[Replace]

Replaces the selected item in the Category List with


what is in the Category dropdown.

[Delete]

Removes the selected item in the Category List.

[Set
Default]

Makes the highlighted item in the Category List


selected by default.
This is not a category. This is an item. If the Category
List does not include this item, then it will be added
even if it is not a definition category.

The six controls look similar to the following:

text
editbox
checkbox
dropdown list
radiobuttons

document item list

Deleting Controls
To delete any control, click the control to select it and then click the
(Delete) button.

Saving the Dialog Box in the Batch


Now that you have entered all the controls you want and given your
dialog box a meaningful name, save the custom dialog box.

8 - 23

Chapter 8

Advanced Techniques
Close the Dialog Builder window. ACL asks if you want to Save changes
to dialog? Click [OK] to save the dialog box, [Cancel] to return to the
Dialog Builder, or [Discard] to discard changes.
ACL displays the Dialog Builder command line in the Batch window
similar to this:

dialog builder
command

Note:

The Dialog Builder command must be one long line in the batch, but
for the purpose of showing it in the above window, the command
has been wrapped to multiple lines.
Now that you have created a custom dialog box for your batch, save the
batch.
1.

Close the batch window. ACL asks you if you want to save the batch.

2.

Type a new name for the batch in the text box and click [OK].

For more information: See DIALOG on page 2-48 in the ACL for
Windows Reference Manual.

Editing an Existing Dialog Box


To edit or delete the controls of an existing dialog box, do the following:
1.

8 - 24

In the Overview window, double click an existing batch or drag the


icon of an existing batch onto the application workspace. ACL
displays a dialog box asking Would you like to edit or run batch?

Chapter 8

Advanced Techniques
2.

Click [Edit]. ACL displays the batch window.

3.

Double click the Dialog Builder command (the line beginning with
DIALOG) in the Batch window and then click the
(Edit the
Command) button. ACL displays the Dialog Builder created by that
command:

delete

resize handle

You can modify the dialog box as you wish using the procedures in
Adding Controls on page 13 in the ACL for Windows User Guide,
Editing Controls on page 14 in the ACL for Windows User Guide, and
Deleting Controls on page 23 in the ACL for Windows User Guide.

Running the Dialog in a Batch


To run the batch, do the following:
1.

Double click the name of the batch in the Overview window. ACL
asks you if you want to edit or run the batch.

2.

Click [Run] to execute the batch. ACL displays your custom dialog
box for user input at the point in the batch in which you created it.

8 - 25

Chapter 8

Advanced Techniques
For example, during the running of a batch, a dialog box similar to
the following could display for user input:

The user would select a payroll file from the Select the Payroll File
dropdown, a field from the Select Field to Test dropdown, the
Greater or Less radiobutton, and type a value in the Amount text
box, and then click [OK].
You can quickly obtain a wide range of information using a custom dialog
box.

Handling Error Messages in a Batch


In addition to using the Dialog Builder to create custom dialog boxes,
batches can display informational dialog boxes. This is useful for advising
the user of error conditions or provide other reminders.
Pause

The Pause command pauses a batch and displays a dialog box with a
message for the user. It cannot accept input. You can include a condition
in the Pause command so that the dialog box only appears if the condition
is met.
For more information: See PAUSE on page 2-136 in the ACL for
Windows Reference Manual.

8 - 26

Chapter 8

Advanced Techniques

Using Macros in Batches


Macros are variables that are substituted into a command. A macro is
identified by the percent sign (%) in front of and after it. When a macro is
encountered, ACL evaluates the macro and substitutes its value in the
command.
When specifying a macro, the name between the % symbols must be the
name of a character variable. Character fields are not permitted. When
the macro is encountered, it is removed and replaced with the contents of
the variable. For example:
ifx = "if Amt>0"
thencount %x%generates
count if Amt>0
New

Note:

Any text can be placed in a macro. Multiple words, whole


expressions or commands, or parts of names can be included in a
macro.
Macros are particularly useful for holding parameter values such as file
names, which ordinary variables cannot do. Generally, macros are
required whenever you want to change an item other than a number or
string in quotes. Macros can also be used in place of variables, or even in
place of commands themselves.
Macros may contain any text, multiple words or symbols, whole
expressions or commands, or parts of names. You may even place macros
inside a quoted string.
Macros are most often used in conjunction with the Accept or Dialog
commands. For example, assume you have a batch that can be run against
a number of different files, and which prompts you for which file to use.
This batch takes the form:
ACCEPT "Enter the file name:" FIELDS "xf" TO
INPUT
OPEN %INPUT%
. . .
When this batch is run, it presents a dropdown of file names and stores
the selection in the variable INPUT. For example, if the input file DEMO
is specified, INPUT has the value DEMO.

8 - 27

Chapter 8

Advanced Techniques
Because the INPUT variable refers to a file name, the second line in this
batch puts the INPUT variable in a macro in order to open the
appropriate file. Thus, the OPEN command is interpreted as OPEN
DEMO.
The file processing commands follow.

Utility Batches

One potential application for using macros in conjunction with user


interaction is the implementation of standard utility batches. As an
example, you might want a standard batch that extracts amounts and
exports them to a file in Lotus 1-2-3 format. Rather than recreate the
batch each time you want to export to Lotus, you can create a batch,
EXPORT_L, as follows:
OPEN %INPUT%
EXTRACT RECORD IF %FIELD%>%CUTOFF% TO TEMP
OPEN TEMP
EXPORT ALL LOTUS TO %OUTPUT%
CLOSE
This batch expects four variables to be predefined: INPUT, FIELD,
CUTOFF and OUTPUT. These values control how the commands are
executed. Once this batch is defined, you can call it in the following
manner:
INPUT='DEMO'
OUTPUT='TEST1'
FIELD='AMOUNT'
CUTOFF='1000000'
DO EXPORT_L
Another alternative is to include an Accept command at the beginning of
the batch to request the file name to be used. Because a file name has
already been assigned (INPUT='DEMO'), if no file is entered DEMO is
used. In this way, you can create default values for your Accept
commands.
INPUT='DEMO'
OUTPUT='TEST1'
FIELD='AMOUNT'
CUTOFF='1000000'
ACCEPT "Enter the file name:" TO INPUT
DO EXPORT_L

8 - 28

Chapter 8

Advanced Techniques

Command Groups
A group is a series of commands that is processed in a single pass of the
file. Groups can only be used as part of a batch. You cannot enter a
command group using the text box in the Command Log window.
The main reason for using groups is to increase processing speed.
Because reading disk-based files can be time consuming, using a group to
execute all commands in a single pass of the file can significantly reduce
total processing time.
You can also use groups to do the following:

Program with ACL


You can create groups of commands that perform complex
operations on a file, remember information from previous records,
or perform calculations spanning a number of records.

Process multiple record type files


These types of files have more than one type of record, and each
record type may require a different form of processing.

Process data in complex variable length files


These types of files require information from elsewhere in the file to
establish the correct record length, so a group of commands may be
the only means of coordinating the processing.

When building groups, you must indicate the start and end of a group
using the Group and End commands, respectively. You can include
expressions to specify test conditions, and Else commands to specify what
happens to records that do not meet a test:
GROUP IF PRODCLS < "05"
COUNT
STATISTICS INVOH
HISTOGRAM INVOH
STRATIFY INVOH ACCUMULATE INVOH
ELSE
TOTAL INVOH
END

8 - 29

Chapter 8

Advanced Techniques
Note:

It is considered good style to indent commands in a group. Although


not required, it helps to identify where a group starts and where it
ends.
In this example, the Count, Statistics, Histogram, and Stratify commands
are only processed for records that have a PRODCLS field whose value is
less than 05. The Else command causes all records that do not meet the
test to be processed with the Total command.
You can type Group, Else, Loop, and End commands into a batch, or
click the
(Group),
(Else),
(Loop) or
(End) buttons in a
batch window.

Note:

You cannot use any Do commands in a Group.

Types of Groups
There are three basic types of groups: simple groups, conditional groups,
and nested groups.
Simple Groups

Simple groups start with the Group command, followed by a series of


commands that finish with the End command. For example:
GROUP
COUNT
STATISTICS INVOH
HISTOGRAM INVOH
STRATIFY INVOH ACCUMULATE INVOH
END
In this example, ACL processes each of the commands as if they had been
entered separately. Therefore, Count, Statistics, Histogram, and Stratify
each produce the same results as if they had been entered without the
group. The only difference is that this group executes in about one third
the time.

Conditional Groups

Use conditional groups to process commands based on whether a


condition is true or false. Using conditional groups makes it much easier
to enter the commands and decreases processing time considerably.
GROUP IF PRODCLS < "05"
COUNT
STATISTICS INVOH
HISTOGRAM INVOH
STRATIFY INVOH ACCUMULATE INVOH
END

8 - 30

Chapter 8

Advanced Techniques

The commands in this group are only processed for records with a
PRODCLS field whose value is less than 05.
This group is functionally the same as the following commands, but the
group executes much faster:
COUNT IF PRODCLS < "05"
STATISTICS INVOH IF PRODCLS < "05"
HISTOGRAM INVOH IF PRODCLS < "05"
STRATIFY INVOH ACCUMULATE INVOH IF PRODCLS < "05"
Records that do not meet the test in a conditional group are ignored
unless you stipulate an Else command. In the next example, all records
that do not meet the test are processed by having their INVOH field
totalled.
GROUP IF PRODCLS < "05"
COUNT
STATISTICS INVOH
HISTOGRAM INVOH
STRATIFY INVOH ACCUMULATE INVOH
ELSE
TOTAL INVOH
END
The result is the same as if you entered the following commands:
COUNT IF PRODCLS < "05"
STATISTICS INVOH IF PRODCLS < "05"
HISTOGRAM INVOH IF PRODCLS < "05"
STRATIFY INVOH ACCUMULATE INVOH IF PRODCLS < "05"
TOTAL INVOH IF PRODCLS >= "05"
Any number of commands can follow the Else command.
You can also have a number of different Else commands within the same
group, as long as each Else command contains a different test. For
example:
GROUP IF PRODCLS < "05"
COUNT
STATISTICS INVOH
HISTOGRAM INVOH
STRATIFY INVOH ACCUMULATE INVOH
ELSE IF PRODCLS = "05"
TOTAL INVOH

8 - 31

Chapter 8

Advanced Techniques
ELSE IF PRODCLS = "06"
TOTAL INVOH
ELSE IF PRODCLS = "07"
TOTAL INVOH
ELSE
TOTAL INVOH
END
In this example, the Else commands produce four additional totals. This
group essentially executes the following logic for each record in the file
individually:
Is PRODCLS <05?
If yes, execute the Count, Statistics, Histogram, and
Stratify commands
Otherwise, is it equal to 05?
If yes, total the INVOH field for
all records in which PRODCLS=05
Otherwise, is it equal to 06?
If yes, total the INVOH field for

all records in which PRODCLS=06


Otherwise, is it equal to 07?
If yes, total the INVOH field for

all records in which PRODCLS=07


Otherwise, total the INVOH field for

all records that did not meet any of


the above tests.

Nested Groups

Groups can be nested within each other. Nested groups provide a


powerful way for you to control which commands are executed for which
records. Most applications do not require such an advanced level of
functionality, but it is available, if necessary.
For nested groups, use the End command to terminate the most recent
group. ACL starts processing the data only after all group commands
have been terminated.

8 - 32

Chapter 8

Advanced Techniques
For example:

1 GROUP IF PRODCLS < "05"


2
COUNT
3
GROUP IF INVOH > 0
4
STATISTICS INVOH
5
HISTOGRAM INVOH IF STATUS = "B"
6
END
7
STRATIFY INVOH ACCUMULATE INVOH
8 ELSE
9
TOTAL INVOH
10 END
In this example, commands 2 through 7 are only executed if PRODCLS is
less than 05. Commands 4 and 5 are only executed if INVOH is greater
than zero. But, because the second group is (nested) inside the first group,
commands 4 and 5 are only executed for records that have PRODCLS <
05 and INVOH > 0. Furthermore, because command 5 also has a test, it
is only executed for records that have PRODCLS < 05 and INVOH > 0
and STATUS = B.

Using Variables in Groups


Automatic Variables

ACL automatically creates variables when commands such as Count,


Total, and Statistics are executed in a group. These variables are named
COUNTn, TOTALn, ABSn, and so on. For more information, see
Variables on page 85 in the ACL for Windows User Guide.
For variables produced by groups, n refers to the sequential number of
the command that created them, starting with the number 2. For
example:
GROUP IF PRODCLS<"05"
COUNT
STATISTICS INVOH
HISTOGRAM INVOH
END
In this example, the Count command produces the variable COUNT2
because it is the second command. The Group command is always
considered the first command. The Statistics command creates ABS3,
among other variables.

8 - 33

Chapter 8

Advanced Techniques
By comparison, executing the Count command without using a group
produces the variable COUNT1, because it is the only command being
executed.
You can also assign values to variables of your choice using the Assign
command. This is most often used to carry information from one record
to subsequent records, or to retain cumulative totals for use during
processing. As with all variables, they retain their value until you
explicitly change or delete them, or quit the ACL session.

User-Assigned Variables

Note:

Variables whose names begin with an underscore are not deleted


when you quit ACL. They are saved in the document and restored the
next time you open that document.
For example, if there is only supposed to be two outstanding invoices per
customer in a file, you will need to extract details of any additional ones in
order to follow up. To keep track of the outstanding invoices in the file,
use variables as follows:
COUNT=1
OLD_CUST='CUSTNO'
GROUP IF CUSTNO<>OLD_CUST
COUNT=1
OLD_CUST=CUSTNO
ELSE
COUNT=COUNT+1
EXTRACT RECORD IF COUNT>2 TO Extra_Invoices
END

Loop
Use the Loop command when you need to execute a series of commands
more than once for a particular record. This is most often done when a
record contains repetitive information that you want to process. This
command behaves very similarly to a Group, except that the commands
between the LOOP and END commands are executed repeatedly until the
test is false.

8 - 34

Chapter 8

Advanced Techniques

For more information: See LOOP on page 2-124 in the ACL for
Windows Reference Manual.

Creating a Group
To create a group, start by opening a batch. Within each batch you can
include one or more simple, conditional or nested groups.
1.

Open an existing batch or create one.

2.

Start each group with the Group command.


Either type GROUP and an optional expression, or click
to display the Group dialog box.

(Group)

if text box

Click [OK] if you do not want to add a condition.

To add a condition, type an expression in the If text box and


click [OK], or click [If] to display the expression builder.

When you are finished building the expression, click [OK] to enter
the expression in the [If] text box, and then click [OK] in the Group
dialog box.
The Group command and any specified conditions are entered in
your batch.
3.

Enter commands as required.


For more information: On how to enter commands, see Using
the batch window on page 2 in the ACL for Windows User Guide.

8 - 35

Chapter 8

Advanced Techniques
4.

Optionally, type the Loop command and specify a condition for it, or
click
(Loop) to display the Loop dialog box.

while text box

Type an expression in the While text box and click [OK], or click
[While] to display the expression builder.
When you are finished building the expression, click [OK] to enter
the expression in the While text box, and then click [OK] to close the
Loop dialog box.
The Loop command and any specified conditions are entered in
your batch.
For more information: On the Loop command, see LOOP on
page 2-124 in the ACL for Windows Reference Manual.
5.

Optionally, type the Else command and specify what happens to


records that do not meet a test in a conditional group, or click
(Else) to display the Else dialog box.

if text box

8 - 36

Chapter 8

Advanced Techniques

Click [OK] if you do not want to enter a condition.

Type an expression in the If text box and click [OK], or click [If]
to open the expression builder.

When you are finished building the expression, click [OK] to enter
the expression in the [If] text box, and then click [OK] to close the
Else dialog box.
The Else command and any specified conditions are entered in your
batch.
6.

Finish each group with the End command. You can either type END,
or click
(End) to enter it.

7.

When you are done, close the batch and save any changes. If this is a
new batch, you must also name the batch.

Command Mode
The Command Log window has two purposes:

The command log records and displays the commands and/or


results during an ACL session, and is a valuable component of
documentation.
For more information: On the command log, see Automatic
Command Log on page 47 in the ACL for Windows User Guide.

In command mode, commands are entered by typing a command in


the command log text box, or by copying commands from the log
into the text box.

ACL commands are patterned after the English language, and their
names indicate what they do. For example, the Total command totals one
or more fields, and the Sample command selects samples from a
population contained in an input file.
Each command allows a number of specific attributes (parameters) to be
specified. These are described under each command in the ACL for
Windows Reference Manual.

8 - 37

Chapter 8

Advanced Techniques

The Command Log


Use the Command Log window to enter commands in command mode.
Click
on the button bar, or select Window from the menu bar and
choose Open Command Log. ACL displays the Command Log window.

display type
dropdown
command
result

command log
text box

Note:

If you select the Last Result option in the display type dropdown,
ACL will display the Last Result in the command log the next time
you open the document. If you select any other option in the
dropdown, ACL will display the Log File contents the next time you
open the document.
When you enter a command in command mode, you can see the results
immediately in the command log. All commands are shown in the log,
whether they were selected from a menu, executed during the running of
a batch, entered from the command log text box, or autoexecuted from
the view. Commands in the command log are prefixed by the @ symbol to
differentiate them from the results.
In the top portion of the window you can:

8 - 38

Click the dropdown list box and choose one of the options to display
only commands, only results, the last result, or both commands and
results.

Type a command in the text box and click the


(Edit the
Command) button to display the dialog box associated with the
command.

Click

to clear the contents of the text box.

Chapter 8

Advanced Techniques

Click

or press

to execute the command in the text box.

Entering Commands in the Command Log


You can execute commands by typing them in the text box of the
Command Log window. You can type commands in uppercase or
lowercase characters. When the command is long, ACL expands the text
box to display the entire command. Click outside the text box to collapse
it and click inside the text box to display the entire command again. You
can use the Cut, Copy, Paste, and Undo options from the Edit menu,
and standard keyboard editing techniques to make changes to entries in
the text box.
You can use the Command Log window to create a graph from a
Histogram, Stratify, Classify, or Age command executed by any version
of ACL. Simply double click a graphable commands result to view the
graph again. Click the X [Edit the command button] to edit the
command and rerun the command to create new a graph.
For more information: For more details, see Using the Command
Log to Graph on page 35 in the ACL for Windows User Guide.
For example, to total the field called PROFIT, simply type:

Typing Fields

TOTAL PROFIT
To specify more than one field, separate the fields with a blank:
TOTAL PROFIT SALEPR COST
Note:

Inserting Fields

Commands entered in the command log text box or through the


running of a batch apply any global filter you may have active.
Therefore, the TOTAL PROFIT command totals only the records that
meet the global filter.
Rather than having to remember all the field names when entering
commands, you can press the F2 key to display the Insert Fields dialog
box. Click the dropdown and choose one of the options to display a list of
all currently available fields, variables, characters, dates, logicals, or
numerals.

8 - 39

Chapter 8

Advanced Techniques

Edit the command


field types
dropdown

available
parameters

input file
dropdown

Use the Insert Fields dialog box to quickly select and insert fields or
variables at the position of your cursor.
Click
or press
box and start over.

to enter the command, or click

to clear the text

You can specify one of two keywords to modify the way a command is
processed:
ALL

Specifies every appropriate field. Using ALL is the same as


typing the name of each field in the input file that is
appropriate at that point. If the command syntax only
allows numeric fields (such as the Total command), ALL
means all numeric fields.
For example:
TOTAL ALL
Computed fields output their respective calculated values
(their formulas are not included in the output).

RECORD

8 - 40

Refers to the whole data record as a unit, without


reference to the specific fields making up the record. This
parameter is only appropriate when the command creates
an output file.

Chapter 8

Advanced Techniques

If RECORD is specified for an output file, the file contains


an exact copy of the input record. Field definitions are
automatically shared between the input and output files
by default, so changes to a field in one file are
automatically reflected in the other file.
EXTRACT RECORD TO EXTR_1 IF AMOUNT>0
You can change your preference to make a copy of the
field definitions instead of sharing them.
For more information: See Input File Options on
page 7-4.

For more information: See the ACL for Windows Reference Manual
for the command mode syntax of all commands. See also Common
Parameters on page 1-12 in the ACL for Windows Reference Manual for
command parameters and keywords.
In the procedures that follow, entering a command refers to typing the
.
command and then clicking
or pressing
Using Abbreviations

You can abbreviate commands, functions, and keywords in command


mode. The abbreviation must include the leading characters of the term
or command. The abbreviation can be as short as you like, as long as it
uniquely identifies the command or term.
The following example shows abbreviations for the Stratify command,
the keyword ACCUMULATE, and for the MINIMUM and MAXIMUM
parameters.
STRAT ON VALUE ACCUM VALUE MIN 10 MAX 19700

Using Command
Prompting

You do not have to type the command parameters and keywords when
using command mode. Just type the command name, and ACL prompts
you for any missing information when you either enter the command, or
click
(Edit the Command).
For example:
1.

Type the TOTAL command without specifying which fields to total.

8 - 41

Chapter 8

Advanced Techniques
2.

Click
(Edit the Command), or press
. ACL displays the
prompt, Enter the fields to TOTAL. Click [OK] to remove the
message.
The Total dialog box is displayed as a guide to executing the
command.

if text box

Note:

Copying Commands

Any parameters supplied on the command line are included in


the command dialog box. For example, if you typed the
command TOTAL IF UNCST>100, UNCST>100 would appear in
the If text box.

You can also copy a command listed in the command log to the text box,
optionally edit the command and then process it.
1.

Click a command in the command log. ACL copies the command


into the text box. If there is information in the text box, ACL copies
the command over it.

2.

Either:

Edit the command in the text box and press

, or

Click
(Edit the Command). ACL displays the corresponding
command dialog box with the options you used previously
already filled in. Make changes as required and click [OK] to
execute the command.

In this way, you can quickly re-enter complex commands, because


you do not have to retype or reselect fields and other options.
Note:

8 - 42

ACL displays the same command dialog boxes when using


command mode as the ones displayed when entering
commands using menu choices.

Chapter 8

Advanced Techniques

For more information: Details on using these dialog boxes can be


found in Issuing Commands on page 1-2 in the ACL for Windows
Reference Manual.

Using Field Modifiers


Use field modifiers in commands to determine how you want
information displayed, printed or written.
ACL supports a variety of optional field modifiers that are really
expression modifiers because ACL treats fields as part of expressions.
These change the manner in which the specified expression or field name
is processed or displayed. Some of these modifiers can be used in any
context, while others are limited to certain commands.
Field modifiers entered on the command line are effective only for the
specified command. A modifier must immediately follow the expression
or field to which it applies. More than one modifier can be specified for a
single expression, and the order in which they are specified is not
important.
An example of a command that includes a modifier is:
TOTAL AMOUNT AS "Transaction Amount"
The field modifier AS causes ACL to temporarily replace the name of the
AMOUNT field with Transaction Amount.
Note:

The effects of field modifiers apply only to the results of the


command with which they are used. Modifiers do not change any of
the field attributes as they appear in the input file definition.
Field modifiers include:
AS

Use the AS clause to specify (in quotes) a


replacement name for an existing field or for an ad
hoc expression. For example:
DISPLAY QTYOH * UNCST AS
"INVENTORY;VALUE"

8 - 43

Chapter 8

Advanced Techniques

Some results are displayed in the command log in


columnar format. The column heading can consist
of multiple lines. Specify line breaks by inserting
semicolons in the column header.
If AS is used in a command that creates another
file, the name specified in the AS clause becomes
the field name in the input file definition.
Because the name is a character string, any
character expression is valid.
DESCENDING

Refers to the descending sort order in key field


specifications of the Index, Sequence or Sort
commands, and must be abbreviated to D.
For example:
SORT ON LOC PRODCLS INVOH D TO
FILE2
In this example, the open file is sorted on the three
fields named LOC (location), PRODCLS (product
class), and INVOH (inventory on hand), and sent
to an output file, FILE2. The sort order of the
output file is ascending for LOC and PRODCLS,
and descending for INVOH within each location
and product class.

PICTURE

The PIC clause is used to specify a format for a


numeric field. For example:
EXTRACT AMOUNT PIC "$9,999,999.99"
IF AMOUNT < 0 TO NEGFILE
In NEGFILE, the AMOUNT field is shown with a
leading dollar sign ($), comma as a separator, and
a decimal point.
For more information: See Formatting
Numeric Fields on page 25 in the ACL for
Windows User GuideandFormatting Date Fields
on page 25 in the ACL for Windows User Guide for
complete details on numeric and date formatting.

8 - 44

Chapter 8

Advanced Techniques
PAGE

This modifier is only valid for key fields for the


Report command. It inserts a page break after the
totals for the specified key field. For example:
REPORT ON LOC PAGE PRODCLS
ACCUMULATE INVOH
In this example, the command produces a report
with two levels of subtotals: by location and by
product class within location. After each location
subtotal line, the report continues at the top of a
new page.

SUPPRESS

This modifier signals that totals for numeric


expressions or fields are not to be output.
SUPPRESS temporarily overrides a fields
Suppress Totals checkbox.
For more information: See Checkbox
Options on page 27 in the ACL for Windows User
Guide.
The term SUPPRESS is also used as a command
modifier for the Stratify and Histogram
commands.
For more information: For details, see
HISTOGRAM on page 2-91 and STRATIFY
on page 2-224 in the ACL for Windows Reference
Manual.

WIDTH

The WIDTH clause alters the default print width of


the specified field or expression. WIDTH
temporarily overrides a fields defined width.
For more information: See Column Width
on page 25 in the ACL for Windows User Guide.

8 - 45

Chapter 8

Advanced Techniques
NOZEROS

This modifier is only valid for numeric fields in a


report. It causes zero values to be displayed or
printed as blanks. For example:
REPORT ON LOC PRODCLS QTYOH
NOZEROS ACCUMULATE INVOH

NODUPS

This modifier is only valid for report key fields. It


blanks out repetitions of the key field. For
example:
REPORT ON LOC PRODCLS NODUPS
ACCUMULATE INVOH

Entering Expressions
You can include expressions in a command to create values that do not
exist directly in the data, or to specify an IF test. By definition, an
expression is a combination of physical and computed fields, functions,
constants, variables, and operators.
For example:
COUNT IF PAID_DATE - DUE_DATE > 30
This command tells you how many transaction records were paid more
than 30 days after the due date.
TOTAL INVOH * PRICE
This command produces the total of a field that is the product of the
INVOH and PRICE fields.
An expression can be named with the AS clause, can specify the output
width, and can contain a PICTURE clause.
You should always specify an AS clause for ad hoc expressions such as
QTYOH * UNCST, because the default name for such expressions
(EXPR_1, for example) is not descriptive. Specifying QTYOH * UNCST
AS VALUE ensures that your results are clearly labeled.
For more information: On expressions, see Expression Builder on
page 1 in the ACL for Windows User Guide.

8 - 46

Chapter 8

Advanced Techniques

Using Scope Parameters


Most processing commands allow the inclusion of scope parameters that
either limit how much of the active file is to be processed, or limit the
execution of a command or batch. Scope parameters include:
IF

The format of this parameter is:


IF test
IF filters out all records that fail the test. A typical example
of this clause is:
COUNT IF AMOUNT > 0
This example only counts those records in which the
amount field is greater than zero.
IF tests can be used in conjunction with WHILE, NEXT
or FIRST when processing records.

WHILE

The format of this parameter is:


WHILE test
Starting at the current file position, this parameter causes
ACL processing to terminate as soon as the specified test
evaluates as false (or the end of the file is reached).
A typical example is:
COUNT WHILE CLASS = "07"

Note:

Because this parameter can cause an early


termination of processing, it cannot be specified
inside a group (although it can be used in the
outermost Group command itself).
If the execution of the commands is halted due to a
WHILE clause, the file is left positioned at the first record
that failed the test (unless the end of the file was reached,
in which case the file is repositioned to the first record).
On completion of a command in which both WHILE and
NEXT are specified, the file is left positioned based on the
first of the two clauses to terminate processing. This
means that the entire file does not need to be processed.

8 - 47

Chapter 8

Advanced Techniques
A WHILE clause can be used in conjunction with IF,
NEXT, or FIRST for record processing.
NEXT

The format of this parameter is:


NEXT range
Starting at the current position in the file, this parameter
causes ACL to process the specified range of records. A
typical example is:
TOTAL ALL NEXT 10
The range refers to the number of records specified.
NEXT causes ACL data file processing to terminate as
soon as the range is exhausted (or the end of the file is
reached). The NEXT clause is applied first and
independent of the IF test. For example, NEXT 10
terminates after the tenth record read, regardless of how
many records passed a concurrent IF test.

Note:

Because this parameter causes an early termination


of processing, it cannot be specified inside a group
(although it can be used in the outermost Group
command itself).
On completion of a command containing a NEXT clause,
the file is left positioned at the first record after the end of
the range of records (unless the end of the file was
reached, in which case the file is repositioned to the first
record).
If both WHILE and NEXT are specified in the same
command, the file is left positioned based on the first of
the two clauses to terminate record processing. This
means that the entire file does not be need to be processed
to report results.
The NEXT parameter can be used in conjunction with IF
or WHILE.

FIRST

The format of this parameter is:


FIRST range

8 - 48

Chapter 8

Advanced Techniques

No matter what your current file position may be, FIRST


causes a command to be executed on the specified range
of records starting from record 1. An example is:
TOTAL ALL FIRST 10
On completion of a command containing a FIRST clause,
the file is left positioned at the first record after the end of
the range of records (unless the end of the file was
reached, in which case the file is repositioned to the first
record).
The FIRST parameter can be used in conjunction with IF
or WHILE.
APPEND

The format of this parameter is:


command APPEND
APPEND adds your output to an existing file. Use
APPEND to bypass the dialog box that prompts you to
either overwrite or append to the existing file. This
parameter is only valid when the command creates an
output file.
A typical example is:
EXTRACT RECORD TO XTRACT.TXT APPEND

OPEN

The format of this parameter is:


command OPEN
This opens a new file as part of a command. Include the
OPEN parameter at the end of a command that creates a
file. You do not need a separate command to open the
created file. This parameter is only valid when the
command creates a data output file. A typical example is:
SORT ON AMOUNT TO SORTED.FIL OPEN

IF, WHILE, NEXT, and FIRST can be used separately or in conjunction


with each other.
When more than one scope parameter is specified, all tests are processed
in parallel. For example, starting at the current position in the file, the
following command extracts the AMOUNT field only WHILE the GL

8 - 49

Chapter 8

Advanced Techniques
field equals 101 and only IF the AMOUNT field contains a positive
value:
EXTRACT AMOUNT WHILE GL='101' IF AMOUNT>0

Conditional Fields
You can define a type of field called conditional fields that have a value
only when there is a value available.
For more information: On defining other field types, see Defining
Data Fields on page 18 in the ACL for Windows User Guide.
When the field condition is True for a given record, the data is read from
the file and used to create the field value, as with normal fields. If the
condition is False, the field has no value and ACL supplies an empty
value. An empty value is blanks for a character field and zero for
numbers.
A related option is the Static checkbox. This option is grayed out unless
the field is conditional. When a field is conditional, you can check the
Static checkbox.
Note:

Not all conditional fields are static, but all static fields are
conditional.
The effect of the Static checkbox is to retain a conditional fields value
until the condition is True again. In a normal conditional field, when the
condition is False the value is replaced with an empty value. In a Static
field, when the condition is False, the last valid value is left as the field
value.
This behavior is specifically designed to address files with Header
records. The Static checkbox should be checked whenever you indicate
that the field contents relate to subsequent records.

Note:

8 - 50

If you specify Static for the first field defined for a given active filter,
then all other fields defined for this filter will automatically have the
Static checkbox checked as well.

Chapter 8

Advanced Techniques

When you define the first conditional field based on a particular filter,
ACL asks if the record type is a header or detail record:

If the record type is a header record, then click [Yes]. This means that this
field, and all subsequent fields defined for this filter, will be static as well as
conditional.

Defining Static Conditional Fields


Any conditional field can be static. Making a conditional field static
affects how that field is processed. When an If test for a static field returns
false, rather than resetting the value to zero, ACL uses the last valid value
in the field until a new valid value is encountered.
Use the following criteria to determine when to make a conditional field
static:

Make a conditional field static if the field relates to a number of


subsequent records, such as header records in a report file.

Do not make a conditional field static if it does not relate to


subsequent records. Hence, when the If test is false, the field is filled
with blanks or zeros, as appropriate.

To create a static conditional field, click


(Edit File Definition) in the
button bar or select Edit from the menu bar, choose Input File
Definition, and click the [Edit fields/expressions] tab. ACL displays
the Input File Definition window showing the fields/expressions list.
Double click the field name to display the data definition for that field.
To make the field conditional, type a condition in the If text box, or click
[If] and use the expression builder. To make this conditional field static,
check the Static checkbox.

8 - 51

Chapter 8

Advanced Techniques
Note:

Instead of making individual fields conditional and static one at a


time, you can create and apply a filter in the Input Fie Definition
window to have ACL automatically make all fields conditional
based on that filter.
For more information: On creating and applying a data filter, see
Defining Filters on page 13 in the ACL for Windows User Guide.
After you have defined a filter, you can apply it by selecting it in the field/
filters dropdown in the Input File Definition window. Select a filter that
you want to apply to the fields you subsequently define.
fields/filters
dropdown

When you define the first conditional field based on a particular filter,
ACL asks if the record type is a header or detail record:

8 - 52

Advanced Techniques

Chapter 8
If the record type is a header record, then click [Yes]. This means that this
field, and all subsequent fields defined for this filter, will be static as well as
conditional.

Example

As an example, consider a multiple record type file that contains invoice


header records followed by invoice detail records. The header records
contain a Customer Name field and a Record Type field with a value of 1.
The detail records contain a Record Type field with a value of 2, as well as
some other fields.
For more information: On multiple record type files, see Multiple
Record Type Files on page 70 in the ACL for Windows User Guide.
You can create a conditional field to include data only when it is valid. For
instance, you could define the Customer Name field that would only be
valid for Record Type 1 because the same position in Record Type 2 is
occupied, for example, by the product number, unit price and quantity.
To process this file, you would first, in the Input File Definition window,
define the Customer Name field.
For more information: On how to define fields, see Defining Data
Fields on page 18 in the ACL for Windows User Guide.
Now double click Customer Name in the fields list box to display the
format options associated with the Customer Name field.
To exclude the Customer Name when it is not valid, specify a condition in
the If text box. In this case, because Customer Name is only valid for
record type 1 (header records) you can specify RECORD_TYPE=1 in the
If text box.

8 - 53

Chapter 8

Advanced Techniques

condition

Consider what the appropriate value of the Customer Name field should
be when working with Record Type 2 (detail records). You could choose
to:

Keep the customer name from the header record type. In this case,
your view would look like:
Customer Name

Product
Number

Unit Cost

Quantity

John Smith

0107

12.95

120

John Smith

0108

15.25

80

John Smith

0109

7.20

250

This is the preferred choice.

8 - 54

Chapter 8

Advanced Techniques

Alternatively, you may fill the field with blanks. If this is what you
want, do not check the Static checkbox after typing in the condition.
In this case, your view would like:
Customer Name

Product
Number

Unit Cost

Quantity

John Smith

0107

12.95

120

0108

15.25

80

0109

7.20

250

You may also use the product number, unit price, and total price,
which occupy the same byte position as the Customer Name field.
Generally, this is not a good idea, but if this is what you want, do not
make the field conditional. In this case, your view would look like:
Customer Name

Product
Number

Unit Cost

Quantity

John Smith

0107

12.95

120

010815.2580
01097.20250
This is the least preferable choice.

8 - 55

Chapter 8

Advanced Techniques
To retain the Customer Name from record type 1, check the Static
checkbox in the Input File Definition window.

check to make
field contents
static

The Static modifier indicates that the value of a field should be left
unchanged when the result of an IF test is false.
You would probably not make static conditional fields from information
relating to the detail records, because the information relates only to a
particular record.
Note:

Views that contain static conditional fields may update more slowly
as you scroll further away from the beginning of the file.

Processing Static Conditional Fields


In a static field, each subsequent records value may relate to a previous
record. For this reason, you cannot selectively extract records or
rearrange the record order.
In order to join unmatched records, or sort, sample, index or merge
records from a file containing static fields, use the Extract command.
For more information: See EXTRACT on page 2-74 in the ACL for
Windows Reference Manual to extract ALL fields, or just the fields of
interest, to a new file.

8 - 56

Chapter 8

Advanced Techniques

Extracting and Sampling Records

RECORD output cannot be used if you are working with static fields.
If you try to issue the Extract or Sample commands to output RECORD
from a file that contains static fields, ACL will automatically extract or
sample ALL fields (not records). The resulting file contains a new record
structure with only the defined fields. This also applies when you try to
extract records from within the Too Few Records dialog box.
Sorting, Indexing, Joining, and Merging Files

If you attempt to use the Sort or Index commands, ACL displays the
message, You may not re-order the file, or use RECORD when the file
contains STATIC fields. EXTRACT the required fields. This message is
also displayed when you try to join unmatched records or merge files that
contain static fields.
Before executing any of these commands, you must use the Extract
command to extract ALL fields, or just the fields of interest, to a new file,
and then process the file.
In addition, if you check the Presort checkbox in the Report dialog box
and you are trying to report on a static conditional field, or check the
Presort checkbox on any of the other command dialogues, ACL displays
a message informing you that you cannot rearrange the order of the
records in the file.

8 - 57

Chapter 8

Advanced Techniques

Data Relations
To use Data Relations, you must be familiar with the Join Command. Use
Data Relations to establish a relationship between two or more files. Most
functions of the Join command can be done faster and more easily with
Relations.

Planning Data Relations


Before you start to use Relations, you need a thorough understanding of
your files. You must first decide which files and fields you want to relate
and why you want to relate them. The time spent planning will likely save
you a lot of time and effort later.
First, locate a common field for each pair of files you want to relate. Look
at the first two files and make a note of the fields they have in common.
Continue to do this for each set of files, until you have the common fields
for each pair.
Next, decide which file will be the parent file. The parent file should
contain all the records you want to analyze. For example, if you have an
Accounts Receivable (AR) file with 500 invoices (records) and a
Customer file with 100 records, choosing the AR file as the parent file
allows you to analyze all 500 invoices in the AR file. On the other hand, if
you choose the Customer file as the parent file, you can only analyze 100
records, that is, one invoice for each customer.
When you have determined the parent file, index the files you want to
relate to it. These files are the related (also called the children) files. The
parent file does not have to be indexed.
For more information: See Index on page 65 in the ACL for
Windows User Guide.
After you have indexed the children files on the common field, open the
parent file. You are now ready to use the Relations dialog box to establish
a relationship.

8 - 58

Chapter 8

Advanced Techniques

You may find it helpful to sketch a diagram of how you want to relate files
and fields. For example, you may draw something that looks like the
following:
AR (parent file)
Customer (related file)
Invoice No.
Invoice Date
Customer Number
Contract Number
Invoice Amount
...

Customer Number
Name
Address
Credit Limit
...

Contract (related file)


Contract Number
Contract Date
Contract Type
Sales Rep Number
...
Sales Rep (related file)
Sales Rep Number
Name
Address
YTD Sales
...

As you can see, before you start to use Relations, it is important to know
your files. Look at the data in the AR, Customer, Contract, and Sales Rep
files to find the common fields for each pair of files you want to relate.
Notice that the AR and Customer files have the Customer Number field
in common. The AR and Contract files have Contract Number as the
common field, while the Contract and Sales Rep files have the Sales Rep
Number field in common. It is possible that the related files may have
more than one like field, but to relate each set of files, they must have at
least one field in common. The common fields do not need to have the
same field name.
In our example, the AR file is the parent file and, as such, does not have to
be indexed. Next, open the Customer, Contract, and Sales Rep files and
index each file on the common field. In this example, you would index the
Customer file on Customer Number, the Contract file on Contract
Number, and the Sales Rep file on Sales Rep Number.

8 - 59

Chapter 8

Advanced Techniques
When you index a file, it is a good idea to use meaningful index names. In
the case of master files, such as the Customer, Contract, and Sales Rep
files in our example, we recommend you name the index the same as the
input file definition, so that there is no confusion when you select an
index.
New

If an index file becomes outdated, ACL automatically recreates the index


file using the same index file name.
You can now open the AR file and set relations to the children files. After
1you have set one relationship, you can continue to set relations to either
the parent or a child file.
Now that you have seen an overview about how relations work, lets
define a relationship.

Defining Data Relations


Lets say you have thought about the relations you want to set; you have
decided on which files and fields you want to relate. You have chosen a
parent file and you have indexed the children files by the key field. You
can then start to define data relations.

8 - 60

1.

In the Overview window, double click the input file definition of the
parent file to open the file (in this case the AR file). Your open input
file is always your parent file.

2.

Click the
(Relations) button in the button bar, or select Data
from the menu bar and choose Relations. ACL displays the
Relations dialog box.

Chapter 8

Advanced Techniques

parent file

key fields

current
relations

In the Relationships list box, ACL reports that no known relations


exist. When you create a relation, ACL displays a description of it in
the Relationships list box.
3.

Select a character key field on which you want to relate. Alternatively,


you can click [Related on] to go to the Selected Fields dialog box and
select an available field. For example, select the NO field.
You can only use character fields or character expressions to build
relations. If the key field is not a character field, use the Expression
Builder to create an expression that is its character equivalent.
You can only select one key field or expression for each relation.
For more information: See Expression Builder on page 1 in the
ACL for Windows User Guide.

Note:

You can use the Expression Builder to create a character


expression that contains a combination of fields or strings or
substrings of fields. You can then use the expression as a key to
relate to another file. The related file must be indexed on the
same expression.

8 - 61

Chapter 8

Advanced Techniques
4.

From the Related File dropdown, choose the child file with which
you want to set a relationship. For example, choose the Customer
file.

5.

In the Using Index list box, select the index you want to use.
If the related file has not been indexed, ACL displays the message
Must create an index in the Using Index list box. You must close
the Relations dialog box, open the related file and index it before you
can set the relationship.

6.

Click [Relate]. ACL displays the relationship in chronological order


in the Relationships list box.

7.

You can only build one relationship between two files at one time. To
add additional files to the relationship, repeat steps 3 through 6 for
each additional data file.

8.

When you are finished creating relations, click [Done].

child file

related file
key field
index file

To change a relation, you must first delete the old relationship and then
define a new one. See Changing/Deleting Data Relations below.
You cannot change the order of relationships, as newer relationships may
depend on previous relationships.

8 - 62

Chapter 8

Advanced Techniques

ACL remembers the relationship from session to session, opening the


related file(s) automatically, as required.

Changing/Deleting Data Relations


You can only delete relationships in reverse chronological order from the
newest to the oldest as newer relationships may depend on older ones.
To delete a relationship, do the following:
1.

In the Relations dialog box, click [Delete last relationship] to delete


the most recently defined relationship at the bottom of the current
relations list box. ACL asks you if you want to delete the relationship.

2.

Click [Delete]. ACL deletes the latest relationship.

Working With Related Files


All dialog boxes with an Available Fields list box have a From Input File
dropdown (except the Workspace dialog box). This lets you work with
the fields from related files.
For example, to add a field (column) from a related file to the view of the
parent file, do the following:
1.

In the View window, click the


(Add Columns) button or press
the Insert hotkey. ACL displays the Add Columns dialog box.

2.

Select a related file from the From Input File dropdown. If there are
no file relations, ACL displays only the currently open input file.

related fields

related or open
input file

8 - 63

Chapter 8

Advanced Techniques
ACL lists all available fields from the file you select in the Available
Fields list box. Notice that the field names from related files are
prefaced with the related Input File Definition name, followed by the
field name.
3.

Double click the field names you want to add to the Selected Fields
list box. For example, customer.LIMIT, customer.NAME, and
customer.NO.

4.

Click [OK]. ACL adds the columns to the View window.

related Customer
file columns

As with adding any fields, if you highlight a column before adding fields,
ACL adds the related fields you selected to the left of the highlighted
column. If no columns are highlighted, ACL adds the related fields you
selected as the last columns.
When a record from the parent file finds a related record in a child file,
ACL displays the data from the fields in the related file. If there is
duplicate data in a related file, ACL uses the first occurrence.
Note:

8 - 64

Only records in the parent file are processed. There may be records
in the related file that do not appear in your view, as they were not
selected by records in the parent file.

Chapter 8

Advanced Techniques

When there is no match between the parent and the related files (in other
words, no comparable information), ACL displays a blank for character
and date fields, zero for numeric fields and F for logical fields.

blank when no data


is in the related file

Index
Some commands or processes require that an input data file be sorted a
certain way before you can use it. When you set up relationships between
files, the related file must be indexed on the field to be related. ACL offers
two ways to sort a data file:

The Sort command physically rearranges the file, and creates an


output file containing the records organized in the new sort
sequence. Because it creates an output file, sorting takes longer,
requires more disk space and results in a larger file than if you
indexed the file. Processing sorted files, however, is much faster than
processing an indexed file.
For more information: For complete details on using Sort, see
SORT on page 2-213 in the ACL for Windows Reference Manual.

The Index command, by contrast, does not reorganize the input data
file. It creates a smaller index file that contains pointers. When an
index file is opened for a particular input file, ACL can read and
process the input file in the sorted order.
Indexing a file is faster than sorting it. The resulting file (the index
file) is smaller and requires less disk space. However, subsequent
processing of the entire input data file can be considerably slower
than if the file had been sorted.

8 - 65

Chapter 8

Advanced Techniques
Once you create an index, you can link it and use it with an input data
file whenever you want. You can use the Find command to quickly
locate a record in an indexed file, and the Seek command to identify
a specific record.
New

ACL automatically updates index files that are outdated.


For more information: On using these two commands, see
FIND on page 2-81 and SEEK on page 2-185 in the ACL for
Windows Reference Manual.
You can close the index file or use a different index at any time.
Indexes can be conditional, allowing another level of filtering.
As an effective alternative to sorting and summarizing, you can use the
Classify command to summarize information directly based on a
specified key field. Classify can summarize on a key value, even when the
data is not sorted on the key.
For more information: See the commands CLASSIFY on page 2-19
and SUMMARIZE on page 2-232 in the ACL for Windows Reference
Manual.

Creating an Index File


1.

Open the input file for which you want to create an index.

2.

Either:

Click
Indexes in the Overview window and click
(New), or

Select Data from the menu bar and choose Index.

ACL displays the Index dialog box with options for creating indexes.

8 - 66

Chapter 8

Advanced Techniques

available fields

if text box
output file text box
automatically open
indexed file

Conditional Indexes

3.

Select one or more fields or expressions on which to index the input


data file.

4.

If you want, you can specify a condition for the index by clicking [If]
and using the expression builder, or just type a condition in the If
text box.
You can also limit how much of the input file is processed by
specifying a scope parameter. Click the [More] tab, select either the
All, First, or Next radiobutton, and fill in the appropriate text box.
A conditional index eliminates records that do not meet the specified
condition from the index file. This feature allows you to create index
files for subsets of a larger file.
Only records from the open input file which are processed (indexed)
have pointers in the resulting index file. This means that if processing
is terminated early by a conditional clause, the subsequent records
are not represented in the index file, and cannot be accessed when
using the index file.
It may not always be obvious that you are working with only a
fraction of the entire file. However, only records that meet the
condition will be processed by all commands that are executed while
the index is active. When you are reading less than the entire file with
an index, the number of records in the status bar informs you that
you are working with a Filtered Index.

8 - 67

Chapter 8

Advanced Techniques

For more information: See the command INDEX on page 2102 in the ACL for Windows Reference Manual for a complete
explanation of all the options available with the Index command.
5.

Enter a name for the index in the To text box.


If you turned on the Automatic Output Filenames preference, ACL
suggests a file name for the index. However, it is more meaningful to
specify your own name rather than accept the default suggestion. Use
one that references some of the important details about the index,
such as the data file for which it was created, the key fields, and so on.

6.

If you do not want to use the index at this time, uncheck the Use
Output File checkbox. Otherwise, ACL closes the current input file
and opens the one created by the Index command.

7.

When you are finished, click [OK]. After the index is created, ACL
displays the Command Log window.

When an index is being used with an input data file, ACL displays the
word Indexed next to the record count in the middle of the status bar.
If you have a view displayed, it immediately reflects the use of the index
and the records are displayed in the new, indexed order.
Note:

It is a good idea to keep a record of the details of each of the indexes


you create, including the key fields and any specified conditions.
One way of doing this is by creating a descriptive index name, such
as by dept amounts over 1000, using up to the 31 characters
allowed. Use the Overview window to graphically see the input file
definition and view to which the index belongs.

Opening an Index
When you create an index, you can choose to use it immediately, or you
can open it at any time by doing one of the following:

New

In the Overview window, expand the appropriate input file


definition, select the index file you want to use and click
(Open).
If the index file is out of date, ACL rebuilds it automatically.

Select Data from the menu bar and choose Select.


ACL displays the Select Input File Definition dialog box. Select the
input data file you want indexed from the list, and click [Index].

8 - 68

Chapter 8

Advanced Techniques

ACL displays the Select Index File dialog box, which lists all the
indexes that have been created for all data input files. Select the index
file you want to use, and click [Open].
If the index file is out of date, ACL automatically updates it.
ACL links the input data file to the index you have chosen, displaying the
word Indexed next to the record count in the status bar. Records in the
current view are displayed in the new sorted order.
Note:

If you apply a filtered index, only those records that match the filter
condition are displayed in the indexed view. You must close the
index to return to the original view.

Closing an Index File


You can close an index at any time by doing one of the following:

Select the index file you want to close in the Overview window and
click
(Close), or

Select Data from the menu bar and choose Select. ACL displays the
Select Input File Definition dialog box. Click [No Index] and then
[Done] to exit.

ACL closes the index from the input data file and the word Indexed is
removed from the status bar. The current view reverts to its original,
unindexed order.

Maintaining Index Files


Use the Overview window to rename and delete indexes.
Renaming Indexes

To rename an index file:


1.

Click the index file you want to rename.

2.

Click

(Rename).

ACL displays a dialog box with the current name of the index file
highlighted in the text box.
3.
Deleting Indexes

Type a new name for the index file and click [OK].

To delete an index file:


1.

Click the index file you want to delete.

2.

Click

(Delete).

8 - 69

Chapter 8

Advanced Techniques
ACL displays a dialog box prompting you to delete the selected item.
3.
Note:

Click [OK] to delete the index file. Otherwise, click [Cancel].

Index files are stored outside of the document. When you delete an
index, not only is the reference to the file deleted from the
document, but the index file itself is also deleted from your hard
drive.

Multiple Record Type Files


Some files can have more than one record type. For example, multiple
record type files can consist of header, detail, and trailer records. In most
cases, these multiple record type files contain a field whose contents allow
you to distinguish between the record types, such as: H (for header
records), D (for detail records), and T (for trailer records).

The header records may contain such information as the customer


name, number, address, and so on.

The detail records may contain such information as the product


description, product number, sale price, and so on.

The trailer records may contain such information as totals for each
invoice.

An example is the INVOICE.FIL that is supplied with the ACL for


Windows Workbook files. For an example of one way to deal with this
kind of file.
For more information: See Defining Static Conditional Fields on
page 51 in the ACL for Windows User Guide.
Multiple record type files can have a record length that is either fixed or
variable. This discussion assumes you are working with a fixed record
length file.
For more information: For details on working with variable record
lengths, see Variable Length Records on page 76 in the ACL for
Windows User Guide.

8 - 70

Chapter 8

Advanced Techniques

Fixed Length Records


There are two ways to process a multiple record type file. The simpler
method is to work with one record type at a time, using filters that you
create. Alternatively, you can process more than one record type at a
time, either by using a group in a batch or by using static conditional
fields. For details on static conditional fields, see Defining Static
Conditional Fields on page 51 in the ACL for Windows User Guide.
The first step is to create an input file definition and define the fields in the
multiple record type file.
Creating an Input File
Definition

1.

To create an input file definition, either:

In the Overview window, click


then click
(New), or

Input File Definitions and

Select Data from the menu bar and choose Select. ACL displays
the Select Input File Definition dialog box. Click [New].

2.

ACL displays the Data Source dialog box with options for specifying
the source of the data file. Select the data source and click [OK].

3.

ACL displays the Locate Data File dialog box with options for
specifying the name and location of the data file. Double click the
data file to select it.
ACL displays the Input File Definition window with the [Input File
Options] tab selected.

4.

Confirm that ACL has correctly interpreted the file structure (the File
Type should be Fixed Record Length).

5.

Click the [Edit fields/expressions] tab and define the fields.


If there are fields common to all the different record types, define
them first.
For more information: See Defining Data Fields on page 18 in
the ACL for Windows User Guide for details on defining fields.

6.

When you are finished defining all common fields, click the [Add a
new data filter] tab to define a separate filter for each record type
in the file.
When you process a multiple record type file, you must process each
record type separately, so you need to create a separate filter for each
record type.

8 - 71

Chapter 8

Advanced Techniques
7.

Define a filter for one record type.


Click and drag to highlight a characteristic that uniquely identifies
one of the record types. For example, if the record type is stored in
the file, highlight the type (for Header records, the data file might
contain an H that you can highlight).

8.

Click [Include] to include the highlighted characteristic in the filter.


All records in the data file that do not meet the filter condition are
displayed in reverse video.

9.

Click
(Accept entry) and give the filter a meaningful name (for
example, you might name a filter that includes only header records,
HEADER). Click [OK].

10. ACL displays a dialog box prompting you to immediately apply your
filter. Click [Yes] to apply it now or click [No] to retain it for later
use. For this example, click [No].
11. Return to step 6 and continue to create filters until you have a
separate filter defined for each record type.
12. In the Input File Definition window showing the defined fields, click
the dropdown located beside the defined fields list box and select one
of the record type filters you have just defined.
13. Define the data fields that are specific to that record type. When you
define fields for header type records that relate to subsequent
records, click [Yes] in the following dialog box.

14. Repeat steps 12 and 13 for each of the record types in the data file.
When you are finished, close the Input File Definition window and
name the input file definition.

8 - 72

Chapter 8

Advanced Techniques

Processing a single record type


To process a single record type in a multiple record type file, do one of the
following:

In the View window, click


(Edit view filter) to display the
expression builder. In the Filters list box, double click a filter for the
record type and click [OK], or

Select Tools from the menu bar and choose Set Global Filter.
Choose the filter that identifies the record type you want to process
and click [OK].

Process the records as desired.

Processing more than one record type


The following example discusses how to simultaneously process more
than one record type in a multiple record type file.
Assume you have a file which contains two record types, Header, and
Detail. Header and Detail are filters that have been created to identify the
two record types.
If your file contains invoice header records (with an invoice date and
customer name and address) and detail records (with product number,
quantity, price and value), different commands are required to deal with
each of these record types. This is what a group of commands allows you
to do.
GROUP IF HEADER
COM these commands process an invoice header
. . .
ELSE IF DETAIL
COM these commands process an invoice detail
record
. . .
END
In this example, for header records, you may want to ensure
that the address is not blank. For detail records, you may
want to ensure that the product number is valid and that the
value is the quantity multiplied by the price.

8 - 73

Chapter 8

Advanced Techniques
In this way, you provide one set of processes for header records and a
different set of processes for detail records. This example can easily be
extended to include as many record types as you require.
Typically, when processing multiple record type files, you want ACL to
remember the customer name and address from the header record, so
that if you select one of the invoice lines you can also list this information.
You do this by ensuring that the fields from the header record are static
conditional, which happens automatically when you indicate it is a
header record.
In another case, you may want to ensure that the total of the detail records
are correctly reflected in the total record.
Assume that you have a multiple-record type invoice file (INVOICE.FIL)
and an input file definition for it. This file has three record types with the
following characteristics:

Each record starts with two common fields, the invoice number
(INVOICE), and the record type (TYPE).

Type 1 records are header records.


In addition to the two common fields, they also contain the customer
number, name and address, invoice date, and so on. In this example,
you are interested in the fields NAME, NUMBER, and DATE only.

Type 2 records are detail records.


There is one detail record for each line on the invoice. In addition to
the two common fields, each line contains product numbers,
quantity sold, total price for that line, and so on. There may be from
zero to hundreds of detail lines for a particular invoice. In this
example, you are interested in the PRODUCT, QUANTITY, and
AMOUNT fields.

Type 3 records are trailer records.


In addition to the two common fields, they contain all the
information that normally appears at the bottom of the invoice. In
this example, you are only interested in the TOTAL field, which is the
invoice total. TOTAL should be the total of the detail line
AMOUNTs for each invoice.

The following application samples the detail lines with an interval of


$12,000. For each selection made, it shows the detail information, as well
as the invoice date and the customer name and number from the header.
Finally, the application confirms that the total on the invoice trailer
records is correct.

8 - 74

Chapter 8

Advanced Techniques
1
2

6
7

COMMENT Open the invoice file


OPEN INVOICE.FIL
GROUP IF HEADER
COMMENT for a header record
COMMENT reset the invoice total
INVTOTAL=0.00
ELSE IF DETAIL
COMMENT For detail records: sample the
COMMENT amount field and output
COMMENT the header information as well as
COMMENT the detail information
SAMPLE AMOUNT INTERVAL 12000 FIXED 2439
INVOICE DATE NUMBER NAME PRODUCT QUANTITY
AMOUNT TO SAMP
COMMENT accumulate the detail lines for
COMMENT comparison with the total
INVTOTAL=INVTOTAL + AMOUNT
ELSE IF TRAILER
COMMENT For trailer records: ensure that the
COMMENT calculated total=file total
GROUP IF TOTAL <> INVTOTAL
COMMENT If not: write the invoice number
COMMENT and the two totals, for follow-up
EXTRACT TO ERRORS INVOICE TOTAL INVTOTAL
END
END
1.

The comments are optional, but they demonstrate how an


application can be documented during processing.

2.

The Open command opens the data file.

3.

This set of commands is only executed if the record type is a header


record. The invoice total counter is cleared to zero, because a new
header implies a new invoice to total.

4.

This set of commands is only executed if the record type is a detail


record. In this case, the application performs a statistical sample on
the amount field and accumulates the total invoice amounts. If a
selection is made, ACL not only outputs the information from the
detail line (INVOICE, PRODUCT, QUANTITY, and AMOUNT),
but also includes the static conditional information from the header
(DATE, NUMBER, and NAME).

8 - 75

Chapter 8

Advanced Techniques
5.

This set of commands is only executed if the record is a trailer record.


The commands compare the invoice total included in that record to
the invoice total calculated by adding the detail lines. If there are any
discrepancies, these are output to a file for follow up.

6.

Ends the group of commands started in area five of the application.

7.

Ends the original group of commands.

As output, this group of commands creates two files. The first file (SAMP)
contains the selected items, and the second file (ERRORS) contains any
totalling errors encountered.

Variable Length Records


As mentioned in the previous section, multiple record length files may
have records that are of fixed or variable length.
ACL automatically identifies and handles CR/LF and IBM variable length
files. Any portion of a field that extends beyond the end of a record is
padded with nulls. The value of any field entirely outside a record is blank
or zero, as appropriate.
There are several common types of variable length files:
CR/LF Files

Files in which the end of each record is indicated with a carriage


return and a line feed character, or just a CR, or just an LF.
ACL automatically identifies and handles a CR/LF file. Processing
and the creation of an input file definition for these files is identical to
that discussed under Fixed Length Records on page 71 in the ACL
for Windows User Guide.

Files With Record Length


in File

Files in which the length of each record is stored in a field in the


record, or in which they can be computed from values in the fields.
ACL automatically processes variable length record files that have
the record length stored in the file. However, you must define the
field that contains the record length. Name this field
RECORD_LENGTH and specify it as being a NUMERIC field type
with zero decimal places.
ACL assumes that a field named RECORD_LENGTH specifies the
record length and uses the value in the field automatically when
processing. The creation of an input file definition for and
subsequent processing of these files is identical to that discussed
under Fixed Length Records on page 71 in the ACL for Windows
User Guide.

8 - 76

Chapter 8

Advanced Techniques

IBM variable length files are a special case of files that contain their
record lengths. ACL identifies them immediately.

IBM Variable Length


Files

IBM variable length files store the record length of each record in the
first 4 bytes of the record. When you are creating the input file
definition, ignore the first 4 bytes at the beginning of each record.
Begin defining data starting in position 5. In every other aspect, the
processing and creation of an input file definition for IBM variable
length files is identical to that discussed under Fixed Length
Records on page 71 in the ACL for Windows User Guide.
Files Without Record
Length in File

Files in which the record length is not stored in the record, but the
record length of each record type is either known or can be
calculated.

Some variable length files do not have a field specifying the record length
in each record. If you know or can calculate the record length for each
record type, you can process them by doing the following:
a.

When you open the file, ACL identifies it as a fixed length file and
displays the data in the Input File Definition window. If ACL did not
recognize the file as fixed length, you must make it fixed length. In
the Record Length text box, type in the length of the longest record in
the file and press [Enter]. The data displayed on the screen at this
point may not make much sense.

b.

Click the [Edit fields/expressions] tab and define only the


record type field in the first record, or whatever fields are necessary
to determine the record length. Click
(Accept entry) to save the
field.

c.

Click
(Add a new expression) to define a conditional computed
field that specifies the length of each of the record types. Type
RECORD_LENGTH in the Name text box and assign a default value
equal to the length of the longest record in the file. ACL recognizes
this field name and automatically reads its contents as the record
length.

Click
(Insert a condition) and specify a condition in the
Condition text box that identifies one of the record types. In the
Value text box, enter the length of this type of record. Click
[OK] to close the Add a Condition and Value dialog box.

After assigning conditions and values for all the record types,
click
to accept the field definition. Close the window when
you are finished.

8 - 77

Chapter 8

Advanced Techniques
d.

Close the input file by selecting it in the Overview window and


clicking
(Close).

e.

Select Edit from the menu bar and choose Input File Definition.
Then click the [Edit fields/expressions] tab and proceed to
define the rest of the data fields.
Process this type of file in exactly the same way as discussed under
Fixed Length Records on page 71 in the ACL for Windows User
Guide.

Indeterminate Length Records


In some extreme cases, you cannot determine the record length by just
looking at the record. While processing this type of file is more complex,
it is not out of the question. This type of processing relies on assigning a
value to a variable named RECORD_LENGTH to set the record length
for this one record.
Assume you have a file with record types 1 and 2, where type 1 has a
length of 133 and type 2 has a length of 20. You cannot tell the record
types apart, but you know that the file starts with a record type 1, and each
record type 1 has a field that tells how many record type 2s follow.
The way to process this file is to create a variable named
RECORD_LENGTH, and assign a value of 133 if the record type is 1, and
20 if the record type is two.
We can process the file as shown in the following group.
Note:

We use the variable COUNTER to keep track of whether we are


expecting a record type of 1 or 2.
COUNTER=0
GROUP IF COUNT = 0
RECORD_LENGTH = 133
COUNTER = num_twos
COMMENT process type 1 records
ELSE
RECORD_LENGTH = 20
COUNTER = COUNTER - 1
COMMENT process type 2 records
END
Notice the assignment of RECORD_LENGTH, which stipulates the record
length for the current record only, overriding any automatic record

8 - 78

Chapter 8

Advanced Techniques

length calculations done by ACL. As each record is read, the record length
is set appropriately and processing continues.
As each record header is read, the record length is set and COUNTER is
also set based on the field, num_twos. If COUNTER is zero, ACL
assumes there is another header in the file. If COUNTER is not zero, ACL
reads the next type 2 record. Because the COUNTER is reset to zero, ACL
starts off expecting a header.
The Else portion of the group handles the type 2 records. As each record
is read, the group reduces COUNTER so that ACL knows when to expect
the next record header. This allows you to perform whatever processing is
necessary before moving on to the next bucket, or next record.
Now assume that you have a file in which a 50 byte header is followed by
a number of 8 byte blocks of fields (with the number of such blocks being
specified in the header). We call this a bucketed file, where each of the
blocks is a bucket. We can define a field to automatically calculate the
record lengths, that is, 50 + (8 * number_of_buckets).

Bucketed Files

To process this bucketed file, define a group as follows:


COUNTER=0
GROUP
COMMENT Process header
COUNTER=num_buckets
LOOP WHILE COUNTER > 0
COUNTER = COUNTER -1
COMMENT Process bucket
COMMENT using OFFSET() function
END
END
Note:

The input file definition should be specified as having a fixed record


length. This length should be at least as long as the longest record,
including buckets, or else you cannot access the individual fields.

8 - 79

Chapter 8

Advanced Techniques

Processing Report Files


A report file (sometimes referred to as a print spool file) is usually an
exact duplicate of a hard copy report. It may be produced as an alternative
to sending a report to a printer, or it may be the file that is produced as
part of the process of printing a report. In addition to the data itself, it
usually contains page headers, column titles, subtotals, spaces, and page
breaks.
One of the benefits of being able to process report files is that they are
often available when the data, in its original format, is not.
As well, obtaining data in a flat file format from a relational database
may not always be feasible. If you can obtain a report file of the data in
which you are interested, you do, in fact, have a flat sequential file. It just
happens to include the additional information of page headers and other
page formatting details.
It is usually a simple process for ACL to deal with report files. You can
treat a report file as a multiple record type file, as discussed previously, in
which the only type of record you are interested in is the one that contains
data. You want to ignore all the records that contain the page formatting
details.
Following is a summary about defining report files.
For more information: You can find more details about defining
report files are in Report File on page 12 in the ACL for Windows User
Guide.

Creating an Input File Definition


The first step is to create an input file definition by defining the fields in
the report file.
Creating an Input File
Definition

8 - 80

1.

To create an input file definition, either:

In the Overview window, click


then click
(New), or

Input File Definitions and

Select Data from the menu bar and choose Select. ACL displays
the Select Input File Definition dialog box. Click [New].

Chapter 8

Advanced Techniques
2.

ACL displays the Data Source dialog box. Select the source of your
data file and click [OK].

3.

ACL displays a dialog box with options for specifying the name and
location of the data file. Double click the data file to select it.
ACL displays the Input File Definition window showing the [Input
File Options] tab.

4.

Review ACLs analysis of the file.


Most report files contain either fixed length records or variable
length records with a CR/LF. You should not need to change the
input file definition details that ACL produces.
Before you define the fields you want to use, scroll down through the
records, past all the page and column header records until the first
record on the screen is the first data record.

5.

Click the [Add a new data filter] tab and define a filter that
uniquely identifies the data records.
For example, if there is a decimal point in position 71 for the data
records and there is no decimal point in the same position for any of
the non-data records, use the mouse to highlight the decimal point.
Click [Include] to define a filter. The line, Include . starting at 71
appears following Exclude All in the Data Filter list box.

Note:

You may need to exclude subtotals before completing the filter.


This is most often done by locating a place on the line which
always has data for a detail line, but is blank for totals.

6.

Click and drag on the blank area of the subtotal then click [Exclude].

7.

Click

8.

ACL displays a dialog box prompting you to immediately apply your


filter by keeping it active. Click [Yes] to apply it now.

(Accept entry) and save the filter using a meaningful name.

To ensure that the filter you define for the data line is automatically
selected, check the default filter.
For more information: See Creating Filters When Defining Data
Fields on page 13 in the ACL for Windows User Guide for another
example of how to define report files.
9.

Define the data fields specific to the data records. Each field you
define is automatically conditional based on the data record filter.

8 - 81

Chapter 8

Advanced Techniques

For more information: See Defining Data Fields on page 18 in


the ACL for Windows User Guide for details on defining fields.
If you wish to access report header information, define a filter that
selects only that header, and as with defining fields, indicate that the
information relates to subsequent records.
10. When you are finished, close the Input File Definition window and
name the input file definition.

Processing and Viewing Filtered Report File Records


You process report files in the same manner as any other file to which you
have applied a filter.
If the Hide Filtered Records preference is turned on, only the data records
in the report file you defined in Creating an Input File Definition on
page 80 in the ACL for Windows User Guide are displayed in the View
window and are available for processing. If the Hide Filtered Records
preference is turned off, the view displays the non-data records in gray to
indicate that they are not included in any processing.

Editing or Adding New Filter Conditions


If you want to edit the filter conditions you set up for a report file, click
(Edit File Definition) or select Edit from the menu bar and choose
Input File Definition. Then click the [Edit fields/expressions] tab
and double click the filter to edit it.
If you want to define a new filter, display the Input File Definition window
and click the [Add a new data filter] tab. For example, if you decide
that you do want to include certain header or footer information, you
may want to define a new filter that includes only header records, or a
combination of data records and specific header records. If you do so,
you must save the filter conditions using a filter name other than
Default_Filter.
To define fields based on the new filter, display the Input File Definition
window and click the [Add a new data filter] tab. Click the filter
dropdown (located at the top right), and select a predefined filter. Define
the fields as described in Defining Data Fields on page 18 in the ACL for
Windows User Guide.

8 - 82

Chapter 8

Advanced Techniques

Standard Applications
If you have the file, STDAPP.MNU located in the same directory as the
ACL executable, you can select Tools from the menu bar and choose
Standard Applications.
For more information on Standard Applications contact Technical
Support. See Contacting ACL on page 4 in the ACL for Windows User
Guide on for information on how to contact Technical Support.

Startup Parameters
When starting ACL, you can include optional command line parameters
to automatically load a document, initialize variables, or start a batch. In
this way, you can create canned applications that can be run by double
clicking an icon, or from a timer program that launches the application at
a specified time.
To use these optional command line parameters, go to the properties of
the program that show the command line, and enter the command line
parameters.
To use these optional command line parameters in Windows 95 or
Windows NT 4, click the Start button in the Taskbar, select Settings and
choose Taskbar. Select the [Start Menu Programs] tab and click
[Add].

In the Command Line text box, type in the path to your


ACLWIN.EXE file. A typical command line looks like:
C:\ACLWIN6\ACLWIN.EXE

Autoloading Documents

Click [Next] and select the folder where you want to place the
shortcut.

Name the shortcut and click [Finish].

To autoload a document, add the name of the document file after


ACLWIN.EXE in the Command Line text box. If the document is not in
the working directory, you must include the path. To autostart a
document called GL_REC in the Data directory, the command line
should read:
C:\ACLWIN6\ACLWIN.EXE GL_REC.ACL

8 - 83

Chapter 8

Advanced Techniques
To initialize variables during startup, simply include the parameter /v
followed immediately by the variable name and the value it should
assume. Do not put a space between /v and the variable. To set up two
variables for the document GL_REC, one called AUDITOR with the
name of Joe Auditor and the other called MATERIALITY with a value
of 10,000, the command line should read:

Initializing Variables

C:\ACLWIN6\ACLWIN.EXE GL_REC.ACL
/vAUDITOR="Joe Auditor" /vMATERIALITY=10000
To autoexecute a batch called GET_DUPS use the parameter /b
followed by the batch name. As with variable initialization, be sure not to
put a space between /b and the name of the batch. In order to
autoexecute a batch on the command line, you must first open the
document containing the batch. To start the batch GET_DUPS in the
document GL_REC, set up the command line as follows:

Autoexecuting Batches

C:\ACLWIN6\ACLWIN.EXE GL_REC.ACL /bGET_DUPS


To run a batch called SAMPLE in the document GL_REC with a variable
called MATERIALITY set to a value of 10,000, set up the command line as
follows:
C:\ACLWIN6\ACLWIN.EXE GL_REC.ACL
/vMATERIALITY=10000 /bSAMPLE
The command is executed in the order the elements appear on the line.
The above example will:

Note:

8 - 84

1.

Launch ACL.

2.

Load the document GL_REC.ACL.

3.

Set the variable materiality to 10,000.

4.

Run the batch Sample.

Because ACL executes the command line parameters in the order in


which you type them, it is important to first open the document and
initialize any variables that you may need before trying to start a
batch. You must always open the document first.

Chapter 8

Advanced Techniques

Variables
Variables is a powerful ACL feature designed for the experienced ACL
user. Variables are similar to fields in ACL. Most fields are defined as
having a certain position and field type or computed value in a record. As
the data is processed, these fields take on a new value for each record in
the file.
While they act like fields for the most part, variables are different in one
very important way: their value only changes when explicitly altered or
deleted, or when you exit from ACL. If you give a variable a value of 7, it
retains that value until you explicitly change it to something else, or until
you quit the current ACL session.
The exceptions to this rule are variables whose names start with an
underscore character (_), which are not removed at the end of your ACL
session. These variables are stored in the particular ACL document where
you created the variable until you explicitly delete them. You can use
these special variables to store constants that form part of your
applications.
Since variables are much like fields, they can be used in many of the same
ways. For example, they can be deleted, renamed, exported, extracted,
and used in any place that a field name would be valid. Variables can even
be assigned conditionally.
Note:

If a field name forms part of the expression used to define a variable,


the value for the field is taken from the current record at the time the
variable is defined. The expression is evaluated once, and the
variable is assigned a value. When you subsequently move to a new
record, the expression is not reevaluated.
There are three principal uses for variables:

to specify constants for use in an application, such as a sampling


interval

to provide special information to ACL, such as automatic page


headers and margins

in programmable applications such as groups, to retain information


from previous records, or for other control purposes.

8 - 85

Chapter 8

Advanced Techniques
There are many other possibilities for using variables that you will quickly
discover as you begin using them for yourself.

Consants
Constants

A variable can hold the value of a constant. For example, you can use a
variable to record the materiality level, which is used in determining
sampling intervals. By using a variable, you can refer to it rather than the
materiality value throughout your procedures. In this way, if the
materiality changes (as it is likely to do), you only have to change one
number (the variable value) to alter all your samples appropriately. To
retain the variable after your current ACL session, add an underscore
character (_) to the start of the variables name.

Parameters

Variables are also useful for holding parameters. The random starting
value for a sample can be entered as a variable parameter. Parameters are
often entered into batches using the Accept command, which allows for a
batch in which commands remain the same, and only the values of the
variables change as different parameters are required.

Macros

See Using Macros in Batches on page 27 in the ACL for Windows User
Guide for details on using variables in macros when creating batches.

Previous Record
Contents

Using variables to remember the contents of previous records can be


very effective when processing multiple record type files. Because the
contents of data fields change every time you move to a new record, you
may assign the information to a variable if you want to retain it as other
records are processed. See also Defining Static Conditional Fields on
page 51 in the ACL for Windows User Guide and Command Groups on
page 29 in the ACL for Windows User Guide.

Ongoing Calculations

In some cases, you may want to perform calculations that span a number
of records, or perhaps even the whole file. For example, variables are ideal
for totalling the detail amounts in an invoice and subsequently ensuring
that the invoice total agrees with the sum of the details. As well, if you
want a running total throughout a file, you can use a variable and update
it with the contents of every record.

Variables Created by ACL Commands


Some variables are automatically assigned by ACL whenever commands
such as Count, Total, and Statistics are executed. These commands place
their numerical results in variables named COUNTn, TOTALn, and so
on. You can use these variables when processing other ACL commands.

8 - 86

Chapter 8

Advanced Techniques

These variables remain in effect for the duration of the current ACL
session only.
The letter n in variable names refers to the relative position of a
command issued in a group. For example:

For commands entered individually using dialog boxes or from the


Command Log window, the value of n is always 1, because no
group is being processed. Each time you initiate a command that
creates a variable, the preceding results are overwritten. For example,
if you total the quantity on hand, the results are held in the variable
TOTAL1. If you then total the unit costs, ACL re-uses the variable
TOTAL1 to hold the results.
To retain automatic variables so they are not overwritten by
subsequent commands, rename the variables after they have been
created. To rename a variable, select Edit from the menu bar and
choose Variables. ACL displays the Variables dialog box. Select a
variable from the list box and then click [Rename].

Note:

When you use groups to process commands, the results are placed in
variables that are numbered consecutively, starting at 2. The value of
n increases by one for each command in the group. For example, if
the Total command is the third command in a group, the results are
held in the variable TOTAL3. Similarly, if you use the Total
command to total another field, and it is the fifth command in the
group, the results are held in the variable TOTAL5. See Command
Groups on page 29 in the ACL for Windows User Guide for more
details on using groups of commands.

The default amount of space for variables is 60K. However, ACL will
automatically increase the amount of space available for storing
variables when necessary.
Summary of variables created by ACL commands:
ABSn

The absolute value of the field described by the last


Statistics or Profile command.

AVERAGEn

The mean value of the field described by the last


Statistics command.

COUNTn

The number of records tallied with the last Count or


Statistics command.

GAPDUPn

The total number of gaps and duplicates detected by


the last Sequence command.

8 - 87

Chapter 8

Advanced Techniques

HIGHn

The nth largest value encountered with the last


Statistics command. You may want to use this
variable in an expression to extract the five highest
values in a field: AMOUNT > HIGH1.

LOWn

The nth smallest value encountered with the last


Statistics command. You may want to use this
variable in an expression to extract the five lowest
values in a field: AMOUNT < LOW5.

MAXn

The largest value encountered by the last Statistics


command.

MINn

The smallest value encountered by the last Statistics


command.

MLEn

The total of most likely errors in a sample reported


by the Evaluate command.

RANGEn

The difference between the largest and smallest


values encountered by the last Statistics command.

SAMPINTn

The sample interval reported by the Size command.

SAMPSIZEn

The sample size reported by the Size command.

STDDEVn

The standard deviation of the fields calculated by the


Statistics command.

TOTALn

The sum total of the values encountered by the last


Statistics or Total command.

UELn

The upper error limit in a sample reported by the


Evaluate command.

WRITEn

The number of records written by any command


that outputs a data file.

User-Created Variables
You can assign values to variables of your choice at any time using the
Assign command. This is often used to carry information from one
record to subsequent records, or to retain cumulative totals for use
during processing.

8 - 88

Chapter 8

Advanced Techniques

For more information: See ASSIGN on page 2-13 in the ACL for
Windows Reference Manual for details on using the Assign command and
Command Groups on page 29 in the ACL for Windows User Guide for
details on using groups.
You can also create variables using the expression builder by doing the
following:
1.

Select Edit from the menu bar and choose Variables.


ACL displays the Variables dialog box:
click to
create a variable

variables list box

click to close
dialog box

maintenance
commands

2.

Click [New] to display the expression builder.

3.

Construct a variable just as you would construct an expression.


Select items from the various lists, click operators and type values to
build an expression.

4.

Type a name for your variable in the Save As text box and click [OK]
to close the expression builder. ACL converts the expression to a
value and saves it with the specified name. Any expressions named
with a leading underscore will be saved with the document.

Editing Variables
The variables you create, and those created automatically by ACL
commands, appear in a list of variables in the Variables dialog box, and in
the Variables list box of the expression builder.
To edit a variable, do the following:
1.

Select Edit from the menu bar and choose Variables.

8 - 89

Chapter 8

Advanced Techniques
ACL displays a list of all existing variables, including those created
automatically by ACL.
2.

Select the variable you want to change and click [OK].


ACL displays the expression builder. The value of the selected
variable is displayed in the Expression text box and the name in the
Save As text box.

3.

Make changes as required, and click [OK] to close the expression


builder.

Maintaining Variables
Use the Variables dialog box to manage your variables.
1.

Select Edit from the menu bar and choose Variables to display the
Variables dialog box.

2.

Select a variable from the list box and then click [Duplicate],
[Rename], or [Delete]. After duplicating, typing a new name, or
deleting a variable, respectively, click [OK].
At the end of an ACL session, all variables whose names do not begin
with an underscore are automatically deleted.

3.

Click [Done] when you are finished.

For more information: If you are working in command mode, you


can use the Delete command to delete one or more variables. For more
information, see the command DELETE and DELETE HISTORY on
page 2-45 in the ACL for Windows Reference Manual.

Workspaces
A workspace is a separate area in an ACL document that contains field
definitions. When a workspace is activated, the fields within it are
available for use within your current document (with your current input
file), until you open a new file. This saves having to define the workspace
fields for each input file.
Workspaces are most frequently used to group computed fields that you
want to use with more than one input file. For example, you might want to
associate a workspace with a specific application (such as accounts

8 - 90

Chapter 8

Advanced Techniques

receivable) to group different time periods, or different departments or


divisions. The field names to which the computed fields refer must be the
same in all the input files with which the workspace is used.
Workspaces can also be used to store regular field definitions (not just
computed fields). When working with multiple record type files, you can
store the definition for each record type in a separate workspace. Each
workspace can be activated selectively when you want to process records
of a specific type.

Creating a Workspace
To create a workspace, you must first define the fields you want to include
in the workspace. You can do this using the Input File Definition window.
1.

Select the input file from which you want to create a workspace.

2.

Define the fields you want to include in the workspace by clicking


(Edit File Definition) or selecting Edit from the menu bar and
choosing Input File Definition to display the Input File Definition
window. Use this window to define data fields (for multiple record
type files, for example) or to create computed fields.

3.

Either:

In the Overview window, click Workspaces and then click


(New). ACL displays the Add Fields to Workspace dialog
box.

click to move
selected field
click to remove
selected field

list box

click to add all


available fields

click to remove
all selected fields

click to create a
computed field

8 - 91

Chapter 8

Advanced Techniques
Select the fields you want to add to the workspace from the Available
Fields list, or click [Expr] and use the expression builder to create an
expression. Click [OK] when you are done.
ACL displays the Edit Workspaces window showing you the number
of definitions included in the workspace.
Close the Edit Workspaces window and ACL prompts you to save
your workspace. Specify a meaningful name and click [OK].

Select Window from the menu bar and choose Open


Command Log. Issue the Save Workspace command as
follows:

SAVE WORKSPACE workspace-name workspace-fields


where workspace-name is the name of the workspace, and
workspace-fields are the names of all the fields you want
to include in the workspace (separated by spaces).
For more information: See SAVE on page 2-177 in the ACL for
Windows Reference Manual for full details on the Save Workspace
command.
The workspace field definitions are now in use with your current input
file, so you do not need to activate them. Unless you subsequently delete
the workspace field definitions, they are saved along with the input file
definition.

Activating a Workspace
You can activate a workspace to use its field definitions with any input
file.
Note:

The field names to which the computed fields in a workspace refer


must be the same in all input files with which the workspace is
activated. For example, you may have a workspace that contains
the field VALUE=SALEPR * QTYOH. To activate this workspace, the
current input file must have the fields SALEPR and QTYOH already
defined.
To activate a workspace, do the following:
1.

8 - 92

Open the input file with which you want to use the field definitions
contained in the workspace.

Chapter 8

Advanced Techniques
2.

Either:

In the Overview window, select one of the predefined


workspaces and click
(Open). ACL prompts you to either
open or edit the workspace. Click [Open] to open the
workspace. For information on editing workspaces, see Editing
Workspaces on page 94 in the ACL for Windows User Guide.

Select Window from the menu bar and choose Open


Command Log. Issue the Activate Workspace command,
specifying the name of the workspace as follows:

ACTIVATE <WORKSPACE> workspace-name <OK>


For more information: See ACTIVATE on page 2-6 in the ACL
for Windows Reference Manual for full details on the Activate
Workspace command.
3.
Note:

ACL informs you of the number of fields activated.


If you activate a field with the same name as one of those in the
input file, ACL displays a message box asking you whether the
input file field should be replaced.

click to replace
existing field

Click [Yes] to replace the field definition in your current input file
with the field definition in the workspace for the duration of the
session.
If you click [No], ACL the workspace definition with the
corresponding name is not included in the activated fields.
The workspace field definitions are now available for processing and
inclusion in views and reports. Workspace fields do not appear in your
view unless you add them.
Note:

If, after activating a workspace, you subsequently edit the input file
definition, or make some change that causes the input file definition
to be saved, the workspace fields are permanently added to the
input file definition.

8 - 93

Chapter 8

Advanced Techniques

Processing with Workspaces


After activating a workspace, all list boxes containing field names now
include the workspace fields.
When issuing commands, you can select workspace fields and treat them
as you would any other field in the input file. However, if you issue an
ACL command that creates a record file (for example, if you use the
Extract command to extract certain records to a file), no workspace fields
will be included in the extracted file. If you want to extract any or all of the
workspace fields, you should use the Extract command to extract fields
instead.

Editing Workspaces
You can make changes to an existing workspace by doing one the
following:

Select Edit from the menu bar and choose Workspaces. ACL
displays the Workspaces dialog box. Select the workspace you want
to edit and click [OK].

In the Overview window, double click the workspace you want to


edit. ACL asks if you want to open or edit the workspace. Click [Edit]
to edit the workspace.
ACL displays the Edit Workspaces window.

conditional computed field


find
edit workspace note
values and
conditions

add fields to workspace

computed field
expression

default value

physical field

field name

field type
field start position

field length

Conditional fields (such as CITY) take the form:


Field-name Field-type Default-value
Condition Value...
where Field-name can be any name of a field, Fieldtype can be any valid field type, Default-value is the

8 - 94

Chapter 8

Advanced Techniques

default value of a conditional field, and Condition and


Value are those assigned to a conditional field.

Computed fields (such as MKTVAL) take the form:


Field-name Field-type Expression
where Expression is any valid expression.

Physical fields (such as PRODNO) take the form:


Field-name Field-type field-start fieldlength <dec>
where field-start is the starting position of the physical
field, field-length is the length of the physical field, and
the optional parameter dec is the number of decimal places in
a numeric field.
All of these values can be viewed by double clicking a field
name in the Input File Definition window.

4.

Enter or edit commands in the workspace using the Cut, Copy,


Paste, and Undo options from the Edit menu, or using standard
keyboard text editing techniques.
Click

Note:
5.

(Find) to search for (and optionally replace) a string.

You cannot search for strings that split across two lines.
You can add fields to the workspace by clicking the
workspace) button.

(Add fields to

In the Add Fields to Workspace dialog box, select the fields you want
to add to the workspace from the Available Fields list, or click [Expr]
and use the expression builder to create a computed field. Click [OK]
when you are done.
6.

When you are finished editing the workspace, close the Edit
Workspaces window.
If you have made changes, ACL prompts you to save the workspace.

7.

Type a new name for the workspace and click [OK] to save it.

Maintaining Workspaces
Use the Overview window to duplicate, rename, and delete workspaces.
Duplicating Workspaces

To duplicate a workspace:
1.

Click the workspace you want to duplicate.

8 - 95

Chapter 8

Advanced Techniques
2.

Click

(Duplicate).

ACL displays a dialog box informing you that the workspace ABC
has been duplicated as ABC2.
Renaming Workspaces

To rename a workspace:
1.

Click the workspace you want to rename.

2.

Click

(Rename).

ACL displays a dialog box with the current name of the workspace
highlighted in the text box.
3.
Deleting Workspaces

Type a new name for the workspace and click [OK].

To delete a workspace:
1.

Click the workspace you want to delete.

2.

Click

(Delete).

ACL displays a dialog box prompting you to delete the selected item.
3.

8 - 96

Click [OK] to delete the workspace. Otherwise, click [Cancel].

IIndex
A

Abbreviating commands8-41
ABSn, definition of8-87
Accept, using in batches8-8
ACL application screen2-5
Add Columns dialog box2-25-115-308-63
Adding Controls to the Dialog Builder8-13
Age command, graphing5-34
Append2-15
parameter8-49
to File checkbox5-43
APPEND parameter8-49
Application workspace2-5
Arrow keys2-3
AS clause
entering in command mode8-43
field modifier8-46
Assign
using in groups8-34
Autoexecute
batches8-84
preference7-9
Autoloading documents8-83
Automatic Output Filenames preference7-10
Automatic Profiles preference7-4
AVERAGEn, definition of8-87

B
Batch
Accept command in8-8
autoexecuting8-84
calling other batches8-11
creating8-2
creating from view8-4

Index - 1

creating with Batch Recorder8-5


deleting8-8
Dialog Builder in8-118-25
duplicating8-8
editing8-5
Group, Else, End commands8-29
guidelines for entering commands in8-1
interactive batches8-8
interruption7-4
macros in8-27
maintaining4-348-8
opening and closing8-5
printing definitions5-525-53
renaming8-8
running2-78-6
safety7-4
searching in8-6
terminating8-11
using8-1
using command groups8-29
window8-3
Batch Recorder, using8-5
Batch window8-13
display of Dialog Builder in8-24
Beep preference7-4
Blank preference7-87-16
Break columns, specifying in reports5-15
Buffer Size preference7-6
Button bar
customizing7-22
hiding7-3
overview2-6
preference7-3
setting up7-19
Buttons7-20
default button bar7-20

in dialog boxes2-12

Canned applications8-83
Century
setting the start of7-13
Changing Graph Labels tab5-38
Changing Graph Options tab5-39
Character constants6-21
Character fields, setting sort order7-6
Character strings, comparing6-7
Checkbox2-14
Checkbox control8-17
Checkboxes2-14
Append to File5-43
Classify command
graphing5-34
Clear Log File dialog box5-49
Clearing a section of the command log5-49
Columns
adding to View5-10
changing headings4-26
changing width4-25
changing width in command mode8-45
changing widths in View5-12
deleting from View5-9
rearranging in View5-11
Command dialog boxes2-14
Command line
Dialog Builder8-24
field modifiers8-43
graphable data5-35
installing ACL using7
parameters8-428-838-84
Command log
clearing5-50
clearing a section of5-49
displaying5-455-48
editing commands8-39
including comments5-49

Index - 2

issuing commands5-46
opening5-455-48
printing5-455-53
setting time/date stamp7-10
typing commands8-39
using5-45
using to enter commands5-468-378-38
Command mode
ALL keyword8-40
changing column width8-45
command format8-41
fill dialog button5-46
FIRST parameter8-49
IF parameter8-47
inserting fields8-39
NEXT parameter8-48
page breaks8-45
prompting for missing information8-41
RECORD keyword8-40
suppressing totals8-45
using field modifiers8-43
using scope parameters8-47
using workspaces8-90
WHILE parameter8-47
working in8-37
Command Options7-9
Commands
abbreviating8-41
clearing from command log5-50
command mode8-37
definition of3-13
displaying last result3-14
entering in a batch8-1
Export5-43
field modifiers, using8-43
format of in command mode8-41
groups8-29
guidelines for entering in batches8-1
prompting for missing information8-41
scope parameters in command mode8-47
that produce output files5-42
typing in command log8-39

using command log to enter8-38


variables created by8-86
Commands, issuing
using command log5-46
Computed fields
complex calculations4-31
conditional4-33
defining4-28
defining by setting a filter4-18
definition of3-12
making static4-278-51
meaningful conditions4-30
renaming4-34
simple calculations4-29
Conditional Computed Fields
defining4-29
Conditional Fields8-50
Conditional fields, see Computed fields
Constants
as variables8-86
character6-21
logical6-26
numeric6-20
Context-sensitive help2-26
Control total field4-27
Controls
adding to the Dialog Builder8-13
Checkbox8-17
dropdown8-19
Edit8-16
Editing an existing dialog8-24
Item List8-20
Radiobutton8-18
Text8-15
Conventions
bar3
braces3
brackets3
bulleted lists3
field naming2-3
file naming2-3

Index - 3

leader dots3
monospace3
numbered lists3
numbers and bullets3
text formatting3
Converting
data using ACL5-43
ODBC3-43-9
Copy graph
to .bmp file button5-42
Copy, Edit menu option2-23
Copying field definitions4-11
Copying items from another document5-3
COUNTn, definition of8-87
CR files8-76
CR/LF files8-76
Customizing the button bar7-22
Cutting, Edit menu option2-23

D
Data

analyzing3-3
defining3-10
obtaining3-3
processing3-13
Data Definition window4-244-30
Data Fields
data filter4-14
Data fields
defining3-104-84-18
formatting4-23
specifying format of date fields6-12
specifying format of numeric fields4-256-18
Data file
definition of3-3
deleting with input file7-5
linking to document4-9
Data Relations8-588-65
defining8-60
deleting8-63

Data Source dialog box3-4


Date and time stamp
in log5-48
on reports5-30
preference7-10
Date constants6-15
Date Format
default list box7-11
Date Options7-117-17
Date Settings preference7-12
Dates
conventions6-12
formatting date fields6-12
Julian6-12
setting format for displaying7-12
valid input formats6-13
working with6-12
Day, Month, Year option7-11
dBASE files
opening3-4
Decimal Place Character preference7-16
Default Date Format list box7-11
Default Numeric Format7-17
Default View
automatic deletion5-6
information displayed in5-6
Defining
Conditional Computed Fields4-29
Delete Data File with Input File preference7-5
Deleting items
from document2-19
in Overview window5-3
Delimit utility4-8
Designation preference7-9
Dialog Boxes
Add Columns2-25-308-63
Clear Log File5-49
Data Source3-4
Dialog Builder8-13
Dropdown8-19

Index - 4

Edit Graph Properties5-365-38


Options tab5-39
Font5-16
Input File Definition4-9
Output5-34
Relations8-608-62
Save "Graph" As5-42
Select View Fonts5-16
Dialog boxes
active2-9
closing2-13
for commands2-14
for file open/save2-13
for selection/edit2-17
moving2-12
opening2-12
using2-11
Dialog Builder
Checkbox control, adding8-17
controls, adding8-13
Dropdown control, adding8-19
Edit control, adding8-16
Editing an existing8-24
in a batch8-118-25
Item List control, adding8-20
Radiobutton control, adding8-18
saving in a batch8-23
Text control, adding8-15
Dialog Builder dialog box8-13
Digits6-19
Document
accessing3-2
autoloading8-83
clearing input files from4-10
displaying components of5-1
linking to data file4-3
linking to new data file4-9
opening4-3
recording general information about2-21
Document notes2-21
entering2-22

modifying2-22
printing5-53
Documentation options
clearing the log5-50
file history5-50
notes5-53
printing command log5-45
printing documentation5-51
viewing the log file5-48
Dont Share Input File Layouts option7-5
Draw seconds option7-9
Dropdown control8-19
Dropdown dialog box8-19
Dropdown menus2-5

E
Edit control
adding8-16
Edit dialog boxes
opening2-16
standard features2-17
Edit Graph Properties dialog box5-36
Labels tab5-38
Options tab5-39
Edit Variables dialog box8-89
Editing an existing dialog8-24
Editing individual fields2-23
Editing text2-22
Editing Workspaces8-94
Else
entering in a batch8-36
in conditional groups8-31
using in batches8-29
End
entering in a batch8-37
terminating groups8-32
using in batches8-29
Error Limit preference7-11
Exact preference7-5

Index - 5

Exiting ACL2-29
Export
command5-43
items to DOS5-4
Expression Builder
components6-2
overview6-1
using6-4
Expressions
building6-1
definition of3-12
entering in command mode8-46
evaluation of6-7
examples of6-8
operators in6-6

F
Field definitions
copying/sharing2-18
sharing/copying4-11
Field modifiers8-43
Field names, reserved4-34
Field Width preference7-16
Field width, default value7-16
Fields
changing name of in command mode8-44
changing width of in command mode8-45
computed3-124-28
control total4-27
data4-21
defining4-21
definition of3-10
including all8-40
length compare preference7-5
logical7-38-208-65
logical as default filter4-28
logicals in list preference7-3
numeric3-95-235-338-208-65
numeric as date4-27
numeric, formatting in command mode8-44

sort order preference7-6


static4-278-51
suppressing totaling4-27
File Naming Conventions2-3
Files
accessing3-2
Automatic Output Filenames preference7-10
batch8-1
CR8-76
CR/LF8-76
creating a new input file definition4-5
data7-5
extensions2-3
history5-50
input7-5
log3-14
multiple record type8-70
naming conventions2-3
output data files5-42
proprietary variable length8-77
report files8-80
standard extensions2-3
Use Created Files preference7-10
variable length (IBM)8-77
Filtered records
scrolling6-24
Filters
applying global6-26
defining conditions to include or exclude4-14
deleting6-28
duplicating6-28
editing6-27
maintaining6-28
renaming6-28
turning off a global filter6-27
using6-22
Financial calculations
numeric overflow6-12
rounding6-10
Fixed point arithmetic6-9
overflow6-11

Index - 6

rounding6-10
Font

global7-19
Font dialog box5-16
Font Options7-18
Font size
for printed documentation5-52
setting in windows2-10
Footers on reports5-24
Formatting fields
column width4-25
control total4-27
default filter4-28
in the Data Definition window4-23
making conditional4-26
making static4-27
numeric4-256-18
numeric fields as date4-27
suppressing totals4-27
Functions
definition of3-12

G
Global filter
applying6-26
applying in the View window6-26
applying to Data Fields4-18
definition of6-23
removing6-27
removing in the View window6-27
Global Font option7-19
Graph Output Option5-33
changing labels5-38
Histogram command5-33
recognizing graphable data5-35
saving the graph as a bitmap5-42
using the Last Result to create a graph5-35
Graph Output Options tab
changing5-39
Graph Output Type tab5-35

Graphical user interface (GUI)1-2


Group
assigning variables in8-88
building8-29
conditional8-30
creating8-35
entering in a batch8-35
Multiple Record Type File8-73
nested8-32
simple8-30
types of8-30
use of8-29
using8-29
variables produced by8-33
GUI1-2

Hardware key2-4
Headers on reports5-24
Help
context-sensitive2-26
displaying2-26
how to get2-26
navigating2-27
searching by topic2-29
speed search2-28
Hide filtered records preference7-7
HIGHn, definition of8-88
Histogram command
graphing results5-33
Histogram window
3D bar graph output in5-33
Histogram, calculating min/max values for7-5
History
of file5-50

I
IF parameter
overview8-47

Index - 7

using in command mode8-48


Importing
dBASE files4-6
delimited files4-6
spreadsheets4-5
Importing items
from DOS5-3
overview2-18
Index
conditional8-67
creating8-66
deleting8-69
dialog box8-66
linking to input file8-65
maintaining8-69
renaming8-69
Indexing
versus sorting8-65
Initializing variables8-84
Input file
character type of4-7
closing4-10
convention4-4
creating4-5
creating for a report file8-80
creating for multiple record type files8-71
defining data fields4-84-18
definition3-10
deleting4-114-20
deleting data file with7-5
duplicating4-10
file type of4-6
linking to index file8-65
maintaining4-10
media type of4-6
printing5-52
record length of4-7
renaming4-11
selecting4-4
Input File Definition8-14
Input file definition

for dBASE files4-6


for delimited files4-6
Input File Definition dialog box of a linked file4-9
Input File Definition window4-6
Input File Options7-4
Installing ACL
command line7
system requirements6
Installing ACL for Windows5
Interactive batches8-8
Interface Options7-27-3
Intervals preference7-11
Invalid data, replacing with blanks7-87-16
Item List control8-20

Julian dates6-12

Key fields, sort order8-44


Keyboard conventions2-2

Labels Tab5-38
for changing graph labels5-38
Language option7-19
Last Result window
using to create graphs5-35
Linking data file to an input file definition2-17
List box, selecting items2-2
List boxes2-14
List Separator preference7-16
Locate data file
dialog box4-3
Log file
clearing the log5-50
definition of3-14
viewing5-48

Index - 8

Logical fields7-38-208-65
Logicals in Lists preference7-3
Loop
entering in a batch8-36
LOWn, definition of8-88

M
Macros
using in batches8-27
using variables in8-86
when to use8-27
Maintaining
batches8-8
filters6-28
indexes8-69
input files4-10
variables8-90
workspaces8-95
Margins
default variables2-26
Max RAM preference7-6
MAXn, definition of8-88
Menu bar2-5
Menus
summary of2-5
using2-5
Messages
acknowledging2-20
displaying2-20
message boxes2-20
MINn, definition of8-88
MLEn, definition of8-88
Modify Column5-22
More dialog box
Append to File in5-43
Mouse button2-2
Mouse, basic operation of2-1
Multiline reports
adding rows5-18

creating5-17
deleting rows5-18
Multiple record type files
creating an input file definition8-71
processing multiple record types8-73
processing single record type8-73

negative indicator6-18
Nested groups8-32
NEXT parameter8-48
Notes2-21
document2-21
entering2-22
recording general information2-21
recording specific information2-22
Numeric constants6-20
Numeric errors6-9
Numeric fields3-95-235-338-208-65
formatting4-256-18
formatting in command mode8-44
Numeric Format
default7-17
Numeric Options7-15
Numeric overflow
overview6-11
setting preferences to terminate processing7-15

O
ODBC
Access3-4
converting3-43-9
On-line help
context-sensitive2-26
topics2-27
Online help
getting2-26
Open
parameter8-49

Index - 9

OPEN parameter8-49
Open View Window preference7-5
Opening a Database File3-4
Operating limits3-13
Operators
precedence of6-6
using in expressions6-6
Options
Commands7-9
Date7-117-17
Font7-18
Input File7-4
Interface7-27-3
Numeric7-15
Output
choices5-32
creating reports5-20
data files5-42
graph output5-33
printing documentation5-51
producing3-14
Output dialog box5-34
Overflow
errors6-11
numeric6-11
preference option7-15
Overlapping labels5-39
Overview window
buttons5-2
description5-1
using5-2

P
Page breaks
in command mode8-45
when printing a report5-15
when printing documentation5-53
PAGE modifier, using in command mode8-45
Page numbering on reports5-30
Page width indication5-8

Parameters
First8-48
If8-47
Next8-48
Open8-49
scope8-47
using with variables8-86
While8-478-49
Parentheses and evaluating expressions6-7
Physical Field Order option7-3
PICTURE clause
field modifier8-46
PICTURE clause (field modifier)
entering in command mode8-44
Preferences
Autoexecute Commands7-9
Automatic Output Filenames7-10
Automatic Profiles7-4
Beep7-4
Blank7-87-16
Buffer Size7-6
Button Bar7-3
Date Settings7-12
Decimal Place Character7-16
Delete Data File with Input File7-5
Designation7-9
Error Limit7-11
Exact7-5
Field Width7-16
Hide Filtered Records7-7
Intervals7-11
List Separator7-16
Logicals in Lists7-3
Max RAM7-6
Open View Window7-5
Overflow7-15
Print History with Last Result7-17
Print History with Reports7-17
Safety7-4
Show Format7-6
Show Grid Lines7-8
Show Test7-10

Index - 10

Sort Order7-6
summary of options7-1
Thousands Separator7-16
Time Stamp Log7-10
turning options on and off7-2
Use Created File7-10
View Options7-7
Presort5-225-25
Print Documentation dialog box5-52
Print History with Last Result preference7-17
Print History with Reports preference7-17
Print preview5-29
Print spool files8-80
Printer, setting up2-25
Printing
documentation5-51
including group tests7-10
including history with last result7-17
including history with report7-17
log file5-45
overview2-24
print preview5-29
setting up a print job2-25
suppressing headings5-18
views5-18
Punctuation6-19

Quick start1-1
Quitting ACL, how to2-29

Radiobutton control8-18
Radiobuttons2-14
RANGEn, definition of8-88
Rearranging columns in view5-11
RECORD_LENGTH variable8-76
Records
excluded from filter4-14

hiding filtered7-7
Recovery file2-29
Relations
data8-588-65
defining8-60
deleting8-63
dialog box8-608-62
working with related files8-63
Renaming items2-18
Report dialog box5-24
Report files
creating an input file definition8-80
filter conditions8-82
processing8-82
using8-80
Reports
creating5-31
date and time stamping5-30
deleting5-19
designing report layout5-24
detail line spacing5-25
duplicating5-19
formatting columns5-20
formatting dates5-20
including history7-17
maintaining5-31
page numbering5-30
presorting5-25
previewing5-29
printing definitions5-52
producing3-145-20
renaming5-19
specifying filters5-24
specifying footers5-24
specifying headers5-24
steps in producing5-20
summarized5-25
summary of formatting options5-30
Reserved keywords4-34
Results
clearing from command log5-50

Index - 11

displaying in command log5-45


Rounding errors6-10
Running
batches8-6

Safety preference7-4
SAMPINTn, definition of8-88
Sample populations, min/max values for7-5
SAMPSIZEn, definition of8-88
Save "Graph" As dialog box5-42
Save Document As dialog box4-2
Saving
Dialog Builder in a batch8-23
graph as a bitmap5-42
options for2-29
using menu options2-29
Scope parameters
Append8-49
If8-47
list of8-47
Next8-48
Open8-49
While8-47
Select Fields dialog box2-19
Select View Fonts dialog box5-16
Selecting items
how to2-2
in list box2-2
Selection dialog boxes
opening2-16
standard features2-17
Selection/Edit dialog box2-15
deleting items2-19
importing items2-18
renaming items2-18
Setting preferences
overview7-1
Setting up your printer2-25

Sharing field definitions2-184-11


Show Format preference7-6
Show Grid Lines preference7-8
Show Right Edge of Page option7-8
Show Test preference7-10
Skip length, changing4-8
Sort key column
sort order5-15
specifying5-12
subtotals5-15
Sort Order preference7-6
Sort sequence for character fields, setting7-6
Spacing on reports5-25
Speed search for help2-28
Spreadsheets, exporting to ACL4-5
Start of Century option7-13
possible dates for7-13
Starting ACL2-4
Startup parameters8-83
Static conditional fields4-278-51
Static fields
extracting or sampling records8-57
processing8-56
sorting, indexing, joining and merging8-57
Statistics, automatically calculating7-4
Status bar2-7
STDDEVn, definition of8-88
Stratifications, calculating min/max values for7-5
Stratify command
graphing5-34
Stratify window
3D layered graph output in5-37
3D stacked graph output in5-38
horizontal 3D bar graph output with subtitles and
selected fields in5-40
line graph output in5-35
Summarized reports5-25
SUPPRESS field modifier8-45
Suppress graph gridlines5-395-40
Suppress overlapping labels5-39

Index - 12

Suppressing headings5-18
Suppressing totals in command mode8-45
System requirements
installing ACL for Windows Version 56

Technical support4
Text
copying2-23
cutting2-23
deleting2-22
inserting2-23
Text boxes2-14
definition2-14
modifying information in2-22
Text Control
adding to the Dialog Builder8-15
Thousands Separator preference7-16
Time Stamp Log preference setting7-10
Tooltips
using2-6
Totaling, suppressing in command mode8-45
TOTALn, definition of8-88
Type tab
graph output5-35

UELn, definition of8-88


Undefined fields in View5-5
Use Output File option7-10
Use Output Files preference7-10

V
Variable length files
overview8-76
Variables7-188-148-20
and field names8-85
assigning within a group8-88

created by ACL commands8-86


definition of3-138-85
deleting8-90
deleting in command mode8-90
duplicating8-90
holding constants8-86
holding parameters8-86
holding the contents of a previous record8-86
holding values for constants8-86
in ongoing calculations8-86
initializing at startup8-84
maintaining8-90
produced by groups8-33
remembering record contents8-86
renaming8-90
saving8-85
summary of8-87
uses for8-85
using8-89
using in macros8-86
View
adding a column5-10
automatically opening7-5
changing5-9
changing column headings and column widths
5-12
copying5-4
created by ACL5-4
creating5-6
creating batch from8-4
definition of3-115-4
deleting5-19
deleting a column5-9
displaying5-5
duplicating5-19
formatting columns5-13
maintaining5-19
multiline5-17
notes2-24
printing5-18
rearranging columns5-11
renaming5-19

Index - 13

selecting5-5
showing grid lines7-8
specifying sort key columns5-12
undefined fields5-5
View Options preference7-7

While parameter8-47
WIDTH clause (field modifier)8-45
Width of page
showing right edge of page5-8
showing the right edge of page7-8
Windows
active2-9
arranging2-10
automatically opening views7-5
Batch8-13
using the Dialog Builder in8-24
changing font size2-10
changing size of2-9
Command Log5-45
Create a data filter4-14
Data Definition4-194-244-30
Define data filter4-14
Histogram 3D bar graph output in5-33
Input File Definition4-6
Last Result3-14
making active2-10
moving2-9
opening2-9
printing2-24
showing grid lines on views7-8
Stratify 3D layered graph output in5-37
Stratify 3D stacked graph output in5-38
Stratify horizontal 3D bar graph with subtitles
5-40
Stratify line graph output in5-35
using in ACL2-8
View5-7
View Notes2-24
Working with ACL Windows2-8

Workspaces
activating8-92
creating8-91
definition of8-90
deleting8-96
duplicating8-95
editing8-94
extracting8-94
maintaining8-95
renaming8-96
WRITEn, definition of8-88

Year 20007-13

Index - 14

You might also like