You are on page 1of 106

DATA ACCESS GUIDE

DATA ACCESS GUIDE


Copyright 2006 ACL Services Ltd.
All rights reserved.

No part of these materials may be reproduced, stored in a retrieval system, or transmitted, in any form or
by any means (photocopying, electronic, mechanical, recording, or otherwise), without permission in
writing from the publisher, except by a reviewer who may quote brief passages in a review.

ACL 9.0
August 2006

ACL Services Ltd.


1550 Alberni Street
Vancouver, BC
Canada V6G 1A5
Telephone: +1-604-669-4225
E-mail: info@acl.com
Web: www.acl.com

Printed in Canada

ACL, the ACL logo, the ACL logo with the text, "ACL Data you can trust. Results you can see." and Audit
Command Language are trademarks or registered trademarks of ACL Services Ltd.
Microsoft, Windows and Windows Server are trademarks or registered trademarks of Microsoft Corpo-
ration. AIX, OS/390, OS/400 and z/OS are registered trademarks of IBM Corporation. Linux is a registered
trademark of Linus Torvalds. SAP, R/2 and R/3 are trademarks or registered trademarks of SAP AG.
Crystal Reports is a trademark or registered trademark of Business Objects SA. All other trademarks are
the property of their respective owners.

June 30, 2006 6:27 pm


C ONTENTS
Chapter 1: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Locate, transfer, and access .............................................................. 2

Chapter 2: Locate the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3


Know your data ................................................................................ 4
Formulate a data request ................................................................. 5
Decide where to process the data ................................................... 10

Chapter 3: Access the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


Create a table .................................................................................. 16
Import and copy ............................................................................. 17
Direct access ................................................................................... 19

Chapter 4: Sources of data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23


ACCPAC ......................................................................................... 24
AIX-based data ............................................................................... 25
COBOL copybook files .................................................................. 26
DB2 ................................................................................................. 31
dBASE-compatible ......................................................................... 35
Delimited ........................................................................................ 37
HTML ............................................................................................. 44
IBM variable-length ....................................................................... 46
IMS .................................................................................................. 48
Linux-based data ............................................................................ 50
Microsoft Access ............................................................................ 51
Microsoft Excel ............................................................................... 52
Microsoft Word .............................................................................. 55
Multiple-record-type data .............................................................. 56
ODBC-compliant databases .......................................................... 61
Oracle .............................................................................................. 69
OS/400 FDF files ............................................................................. 71
PDF ................................................................................................. 75
PL/1 copybook files ........................................................................ 76
Print-image ..................................................................................... 78
Rich Text Format (RTF) ................................................................ 81
SAP .................................................................................................. 82
SMF ................................................................................................. 83
UNIX-based data ............................................................................ 88
VSAM .............................................................................................. 90
XML ................................................................................................. 92

iv
C HAPTER 1
I NTRODUCTION 1

Three stages of data access

Use this guide to help you access different types of In this chapter...
data with ACL software. Data analysts must gain Finding data
access to diverse data sources from both inside and Acquiring data
outside of their organizations. They must also Reading data
understand the related technical issues. This guide
addresses both concerns.
Much of the material for this publication was drawn
from the collective knowledge of the ACL Help Desk
team. The expertise of these individuals derives from
their own specialized training and from their daily
contact with people who use ACL in the workplace.
Because of this contact, technical support staff also
know what questions people ask about data access.
This guide attempts to answer the most common of  To find definitions of unfamiliar
those questions. And it attempts to provide a terms, select Help Index and look up
terminology in ACL Help.
reference for some of the more obscure challenges of
data access.

1
Chapter 1: Introduction

Locate, transfer, and access


Before you consider how to access data, you must locate the data
that you intend to analyze. Then you must make arrangements to
transfer that data from its source to a computer that runs ACL.
Think of data access as a three-stage process:

Locate the data


First, locate the source and the provider of the data, then learn all that you
can about the nature of the data. You need to understand the
characteristics of the data so that you can make an informed request to the
data provider. This process forms an essential element of the data analysis
project plan. Find out if there are any restrictions to accessing this data.
Decide where to process it
Next, you must determine where to process the data. In some cases, you
may need to get the data from its source to a drive where you can read the
data. Some server-based data sources can be accessed directly and
processed on the server using ACL Server Edition.
Chapter 2: Locate the data looks at what to include in data requests and
how to make them, and how to decide where to process your data.
Access the data
Finally, with the data on an accessible drive, you begin the process of data
access. ACL reads different file types in different ways with different
degrees of automation. Data from newer technologies requires less manual
processing than data from legacy systems.
Chapter 3: Access the data provides an overview of the ways that ACL
reads data and, Chapter 4: Sources of data, lists data sources by type and
outlines the methods of access for each.

2 Data Access Guide


C HAPTER 2
L OCATE THE DATA 2

Find the data that you need and become acquainted with it

Data often comes from off-site locations in formats In this chapter...


that range from flat files to relational databases, and Working with IS staff
on platforms that range from PCs to mainframes. Preparing requests for data
Storage media might include hard drives, tapes, or Considering file structure
CDs. Transmission media can include file transfer Specifying native character set
protocol, e-mail, or drive mapping. Sometimes data Testing for data integrity
files contain record-layout information and Transferring from PC to PC
sometimes they do not. Obtaining mainframe/server
data
Often you must obtain data from outside agents or
Opting for client/server
from other departments within your organization.
Large organizations employ database administrators
who manage data, evaluate and approve requests for
access, and ensure conformance with data security
procedures.
Consequently, when you make requests for data, you
must consider many factors. Data analysts sometimes
find that organizational constraints and ineffective
internal communication limit their access to data. The
more you know about data and how to access it, the
more precise and informed you can make your
requests for data.

3
Chapter 2: Locate the data

Know your data


Impediments to data access often stem from:
Lack of knowledge about available data
Ineffective communication of data needs

Become a partner with information systems (IS) staff


You rely extensively upon information systems (IS) staff to help
you find data. So make your life and their jobs easier by learning
the language of technology. When you hear an unfamiliar term,
ask what it means. Learn as much vocabulary as you can to
formulate clear requests that help ensure that your needs will be
met.
Understanding the nature of data and the fundamentals of data ? For an overview of data concepts,
management can help you to phrase your request succinctly. By select Help Index and look up data
knowing the language of information systems, you help to foster sources.
good communication between data analysts and data providers
and promote a positive working environment.

Identify available data


Find out what data exists and where the IS staff keeps it. Ask to
review the data to see what fields you might find useful and what
information these fields contain. You may discover that some
data includes empty fields. Or you may find that you require only
a portion of the data. In such cases, the IS staff can extract the
data that you need to a smaller file.
As you work with personnel in IS, you will learn more about
systems and the tables and fields that they contain. Keep records
of discussions with data providers so that you can develop a
master data map. As your knowledge increases, your reliance on
IS staff will decrease.

4 Data Access Guide


Formulate a data request

Formulate a data request


Before you make a request for data, find out who controls the
data that you want. Usually, the information systems department
(IS) assumes responsibility for processing and distribution of
data.
But data processing can be decentralized. Departments such as
purchasing or human resources often run independent systems
of their own. These local systems can contain a wealth of useful
data.
Make data requests as comprehensive as you can. Specify which
fields and records you need, as well as file type, data format, the
method of transmission, and storage medium. Find out what
works best in ACL and specify that format. Ask for record
lengths, record counts, and control totals; information that you
need for data integrity tests.

Obtain a record layout


Unless your files contain inherent record-layout information,
you must also ask for a record layout. Record layouts provide a
blueprint for the table that you will create in ACL. They specify
characteristics such as record lengths, field positions, data types,
and field descriptions. With the exception of DB2 tables, all
mainframe data files must have an associated record layout file.

Sample record layout

Field Name Start Length Type Format Description


Position

ProdNo 1 7 Character Product


number

ProdDesc 8 20 Character Description

UnitPrc 28 6 Numeric 9,999.99 Standard unit


price

PrcDte 34 10 Date YYYY/MM/DD Price date

Data Access Guide 5


Chapter 2: Locate the data

Consider file structure


The best file structures for you to work with are those that ACL
defines with little or no help from you. However, the structure
that suits you best is not always the easiest one for your data
provider to supply. Sometimes you need to compromise.
Use data in its native form when you can. ACL recognizes many
file structures and creates tables from them with a minimum of
manual intervention.

ODBC
Working with an ODBC-compliant structure requires little effort  Find a structure that works for
from you. ACL recognizes and creates a table from both you and IS staff.
ODBC-compliant data. In ODBC, you can also choose specific
tables and set a filter to obtain only those records that you need.
But because of security and performance concerns, IS staff
sometimes hesitate to grant ODBC access. One concern is that
you can sometimes circumvent the built-in security features of
the software that reads the database. Also, unregulated access to
a systems data tables can slow down daily operations, especially
if requests come at peak hours. Requests for large amounts of
data create considerable demands on the systems resources.
However, if you follow regulated procedures, you can help to
alleviate such concerns and obtain the access that you need.

dBASE
When you can, request data in fixed-length, dBASE output.
Fixed-length files contain records of equal length where the same
field appears in the same location of every record. ACL
recognizes dBASE files and easily creates tables from them.

Flat files
Often, IS staff can extract data to a flat file that contains only the ? To learn more, select Help Index
data and a CR/LF character at the end of each record. Flat files and look up flat file.
store information in simple records and fields, rather than in
complex database structures. When ACL encounters a flat file, it
automatically detects that the CR/LF character defines the end of
a record. To create a table, you can use the Data Definition
Wizard to help you define the fields manually with the aid of a
record layout.

6 Data Access Guide


Formulate a data request

External definition files


Another option includes text files known as external definition
files that contain the record layout for specific data files. For
OS/400 files, the layout is called a Field Definition Format (FDF).
For PL/1 and COBOL, the layout is known as a copybook. In
each of these cases, ACL automatically creates tables.

Print-image files
Sometimes, the only practical way to get data from a legacy
system is to generate electronic report files, known as
print-image files. ACL can read electronic report files. It is
recommended you use the Data Definition Wizard to define a
print-image file. The wizard creates an IMPORT statement that
you can reuse for other print-image files with the same format.

Specify the native character set


Request data in its original character set whenever you download
it from a mainframe. ACL reads data from in its native character
set, whether EBCDIC or ASCII.
When you convert data, you can inadvertently leave out bits of
data or change it. Also, because ASCII and EBCDIC character
sets are not equivalent, the process of conversion can alter source
data. Some data types, such as packed numeric, do not convert
directly from EBCDIC to ASCII. So avoid unnecessary
conversion when you can.

Make requests specific


Data providers, in charge of a multitude of data tables and fields,
cannot respond efficiently to vague requests. Consider a form
similar to the Sample data request form on page 8 to help
ensure that you include all of the necessary information.

Data Access Guide 7


Chapter 2: Locate the data

Sample data request form

Contact information

Date of request May 20, 2006

Attention Joe Technician, Metaphor Corporation Head Office

E-mail address joe_tech@metaphorcorp.com

From George Auditor, West Branch, Metaphor Corporation

E-mail address geo_aud@metacorpwb.com

Data particulars

File or data set name A/R Transactions Detail

Field or table names IS staff to advise

Date range 1st quarter 2006

Platform and application PC, Oracle Financials

File structure dBASE

Data transfer details

Date required May 22, 2006

Storage medium CD

Method of transfer Courier

FTP or mail address of recipient Suite 207, 123 Street, Anytown, NY

Additional requirements

Record length N/A

Record count Please forward by e-mail

Control totals for numeric fields Please forward by e-mail

Record layout that includes field names, field start positions, field lengths, N/A
data types, formats of numeric and date fields, and field descriptions

8 Data Access Guide


Formulate a data request

Test for integrity


No matter how many hours you put into a project, you cannot ? To learn more, select Help Index
produce sound results when you work with unsound data. So and look up tests.
once you receive your data, test it for integrity.
You might discover that you need additional data or that you
received files for the wrong fiscal period or files with missing
records. Be flexible in the face of unanticipated discoveries,
adjust analytical procedures, and make new data requests if
necessary.

Data Access Guide 9


Chapter 2: Locate the data

Decide where to process the data


Once you decide what data you need, you must consider how to
move that data to an accessible drive or gain access to the data in
its current location. If the data comes from a minicomputer or a
mainframe, you may need to transfer it to a personal computer
(PC). If the data comes from a Windows platform, you probably
need to transfer the data from one PC to another.
You can access server data by networking ACL and
ACL Server Edition to work in a client/server configuration, or
by running ACL Server Edition in offline mode.
This section provides an overview of client/server-based
processing and PC-based processing to help you select the best
option.

Bring data to your PC


Most mini and mainframe computer manufacturers provide
some means of transferring data to a PC. If you use a PC to access
the mainframe through terminal emulation software, you can
download or transfer data files through this link.
The standard methods of data transfer include:
File Transfer Protocol (FTP)
Data transfer utilities included with terminal emulation
software
Drive mapping
Client/server configuration
Disk media
Make sure that you have adequate space on your hard drive or on
the network drive to store the data that you will acquire.
Sometimes the data requires a significant amount of space.

Prepare files for transfer


In many systems, you can export or extract data for transfer.
Often you can export data from the source application in a
format suitable for export to Windows programs. Output
options can include, among others, dBASE, delimited, and
Microsoft Excel.

10 Data Access Guide


Decide where to process the data

Where applications provide an extract option, you can extract


fields of interest to reduce processing time. Or you can combine
fields from a multiple-record-type file to create a new file with a
single record-type.

Transfer time
The time required to transfer data varies according to the
method that you use. Transfer speeds range from 6 kilobytes to
10,000 kilobytes per minute for PC3270 emulation to 10
megabytes per second for a LAN connection.
A client/server configuration transfers data at a comparable
speed to FTP. In-house benchmark tests indicate that a terminal
emulation transfer utility can take up to thirty times longer than
either a client/server configuration or FTP.

File Transfer Protocol (FTP)


FTP provides one of the simplest ways to copy files to your
computer from other servers. FTP uses the Internet's TCP/IP
protocols and provides an option for transferring files that are
too big to send by e-mail. You can use FTP with a command line
interface, or you can use one of the many commercial programs
that offer a graphical user interface.

Terminal emulation software


Terminal emulation software displays the mainframe operating
system of the data source in a separate window on your PC. In
effect, the personal computer functions as a terminal connected
to the mainframe computer.
Software packages such as Personal Communications, PC3270,  Select the appropriate software.
PC Support/400, and RUMBA provide terminal emulation for
PCs as well as a file transfer component for downloading files.

Download precautions
With emulation software, you can choose to transfer data in
ASCII or EBCDIC format. Most mainframes store data in
EBCDIC format, and most PCs store it in ASCII format. But ACL
can process data on the PC in either format. If you have a choice,
always process data in its native format. Any form of data
manipulation, including conversion, introduces the risk of data

Data Access Guide 11


Chapter 2: Locate the data

error. So check the settings of your software to ensure that you


download data in its native format whenever possible.

Avoid record-length problems


Many terminal emulation packages use a utility called IND$FILE
to perform data transfer. When it transfers IBM variable-length
data, IND$FILE discards the block and record-length
information embedded in the data. Without this information,
variable-length records become difficult to process.
However, the FTP utility preserves block and record length
information. So if you have a choice, use FTP to transfer data that
contains variable-length records.
Also, take measures to preserve record lengths in IBM ? See IBM variable-length on
variable-length files. page 46.

Drive mapping
IS staff can map a drive between a mainframe and a PC, but must
use external software, such as Samba, to do so. Drive mapping
from one PC to another provides an easy way for members of a
workgroup to share files. However, all processing goes through a
network, which limits the rate at which data can transfer.

From PC to PC
To work with data from a personal computer, you can:
Transfer data files to the personal computer on which
ACL is installed. Copy files to any disk media such as
floppy disks, CDs, or Zip disks.
Install ACL on the personal computer that contains the  Also see Drive mapping on
data files. page 12.
Set up a shared folder or drive. See Help in Windows
Explorer for information about shared folders.

Process data on the server


The best environment for processing data is often the computer
on which it is stored. ACL Server Edition software can read and
process data on several computing platforms, including
Windows, z/OS, Linux, AIX, and OS/400.

12 Data Access Guide


Decide where to process the data

ACL connects to ACL Server Edition across a network to operate ? To learn more, select Help Index
in a client/server architecture. You can process server-based data and look up accessing data with
on the server or on the desktop. ACL Server Edition.

Read data directly


With a client/server connection, you can read databases and flat ? To learn more, select Help Index
files directly from a server. The ability to read files directly and look up client/server.
reduces the risk of data error because you do not process or
download the files.
ACL offers data security in the form of encryption and
compression options that you can select when you create a server
profile.

System components
To set up a client/server environment for ACL, you need:
One or more clients that run ACL with the client/server
option enabled.
One or more servers that run ACL Server Edition.
A TCP/IP network connection to link the clients to the
servers. The connection can be direct, on a LAN, or by
dial-up connection on a WAN.

Data Access Guide 13


Chapter 2: Locate the data

14 Data Access Guide


C HAPTER 3
A CCESS THE DATA 3

Understand the ways that ACL accesses data

ACL reads data from systems that range from legacy In this chapter...
mainframe systems to modern relational databases. The process of data access
As a read-only application, ACL never alters the The function of a table layout
source data. How ACL reads data

Because of the diversity of data sources and data


access technologies, the way that you access data
varies from one data source to another. ACL reads
some data sources directly. With others, ACL first
imports and copies the data source to an accessible
drive. You can access some data sources by more than
one method.
Most modern data sources contain record-layout
information such as record length, field names, field
lengths, and the type of data in each field. When this
information is present in the data source, or in an
associated external definition file, ACL acquires this
information automatically. When the information is
not present, you must refer to a document such as a
record layout or a data dictionary and provide ACL
with the information manually.

15
Chapter 3: Access the data

Create a table
When you access a data source, ACL presents the data in the
form of a table. For this reason, you can also describe the process
of accessing data as the process of creating a table.

Table layouts
The ACL table contains information about the structure and
content of the source data. Such information includes location,
path, record length, field names, field lengths, field positions,
and data type. ACL stores information about the data contents
and the way that the data is displayed in a table layout.
To examine the layout of any table, select Edit Table Layout.

Methods of access
To access data, ACL either imports the data as a flat file and ? Also see Obtain a record layout on
copies it to a local drive or reads the data directly in its native page 5.
format.

16 Data Access Guide


Import and copy

Import and copy


With this method, ACL creates a copy of the source data in a flat, ? To learn more, select Help Index,
fixed-length ACL file with an fil extension. then look up data sources.

When the data source or the data access technology provides


record-layout information, ACL creates a table automatically.

Import and copy, automatic layout


Data sources in this category include SAP files, Microsoft Access, ? For information on ODBC, see
Microsoft Excel, and XML data accessed by ADO, and any ODBC-compliant databases on
ODBC-compliant data source, such as SQL Server, Oracle, and page 61.
DB2.
To access data by this method:
You locate the data source when ACL prompts you.
ACL copies the data to a flat ACL data file.
ACL creates a table automatically. The table reads the data
in the copied file.
Data imported through ODBC can be refreshed from the source
at any time.
Data sources accessed through ADO, ODBC, and SAP files

Data source Import

00110100 01010 00010 001101

Copy of source data Table layout Views


as flat file (.FIL)

Data Access Guide 17


Chapter 3: Access the data

Import and copy, manual layout


Data sources in this category include delimited files and
print-image files. For delimited files, you usually only need to
specify the name and data type, and the format, if applicable, of
each field. For print-image files, you specify which parts of the
file to read as fields and the data type of each field.
To access data by this method:
You locate the data source when ACL prompts you.
You provide record-layout information or confirm this
information when ACL provides it.
ACL copies the data to a flat ACL data file.
ACL creates a table based on your definition. The table
reads the data in the copied file.

Delimited files, print-image files with


multiple types of records

Manual layout

Data source

Import data

00110100 01010 00010 001101

Copy of source data as Table layout Views


flat file (.FIL)

18 Data Access Guide


Direct access

Direct access
ACL can access some data sources directly, without the need to
import or copy the data. ACL creates a table with varying degrees
of automation, depending on how much layout information the
source contains.

Direct access, automatic layout


On the PC, ACL can access dBASE data files with a dbf extension.
With ACL Server Edition, you can access dynamic databases in
real time:
ACL Server Edition for Windows can access Oracle,
DB/2, and SQL Server data.
ACL Server Edition for OS/400 can access DB/2 data.
ACL Server Edition for z/OS can access DB2, IMS, and
VSAM data.
ACL Server Edition for AIX can access Oracle data.
ACL Server Edition for Linux can access Oracle and DB2
data.
ACL reads the source data, and obtains the record-layout
information automatically from the file or from the technology
that lets you access the database.
To access data by this method:
You locate the data source when ACL prompts you.
ACL creates a table automatically. The table reads the data
source directly.

Data Access Guide 19


Chapter 3: Access the data

dBASE, DB2, Oracle, VSAM

Import layout

00110100 01010 00010 001101

Data source Table layout Views

Direct access, manual layout


ACL can read any flat, sequential data directly, including legacy
data from older mainframe systems, text files, telephone and
internet logs, and so on. But because the source contains no
record-layout information, you must provide this information
before ACL can create a table.
To access data by this method:
You obtain a copy of the record-layout information.
You locate the data source in the appropriate screen.
You provide the record-layout information when ACL
prompts you.
ACL creates a table based on your definition. The table
reads the data source directly.

20 Data Access Guide


Direct access

Manually-defined print-image files, IMS, or any


flat, sequential data file

Record-layout or
data-dictionary
document

Manual layout

00110100 01010 00010 001101

Data source Table layout Views

Data Access Guide 21


Chapter 3: Access the data

Direct access, external definition


On some platforms, record layout information is available in a
reference file, separate from the flat file that contains the data.
ACL can read COBOL copybooks, PL/1 copybooks, and OS/400
FDF definition files.
To access data by this method:
You locate the definition file when ACL prompts you.
ACL converts the definition to a table.
You link the table to the source when ACL prompts you.
The table reads the data source directly.

COBOL, PL/1, OS/400

External definition file:


COBOL copybook, PL/1
copybook, OS/400 FDF

Import layout

00110100 01010 00010 001101

Data source Table layout Views

22 Data Access Guide


C HAPTER 4
S OURCES OF DATA 4

Procedures for accessing common sources of data

ACL creates a table with varying degrees of In this chapter...


automation, depending on the amount of The types of data are listed
record-layout information that the source data alphabetically
contains. A data source from an older computing
environment usually requires more manual
intervention than a data source that is created with
newer technology.
You can access some types of data in more than one
way. This chapter describes major data set and file
types and shows how to access them.

23
Chapter 4: Sources of data

ACCPAC
ACCPAC is a PC-based application that stores data in
transaction files that are associated with master files. When
acquiring ACCPAC data, request both the master and the
transaction files from the data provider. Transaction data is
stored in proprietary fixed-length packed fields.

Method of access
Import ACCPAC data by one of these methods.

Predefined table layouts


The Sample Data Files folder that installs with ACL software
includes a project named Formats.acl. This project contains
table layouts for standard ACCPAC files. With the project open,
select a table layout, then open the corresponding ACCPAC file
when prompted.

Direct access, manual layout


If Formats.acl does not list the files that you need, use the Data ? To learn more, select Help Index
Definition Wizard. Success with this method depends on how and look up creating tables with the
well the files conform to standard ACCPAC structure. wizard. Also see Direct access, manual
layout on page 20.

ODBC Link
You can use the third-party software, ODBC Link, to connect to ? For information on ODBC Link, visit
ACCPAC data. the ACCPAC website.

24 Data Access Guide


AIX-based data

AIX-based data
The AIX operating system is a version of UNIX that is produced
by IBM. AIX runs on a variety of hardware platforms, including
servers and workstations.

Method of access
You can access files on a network-enabled computer that runs
AIX just as you access files on a network-enabled PC, provided
you have the appropriate access rights.
You can also access AIX-based data and process it on the server
on which it resides by using ACL Server Edition for AIX. Any flat
files and print-image files that are located on the server can be
processed directly on the server using the offline scripting
functionality.
To access DB2 databases by using ACL Server Edition software, ? For other ways to access files on an
see DB2 on page 31. AIX server, see UNIX-based data on
page 88.
To access Oracle databases by using ACL Server Edition
software, see Oracle on page 69.

Data Access Guide 25


Chapter 4: Sources of data

COBOL copybook files


The record layout for data sets created on this platform is often
stored in a reference file separate from the flat data file. ACL calls
such reference files external definition files. When ACL converts
the data in the copybook file to a table layout, it retains the source
data field names and identifies the source data types.
Ask the system administrator to provide the data in its native
EBCDIC format to avoid the risk of data error that conversion
introduces. Request the copybook file in ASCII format so you
can read it in a text editor if you need to.

Method of access
Access COBOL data by one of these methods.

External Definition
Access the external definition file using the Data Definition
Wizard.
On the Select Data Source screen of the wizard, select External
Definition. On the next screen, select COBOL. Then browse to
locate the file. ACL creates a table layout using the external
definition, then prompts you to save it. If prompted, browse to
locate the data file. ACL creates the table.

Manual layout
If you cannot obtain a copybook file, obtain a printed or
electronic copy of the layout information, and create the table
layout manually.

Reference information
Each line in a copybook represents a field definition. All COBOL ? To learn more, select Help Index
field definitions contain a level, a field name, and a PIC clause and look up OFFSET( ).
that specifies the data type. The data dictionary often contains
more detailed information.

26 Data Access Guide


COBOL copybook files

The field definition


ZIP-CODE PIC 9(5)
describes a numeric field named ZIP-CODE that is five digits
wide. The 9 indicates a numeric data type and the 5 indicates that
the field contains five digits.
ACL retains COBOL field names, determines field types, and
interprets features such as OCCURS, REDEFINES, and level 88
logical fields.
Use the copybook as a guide if you need to edit the ACL table
layout. For example, ACL defines only the first instance of an
OCCURS statement. If you need to add other occurrences to the
ACL table layout, you must do so manually. To process multiple
occurrences of a data element, you can use the OFFSET( )
function.

Interpret the copybook


These common copybook keywords can help you interpret the
copybook.

PIC clauses
The PIC clause identifies the data type. The table below lists and
describes common COBOL data types, and provides the
equivalent ACL data type, where applicable.

COBOL data Description Equivalent ACL data


type type

X Alphanumeric characters EBCDIC


A Alphabetic characters only EBCDIC

9 Numeric character Either BINARY or


PACKED, depending on
the comp type. See
Comp-3 and Comp-1.
Numeric default.
Comp-3 Numeric value BINARY or PACKED if the
PIC clause contains no S.
Comp-1 Numeric value BINARY

Data Access Guide 27


Chapter 4: Sources of data

COBOL data Description Equivalent ACL data


type type

S Signed numeric character


9(5) Number of repeated
characters.
Brackets specify PIC width. The
9 indicates a numeric field
that contains five digits. The
notation 9(5) means the same
as 99999.

9 Numeric character Either BINARY or


PACKED, depending on
the comp type. See
Comp-3 and Comp-1.
Numeric default.
Comp-3 Numeric value BINARY or PACKED if the
PIC clause contains no S.
Comp-1 Numeric value BINARY

V A V signifies a virtual
decimal; an implied decimal
place at that location of the
field. This saves space because
the decimal is not actually
stored in the file.

Levels and groups


COBOL copybooks contain levels, numbers from 01 to 49, that
precede field names. These levels tell the COBOL compiler how
to associate, or group, fields in the record. Level 01 describes the
name of the record.
A level 2 field is no more significant than a level 3 field. But a
lower-level field is subordinate to a higher-level field. For
example, the two level 10 fields, BRANCH-NUMBER and
ACCOUNT-TYPE, belong to the level 05 group,

28 Data Access Guide


COBOL copybook files

ACCOUNT-NUMBER. The higher the number, the lower the


level.
05 ACCOUNT-NUMBER.
10 BRANCH-NUMBER PIC 9(3).
10 ACCOUNT-TYPE PIC 9(1).
10 CUSTOMER-NO PIC 9(6).

ACCOUNT-NUMBER has no PIC because


ACCOUNT-NUMBER represents a group, not a field. Usually,
programmers indent lower levels for clarity, but indenting is not
necessary. The length of the numeric field
ACCOUNT-NUMBER is 10, the sum of the subordinate fields,
(3) + (1) + (6).
Converted to ACL, the ACCOUNT-NUMBER group looks like
this:
ACCOUNT-NUMBER NUMERIC 5 10 0
BRANCH-NUMBER NUMERIC 5 3 0
ACCOUNT-TYPE NUMERIC 8 1 0
CUSTOMER-NO NUMERIC 9 6 0

Level 88 logical fields


The level 88 indicates a logical field, equivalent to an ACL
computed field. For example, the first level 88 below assigns the
number 347 to the Granville branch. The second level assigns
870 to the downtown branch.
01 BRANCH-NUMBER NUMERIC PIC 9(3).
88 GRANVILLE VALUE 347.
88 DOWNTOWN VALUE 870.

In ACL, the same level 88 fields convert to these ACL computed


fields:
GRANVILLE COMPUTED
T if BRANCH_NUMBER = 347
F
DOWNTOWN COMPUTED
T if BRANCH_NUMBER = 870
F

With a computed field of this type, you can specify such


conditions as "IF GRANVILLE ... DO X".

Data Access Guide 29


Chapter 4: Sources of data

Redefines
REDEFINES is the COBOL equivalent of the ACL overlapping ? To learn more, select Help Index
field definition. ACL creates overlapping fields, but you must and look up data filters.
manually apply the necessary filter.

Occurs
OCCURS specifies the number of times that a field occurs. Only ? To learn more, select Help Index
the first occurrence of the field appears in ACL. If the field occurs and look up bucketed files, LOOP, or
a fixed number of times in each record, manually set up the OFFSET( ).
remaining occurrences, or use the OFFSET( ) function.
For example:
05 CHANGE-DATE PIC 9(6) OCCURS 5 TIMES.

represents 5 different dates, 6 bytes each. The ACL equivalent is:


05 CHANGE-DATE1 PIC 9(6).
05 CHANGE-DATE2 PIC 9(6).
05 CHANGE-DATE3 PIC 9(6).
05 CHANGE-DATE4 PIC 9(6).
05 CHANGE-DATE5 PIC 9(6).

If the number of OCCURS is based on a field, rather than a  Contact ACL Help Desk at
record, as in a bucketed file, use the LOOP command and the support@acl.com to obtain a standard
OFFSET( ) function in an ACL script. script to remove or process segments of
bucketed files.

30 Data Access Guide


DB2

DB2
A DB2 system consists of a catalog and databases.The catalogue
keeps track of all the data in the system and of the access rights to
that data.
DB2 databases are collections of related tables. The rows in a ? With ACL Server Edition, you do not
table are not stored in any particular order, so the data remains need to download the source data.
independent of the applications that access it. Unless you request Instead, you link to it through the
the data in a particular sequence, DB2 determines the order in server.
which it returns the row.
DB2 provides views of data to increase data security and
independence. A view is a logical structure, not a physical one. A
view represents the data that is defined in the DB2 catalog and
can comprise a subset of columns from one table or columns
taken from different tables. You do not need to know whether the
data comes from one table or from several tables. Also, you can
use views to restrict access to sensitive data, without limiting
access to other data held in the same table.
You can access DB2 databases through ODBC or through an ACL
Server Edition product with a DB2 interface.

Method of access
Access DB2 data by one of these methods.

ACL Server Edition


To access DB2 using ACL Server Edition, you must:
Enable the client/server option in ACL, then create a ? To learn more, select Help Index
server profile. From the Server Type drop-down list, and look up server profile.
select the server to which you want to connect.
Create a database profile.
Start the wizard, and on the Select Platform for Data Source
screen of the wizard, select ACL Server. From the drop-down
list, select the server to which you want to connect. The next
three steps differ according to the type of server on which the
data resides.

Data Access Guide 31


Chapter 4: Sources of data

z/OS server
1 On the Select ACL Server Data Source screen, select the
DB2 option.
2 On the Select DB2 Subsystem screen, select the subsystem
that you want.
3 On the Choose DB2 Tables screen, select the tables that you
want from the Available Tables list. If you select more than
one table, you must relate the tables by using the Identify
Relationship dialog box.
Other servers
1 On the Select ACL Server Data Source screen, select the ? To learn more, select Help Index
Database option, then from the drop-down list, select a and look up database profile.
database profile.
2 On the Select DB2 Schema screen, select the schema that
you want.
3 On the Choose Database Tables screen, select the tables that
you want from the Available Tables list. If you select more
than one table, you must relate the tables by using the
Identify Relationship dialog box.
All platforms
4 If you selected more than one table, you can edit the
conditions of the join on the Condition Clause screen. To
edit a condition, select the Edit the Condition Clause
option.
5 Select the fields or columns that you want from the Select
DB2 Columns screen.
6 To obtain a subset of items or a particular sequence of order,
enter WHERE and ORDER clauses in SQL syntax on the
Where and Order Clauses screen.
7 Once you define all of the fields, the wizard prompts you to
name and save the table.
To edit the query after you close the table, right-click the table in
the Overview. Select Properties, then click the Edit Query tab.
In a script, you can use the variables DB2WHERE, DB2ORDER, ? To learn more, select Help Index
and DB2CONDITION to edit WHERE, ORDER, and and look up defining server data files.
CONDITION clauses. The values that you assign to these

32 Data Access Guide


DB2

replacement variables remain in effect until you delete the


variables. Alternatively, you can use the variables DBWHERE,
DBCONDITION, and DBORDER.

ODBC
Use ODBC to import DB2 databases. See ODBC-compliant
databases on page 61.

Data Access Guide 33


Chapter 4: Sources of data

Reference information
Here are a few tips on processing DB2 data.

Processing subsets
To process the same subset of a DB2 file several times, extract the
required records and fields to a flat file. ACL can process smaller
files more efficiently. This particularly applies when you need the
data in a specific order or when ACL has to return to the top of
the file several times to process the commands.

Ordering data
If you need the data in a particular sort order, use an ORDER
clause to retrieve it in the desired order. This may slow the
transfer of data from the database, but is usually preferred to
sorting large data files on a local drive.

34 Data Access Guide


dBASE-compatible

dBASE-compatible
The dBASE format for storing data has become an industry
standard, and most database and spreadsheet applications can
import and export data in this format. dBASE files have a dbf
extension.
ACL recognizes dBASE files and easily creates tables from the
record-layout information that they contain. The resulting tables
will contain a field called Record_deleted. You can delete this
field from the table layout.

Method of access
Import the file through the Data Definition Wizard. Once you ? To learn more, see Direct access,
select the file that contains your data, the wizard recognizes the automatic layout on page 19.
file as dBASE and creates a table for you.

Reference information
Many applications can export data in a dBASE format. However,
the conversion process may not support all the features of the
source application. In addition, conversion errors can occur that
prevent you from reading the file with ACL.

Preparing files for conversion


Before you export data from an application to the dBASE format,
consider these factors:
The dBASE format only supports column names to ten
characters. Before you export data to a
dBASE-compatible file, check the first ten characters of
each field name for uniqueness to ensure that all of the
fields can be exported.
Field names must appear in the first row, and data in the
second row.
If the first record of a field contains character data, the
conversion process will treat all subsequent records in
that field as character data.
The conversion will treat fields that contain only numbers
as a numeric data type.

Data Access Guide 35


Chapter 4: Sources of data

It is common to treat a field that contains numbers, such as


invoice numbers or branch code numbers, as character data. To
export fields that contain only numbers as character data, you
must edit these fields before you export or save the file to dBASE
format.
 To prepare a field that contains numbers for import as a character
field
1 In the spreadsheet application, click the cell in the second
row, which is the first data row of the field.
2 In the formula bar, place a single quotation mark (') in front
of the value, then press ENTER.
The quotation mark identifies the field as a character field.
3 Save the file as a DBF 4 type.

Corrupt dBASE files


Sometimes ACL cannot read a dBASE file because the
application that created it did not exactly follow dBASE
specifications.
You can usually open dBASE files by using the command line.
For example, to open the file C:\Data\Input.dbf, use this syntax:
OPEN C:\Data\Input.dbf
If you cannot open the file by this method, the dBASE file is
corrupt.

36 Data Access Guide


Delimited

Delimited
In delimited files, a variety of characters can be used to separate
or delimit a field: commas, semicolons, tabs, pipes (|), or spaces.
Various characters can also represent text qualifiers, although
quotation marks are most commonly used. Text qualifiers
identify character data and they distinguish punctuation that
serves as text from punctuation that serves as field separators.
For example, in a comma-delimited file, the quotation marks
around "Last_name, First_name" indicate that the
comma represents text rather than a field separator. A carriage
return and a line feed (CR/LF) terminate each record in the file.
Delimited files usually contain no trailing blanks. As a result,
field lengths often differ from one source data file to another,
depending on the contents of the fields. For example, if a field
contains a three-byte value and an eleven-byte value, the length
of the field differs from 3 bytes in one record to 11 bytes in the
other record. One field can contain values of many different
lengths.
When ACL imports a delimited file, it bases the length of a field
on either the longest value that it detects in that field, or on the
field name if that is longer than the longest value. For that reason,
if you import the same file with updated information each
month, the lengths of corresponding fields in the resulting ACL
tables can vary from one month to the next. Differing field
lengths mean that you cannot link a table to new delimited
source data unless you use functions to create a table layout of
computed fields. See Creating a reusable table layout on
page 40.
However, you can change the width of a field on the Delimited
File Properties screen of the wizard to standardize field widths
for such ACL operations as joins or extracts. You can also
increase field width to avoid truncation of wide fields that may
not display until the view is refreshed with new data.
Alternatively, you can set a width of one byte for fields that
contain no data to reduce the space that these fields occupy on
the screen.
After you create a table, you can update it to include changes in
the source file. You can click the Refresh from Source File
button on the task bar or on the Table Layout Options tab of the

Data Access Guide 37


Chapter 4: Sources of data

Table Layout window. You can also right-click the table in


Overview and select Refresh from Source. In a script, use the
REFRESH command. To refresh from a delimited source in ACL
version 8.2 or earlier, access the data through ODBC. For more
information, see Using ODBC on page 43.
When you refresh, you update the table rather than create a new
table. Consequently, you must ensure adequate field length to
avoid truncation if updated field values exceed original field
values.
If the first row of your delimited file contains field names, you
can specify that ACL use these field names. Otherwise, ACL
provides generic field names, such as Field_1 and Field_2, which
you can replace with more descriptive names.

Method of access
You usually use the Data Definition Wizard to convert delimited
files. But if ACL cannot recognize a file as delimited, you can use
the Table Layout window to convert the file manually.
If you need to specify the value of a field separator or a text
qualifier, and the character does not appear on your keyboard,
enter an X followed by the hexadecimal value. For example, X09
represents a tab. To specify that no text qualifier exists, use X00,
the hexadecimal equivalent of null. If your delimited data is an
ASCII text file, you can use an ASCII table to find hexadecimal
values.

Import and copy


In most cases, the Data Definition Wizard correctly identifies the
field separator and the text qualifier. However, you can specify a
different separator or text qualifier, if necessary. On the
Delimited File Properties screen, select the Other option, then
specify any character that you want.
You can use the Start on line option to specify that the data start
on line five, for example, if the first four lines of data contain
unnecessary header information.

38 Data Access Guide


Delimited

Direct access, manual layout


If you encounter problems when you import a file through the
wizard, you can use the Table Layout window to manually create
a table instead:
1 In the wizard, select the Other file format option on the File
Format screen. Then select Skip to Finish to open the Table
Layout window.
Alternatively, you can select the Define Flat Files Manually
option on the Table tab of Tools Options. Then, when you
select a file, ACL skips some steps in the wizard and
automatically opens the Table Layout window.
2 Click the Table Layout Options tab.
3 If the first row of your data contains field names, adjust the
Skip Length value to skip the first record.
4 Click the Convert Delimited File button at the left of the
Table Layout Options tab.

Reference information
You can use the IMPORT command to work with delimited files
in a script.
If you analyze different files of like structure, you can use
functions to parse the fields, then link the resulting table to new
source data.

Using the IMPORT statement


In a script, you can use the IMPORT command to capture ? To learn more, select Help Index
changes in source data or to import new delimited files. IMPORT and look up IMPORT.
syntax can be lengthy, so rather than write the syntax, import a
file through the Data Definition Wizard. From the command
log, you can then copy the statement to edit as required.

Data Access Guide 39


Chapter 4: Sources of data

Example
IMPORT DELIMITED TO Employees_retail
"Employees_retail.fil" FROM
"Employees_retail.csv" SERVER 1 0
SEPARATOR "," QUALIFIER '"' CONSECUTIVE
STARTLINE 0 KEEPTITLE FIELD "First_name"
C AT 1 DEC 0 WID 20 PIC "" AS "" FIELD
"Last_name" C AT 21 DEC 0 WID 20 PIC ""
AS "" FIELD "Employee_number" C AT 41 DEC
0 WID 16 PIC "" AS "" FIELD
"Employee_number" C AT 57 DEC 0 WID 6 PIC
"" AS "" FIELD "Hire_date" D AT 63 DEC 0
WID 10 PIC "MM/DD/YYYY" AS "" FIELD
"Salary" N AT 73 DEC 0 WID 10 PIC "" AS
"" FIELD "Bonus_2004" N AT 83 DEC 2 WID
11 PIC "" AS ""
When you rerun the IMPORT command, ACL creates a new
table. When you refresh the table, ACL updates the original table
with new data.
To import a different source data file with fields that match in
number, order, and data type, modify the italicized items. In this
example, Employees_retail specifies the table name,
Employees_retail.fil specifies the saved data file, and
Employees_retail.csv specifies the source data file.

Creating a reusable table layout


You can create a reusable table layout by using computed fields to
parse the data in the delimited file. However, to link to a new data
source, you require files with fields that match in number, order,
and data type.
To speed the processing of large files, parse only the fields that
you need.
1 In the wizard, select the Other file format option on the File
Format screen. Click Next.
2 On the File Properties screen, enter the length of the longest
record in the file in the Record Length box. If you do not
know the record length, contact your database administrator.
It is important that you specify the correct length.
3 Select Skip to Finish to open the Table Layout window.
4 On the Edit Fields/Expressions tab, you define a field called
Full_record. In the display area, select a record length that is

40 Data Access Guide


Delimited

equal to the longest record in the file, or click in the display


area, then enter the record length value in the Len. box. In the
Name box, enter Full_record. The single field, Full_record,
encompasses all values in the record.
You can now use the SPLIT( ) function with various other
functions to create computed fields that parse Full_record
into individual character, numeric, or date fields. The
function that you use with SPLIT( ) depends on the type of
field that you parse:
Character field expressions use the SUBSTRING( )
function:
SUBSTRING(SPLIT("character_string",
"field_separator", segment_number
<,"text_qualifier">), start,
field_length)
start specifies the first byte of the field. Because
SPLIT( ) returns the entire field at the position indicated
by segment_number, the start position is always 1,
regardless of the fields position in the table.
Enclose the character_string, field_separator,
and text_qualifier parameters in quotation marks
except when the character string is a field.
Numeric field expressions use the VALUE( ) function:
VALUE(SPLIT(string, "field_separator",
segment_number <,"text_qualifier">),
decimals)
decimals specifies the number of decimal places that
you want.
Date field expressions use the CTOD( ) function:
CTOD(SPLIT(string, "field_separator",
segment_number <,"text_qualifier">),
"date_format")
date_format specifies the format of the date in the
source data. Enclose the date format in double quotes.
In all cases, SPLIT( ) specifies, by number from left to right,
the segment or field that you want to isolate.
The text_qualifier parameter of SPLIT( ) specifies a
text-qualifier character. To parse any segment that contains a

Data Access Guide 41


Chapter 4: Sources of data

text qualifier, or any subsequent segments, you must specify


the text-qualifier character.
To specify a tab field separator, use the CHR( ) function with
the SPLIT( ) function to convert the hexadecimal value, 09,
to an ASCII character:
SPLIT(string, CHR(09), segment_number
<,"text_qualifier">)
Click the Add a New Expression button and in the Name
box, enter a name for the field that you want to parse.
This Full_record field uses the (,) character as a field ? To learn more, select Help Index
separator, the (") character as a text qualifier, and contains and look up SPLIT( ), SUBSTRING( ),
the values: VALUE( ), and CTOD( ).
01/31/2004,"ABC Computers, Ltd.",99.95
To parse a character field:
SUBSTRING(SPLIT(Full_record, ',', 2,
'"'), 1, 30)
The expression returns ABC Computers, Ltd. and sets  To specify a double quote as a
the field length to 30. text qualifier, enclose the double quote
in single quotes.
To parse a numeric field:
VALUE(SPLIT(Full_record, ",", 3, '"'), 2)
The expression returns 99.95.
To parse a date field:
CTOD(SPLIT(Full_record, ",", 1),
"mm/dd/yy")
The expression returns 01/31/2004 or 01/31/04,
depending on your date display format.
5 Once you enter the expression for the first field, click the
green check mark to save the entry, then repeat the process
for each of the remaining fields.
After you create a table that contains the fields that you want, you
can link the table to new source data:
1 Right-click the table that contains the parsed fields in
Overview, then copy and paste to create a duplicate of the
table.
2 Right-click the duplicated table and select Link to New
Source Data to link to another delimited file.

42 Data Access Guide


Delimited

Using ODBC
You can refresh from the source to obtain updated data or edit
the IMPORT statement to reuse a table layout when you import
delimited data through ODBC.
See ODBC-compliant databases on page 61.
For a data source driver, use the Microsoft Text Driver that ? For more information on ODBC
comes with Microsoft Jet. This driver works with all types of drivers, see ODBC on page 71.
delimited files, including comma, tab, and custom-delimited.

Data Access Guide 43


Chapter 4: Sources of data

HTML
HTML (HyperText Markup Language) defines the structure and
layout of World Wide Web documents. Markup tags, embedded
in the text, specify structural elements.
In your browser, a document displays similarly to the image on
the left. But the data that you import consists only of HTML
markup, and looks similar to the image on the right.

Browser HTML markup

Once you import the document into ACL, you might find that
the text no longer lines up properly. The way that your document
looks depends upon the markup tags that were used when the
document was created.

Method of access
Import HTML files by one of these methods.

Import as print-image file


Use the Data Definition Wizard to import files with either an htm
or html extension. On the File Format screen, select the Print
Image (Report) File option.
Even though HTML is a plain text file, ACL cannot interpret ? To learn more, select Help Index
HTML tags. Nor can ACL import data inside those tags, except and look up detail records.
for data enclosed in <PRE> tags, which display content as is,
without formatting.
Process the data inside the <PRE> tags as you would any other
detail records.

44 Data Access Guide


HTML

Save as a text file


As a second option, in the browser, you can save the HTML file as
a text file to strip off the HTML tags. Then you can import the file
through the Data Definition Wizard.

Print to a text file


As a third option, you can use the Windows Add Printer Wizard
to add a Generic/Text Only driver. For assistance on how to add
a printer, contact your systems administrator.
 To print to a text file
1 In the Print dialog box of the source application, select
Generic/Text Only from the Name drop-down list and select
the Print to file check box.
2 Click OK, and at the prompt, save the file.
You can open the file in a text editor to look at the record layout.
Then import the file as a print-image file through Data
Definition Wizard.

Data Access Guide 45


Chapter 4: Sources of data

IBM variable-length
To save space, many IBM mainframe computers use
variable-length records to store records of different types and
different lengths in one file. The file contains a field that stores
the length of every record.
Every IBM variable-length record begins with a four-byte field.
These four bytes consist of a two-byte header field that stores the
record length in binary format and another two-byte field that
you can ignore for ACL purposes. ACL automatically calculates
the record length from the two-byte header field, which is called
a Record Descriptor Word (RDW).
IBM variable-length files also contain a four-byte
block-description field, called a Block Descriptor Word (BDW),
at the beginning of the file and at regular intervals throughout
the file. If the block-size value is 48000, for example, another
Block Descriptor Word occurs 48000 bytes later. ACL hides this
field so you never see it. However, this field must be present for
ACL to recognize the file as IBM variable-length.
This sample IBM variable-length file contains two records with
lengths of 5800 and 5100 bytes respectively:
Sample IBM variable-length file
Name Company Position

Christine Haas Equitable Corporation Vice President


Michael Thompson University National Manager
Record length 5100 bytes

Record length 5800 bytes

Although you never actually see the four-byte BDW, the hidden
structure of the sample file looks like this:
BDW
RDW Record 1, length 5800
RDW Record 2, length 5100
RDW
BDW
RDW

46 Data Access Guide


IBM variable-length

Method of access
Import IBM variable-length data by using either the Data  Request your files in EBCDIC
Definition Wizard or the Table Layout window. format to reduce the risk of damage to
the record-length field through
ACL automatically bypasses the first four bytes of the file. conversion. For information on
download formats, see Download
When you manually create the table, ignore the first four bytes of
precautions on page 11.
each record, which contain only record-length information.
Begin defining data in position 5.
The wizard attempts to identify all fields. If the wizard tries to
define the record-length field, select the Ignore this field option
on the Edit Field Properties screen.
In all other respects, you process an IBM variable-length file the
same as you process any fixed-length file.

Reference information
Sometimes the download software strips off both the RDW that
contains the record length and the four-byte BDW. When this
occurs, you must reacquire the data or use an ACL expression to
calculate the record length.
If you lose only the four-byte BDW, you can define the first two ? Also see Avoid record-length
bytes of the record as a binary field called Record_length. Once problems on page 12.
you close and reopen the file, the fields line up correctly.

Data Access Guide 47


Chapter 4: Sources of data

IMS
The IMS transaction management system from IBM stores data
in a hierarchical format with levels or segments of data, each
dependent on the higher level. To access data at a lower level in
the hierarchy, you follow a hierarchical path from the root to the
segment that you need. The database description (DBD) defines
the order of access.

Method of access
Access IMS data by one of these methods.

ACL Server Edition for z/OS


To access IMS data using ACL Server Edition, you must:
Ensure that the IMS interface in ACL Server Edition for  This task may need to be
z/OS is enabled. performed by a system administrator.
Enable the client/server option in ACL, then create a
server profile.
In the Profile dialog box, select the Enable IMS option,
then from the Server Type drop-down list, select the
server to which you want to connect.
Then start the wizard, and follow these steps: ? To learn more, select Help Index
and look up server profile.
1 On the Select Platform for Data Source screen of the
wizard, select the server on which your data resides to
establish a connection. Then, select the IMS option on the
Select ACL Server Data Source screen and continue through
to the Select IMS Segment screen.
2 The Select IMS Segment screen contains a list of segments
and a list of database definitions. If no segments are listed,
select the appropriate DBD to generate a segment list. From
the Segments list, select the segment that you want.
3 Proceed through the wizard to the File Type screen. Select
Single Record Type data if it is not already selected, then
define the fields by using the Identify Fields and Edit Field
Properties screens in the wizard. Once you define all of the
fields, the wizard prompts you to name and save the table.

48 Data Access Guide


IMS

ODBC
You can also access IMS data through ODBC. See
ODBC-compliant databases on page 61.

Data Access Guide 49


Chapter 4: Sources of data

Linux-based data
The open-source Linux operating system is closely related to
UNIX. Linux runs on a variety of hardware platforms, including
PCs, workstations, and mainframes.

Method of access
You can access files on a network-enabled computer that runs
Linux just as you access files on a network-enabled PC, provided
you have the appropriate access rights.
You can also access Linux-based data and process it on the server
on which it resides by using ACL Server Edition for Linux. Any
flat files and print-image files that are located on the server can
be processed directly on the server using the offline scripting
functionality.
For information on other ways to access files on a Linux server,
see UNIX-based data on page 88.
To access DB2 databases by using ACL Server Edition software,
see DB2 on page 31.
To access Oracle databases by using ACL Server Edition
software, see Oracle on page 69.

50 Data Access Guide


Microsoft Access

Microsoft Access
Import tables from a Microsoft Access relational database system
by one of these methods.

Import and copy


When you open an Access database file using the wizard,
ACL uses the Microsoft application programming interface,
ActiveX Data Objects (ADO), to create a new ACL flat file. From
this flat file, ACL automatically creates a table layout based on the
format of the Access file. The Data Definition Wizard guides you
through the process.

ODBC
When you use ODBC, ACL imports the database as a new ACL
flat file. See ODBC-compliant databases on page 61.

Other methods
You can also save the data in dBASE, text, or print-image format ? For more information, see
in the source application. You can then access the data by the dBASE-compatible on page 35.
method applicable to that particular file type. Of these formats,
ACL reads dBASE most easily.

Data Access Guide 51


Chapter 4: Sources of data

Microsoft Excel
ACL reads data in any version of Excel, starting from Excel 3.0.
You do not need Microsoft Excel installed on your PC to import
Excel files into ACL.
Unlike true database applications, where individual fields
contain single data types, individual columns in Excel can
contain various types of data. For example, in a single column,
one cell might contain a date, another a number, and another a
text string, or even a picture. Such inconsistencies can cause
problems when you transfer the data through ODBC or
Microsoft ADO, the technology that ACL uses to read Excel files.
If you do not format columns before you enter data in an Excel
worksheet, a column that contains a mixture of alpha and
numeric characters may fail to import successfully into ACL.
When you do not apply a format before you enter data, data type
is determined by the contents of the first data cell in the column.
For example, if the first cell contains numbers, the column is
considered a numeric column. Then, if subsequent cells in the
same column contain non-numeric data, these cells display zeros
in ACL. Similarly, if the first cell of a previously unformatted
column contains text, subsequent cells that contain numbers
appear empty in ACL.
To avoid loss of data, ensure that each column in the Excel file
contains only numbers or text. Otherwise, you must save the
Excel file in a format that can preserve the heterogeneous
contents of the file when you import it into ACL.
For more information, see Save the Excel file as delimited on
page 53 and Save the Excel file as dBASE on page 53.

Method of access
Import Excel data by one of these methods.

Import and copy


When you open an Excel file using the wizard, ACL uses the
Microsoft application programming interface, ActiveX Data
Objects (ADO), to access Excel data. This interface supports
Excel versions 97 and 2000.

52 Data Access Guide


Microsoft Excel

Once you select the spreadsheet or named range that contains


your data, the wizard prompts you to save the data in an ACL flat
file. From there, the wizard takes you to the Finish screen, where
you can see the fields that have been defined.
In a properly formatted Excel workbook:
The first row contains only field names.
Data starts on the second row.
The data area contains no blank rows or columns.
To import files from versions of Excel earlier than 97, use ODBC
or save the file in a different format.

ODBC
When you use ODBC, ACL imports the spreadsheet or named
range as a flat file. See ODBC-compliant databases on page 61.

Other methods
You can also save the data in dBASE, text, or print-image format ? For more information, see
in the source application. You can then access the data by the dBASE-compatible on page 35.
method applicable to that particular file type. Of these formats,
ACL reads dBASE most easily.

Reference information
To avoid loss of data in columns that were not formatted before
data was entered and that contain both alpha and numeric
characters:

Save the Excel file as delimited


Save the Excel file in delimited format, then import the delimited
file into ACL. If the wizard detects numeric data in a character
field, or character data in a numeric field, it reports these
inconsistencies as errors. However, it still imports the contents of
all cells, even if columns of alphanumeric data were not
formatted before the data was entered.

Save the Excel file as dBASE


Save the Excel worksheet as DBF4 (dBASE IV) before you access
the file in ACL. DBF4 format truncates field names to ten
characters and if truncation produces like names, ACL displays

Data Access Guide 53


Chapter 4: Sources of data

only one of the identically named fields. To retain all of the data,
make sure that the first ten characters of each field name is
unique.
If the first data cell of a previously unformatted column contains
only numbers, Excel saves the column as numeric data and
non-numeric cell values display as zeroes in ACL. To avoid this
problem, select the first data cell of the worksheet in Excel and
insert an apostrophe (') in front of the cell's existing contents.
Then save the worksheet in DBF4 format. Now, when you access
the dBASE file with ACL, the data type becomes ASCII and all
numbers display correctly.

54 Data Access Guide


Microsoft Word

Microsoft Word
Microsoft Word documents are saved under a proprietary
format with a doc extension.

Method of access
You cannot import a Word document directly into ACL. Instead,
you must save the document as a text file or print it to a text file,
then import it through the Data Definition Wizard.
For a description of both procedures, see Save as a text file and
Print to a text file in Rich Text Format (RTF) on page 81.

Data Access Guide 55


Chapter 4: Sources of data

Multiple-record-type data
Multiple-record-type files contain more than one record type,
and can consist of fixed-length or variable-length records.
You first identify individual record types, then define the fields in
ACL. You then have several options for analyzing the data:
One record type at a time by creating a filter in the view.
For example, if your file contains records of type A and B,
use a filter to display only records of one type or the other.
More than one record type at a time by using a group in
a script or by using conditional or static-conditional
fields. This is a more complex but versatile approach.

Method of access
When multiple-record-type files contain a record-length field,
you can use the wizard to create an ACL table. When
multiple-record-type files do not contain record lengths, you
must use the Table Layout window to manually define the fields.

Print-image files
Electronic report files, also known as print-image files, are
multiple-record-type files, and commonly include header, detail,
and trailer records. See Print-image on page 78.

CR/LF files
In CR/LF files, a carriage return (CR) and a line feed (LF)
character, or sometimes just one or the other, indicate the end of
a line. ACL automatically identifies a CR/LF file and processes it
in the same way that it processes a fixed-length file.

IBM variable-length files


See IBM variable-length on page 46.

Files with record length in file


Some file types either store the length of each record in a field of
the record or they store a value from which record length can be
computed.

56 Data Access Guide


Multiple-record-type data

ACL automatically processes multiple-record-type files that


store the record length in the file. However, on the Edit Field
Properties screen of the wizard, you must define the field that
contains the record length as a numeric data type with 0 decimal
places. Name this field Record_length. The field name indicates
to ACL that this field contains record length. Once you close and
reopen the file, the fields line up correctly.

Files with no record length


Some files do not store the record length in the record. But if you
know or can calculate the record length, ACL can process the file.
 To specify record length
1 Open your file in the Data Definition Wizard. On the File
Properties screen, select the Skip to Finish option, then
click Next, and on the following screen click Finish. Save the
file when prompted. ACL displays the data in the Table
Layout window.
2 On the Table Layout Options tab, select Fixed Record
Length from the File Type drop-down list.
3 In the display area of the Edit Fields/Expressions tab, select
a field to define, preferably a record-type field if your file
contains one. Define the field, then click the green check
mark.
4 Click the Add a New Expression button to define a
conditional computed field that specifies the length of each
record type. Enter Record_length in the Name text box
and assign a default value equal to the length of the longest
record.
5 Click the Insert a Condition button. In the Condition box,
specify a condition that identifies one of the record types.
6 Once you assign conditions and values for each record type,
click the green check mark to accept the field definition, then
close the Table Layout window.
7 Close, then reopen the table. Now ACL recognizes the
Record_length field name and automatically reads its
contents as the record length.
8 Select Edit Table Layout from the menu to define the rest of
the data fields. ACL processes the data as a fixed-length file.

Data Access Guide 57


Chapter 4: Sources of data

Segmented files
Segmented files, also called bucketed files, are a type of
variable-record-length file in which a set of header fields is
followed by one or more sets of data fields.
Segmented files store data efficiently because each record is only
as long as it needs to be and contains no empty or repeating
fields. COBOL files often contain fields or tables that can occur a
varying number of times, depending on the value in the header
field, as defined by an OCCURS clause.
Here is an example of a segmented file.
Header fields Segment Segment Segment Segment
Segments Emp_ID Emp_Name Year Sales Year Sales Year Sales Year Sales
3 101 Andersen 2002 58500 2001 60400 2000 63000
1 102 Guterriez 2002 60700
2 105 Schmidt 2002 62500 2001 58300
4 107 Lapierre 2002 63300 2001 59500 2000 67500 1999 63500
1 108 Ko 2002 56000

The header fields might contain a field that indicates the number
of segments that follow, as in the example. If this information is
not present, you might be able to calculate the number of
segments in a script by using other information such as the
segment length.

Defining segmented files


Open your file in the Data Definition Wizard. On the File
Properties screen, select the Skip to Finish option, then click
Next, and on the following screen click Finish. Save the file when
prompted. ACL displays the data in the Table Layout window.
On the Table Layout Options tab of the Table Layout window,
select Fixed Record Length from the File Type drop-down list.
Then specify a record length at least as long as the longest record,
including segments.

58 Data Access Guide


Multiple-record-type data

Define the header fields and the first segment. Then you can use
a script to process the file or to extract the fields to a flat file. To
define the fields you might need to refer to a record layout that
provides you with the following kinds of information:
Field name Data type Length
Segments
Emp_ID
Emp_Name
Year
Sales

Processing the segmented file


Once you define the fields that are common to all of the records,
you can process the file with a script. The following example
shows a script that uses the LOOP command and the OFFSET( )
function to process such a file segment by segment.
GROUP
Counter = 1
Shift_bytes = 0
Bucket_length = 20
LOOP WHILE Counter <= Segment_count_field
V_field1 = OFFSET(SegmentField1, Shift_bytes)
V_field2 = OFFSET(SegmentField2, Shift_bytes)
TOTAL FIELDS V_field1 V_field2
STRATIFY ON V_field1 V_field2 MIN 0 MAX 10000 INTERVAL 10 TO SCREEN
Shift_bytes = Shift_bytes + Bucket_length
Counter = Counter + 1
END
END

Extracting the segmented file to a flat file


You might find it useful to extract the fields from a segmented file
into a flat ACL file for further processing. In a flat file each
segment of data, such as sales for one year, appears as a separate
record, as in this example.
Emp_ID Emp_Name Year Sales
101 Andersen 2002 58500
101 Andersen 2001 60400
101 Andersen 2000 63000
102 Guterriez 2002 60700
105 Schmidt 2002 62500
105 Schmidt 2001 58300

Data Access Guide 59


Chapter 4: Sources of data

107 Lapierre 2002 63300


107 Lapierre 2001 59500
107 Lapierre 2000 67500
107 Lapierre 1999 63500
108 Ko 2002 56000

There are several ways to do this in a script. The following


example shows a script that uses the LOOP command and the
OFFSET( ) function to extract the segments to a new flat data
file.
GROUP
Counter = 1
Shift_bytes = 0
Bucket_length = 20
LOOP WHILE Counter <= Segment_count_field
V_field1 = OFFSET(SegmentField1, Shift_bytes)
V_field2 = OFFSET(SegmentField2, Shift_bytes)
EXTRACT FIELDS Field1 Field2 Field3 V_field1 V_field2 TO "Newfile"
Shift_bytes = Shift_bytes + Bucket_length
Counter = Counter + 1
END
END

60 Data Access Guide


ODBC-compliant databases

ODBC-compliant databases
ODBC (open database connectivity) is a Microsoft interface that
you can use to access data from any database application.
ODBC-compliant data sources include Access, Excel, Oracle,
DB2, FoxPro, Peoplesoft, dBASE, Informix, IMS, Sybase, SQL,
SQL Server, ADABAS, SAS, and SPSS, among others.
Developers can create ODBC-enabled applications, also known
as ODBC-compliant or ODBC-client applications. Developers
can also write ODBC drivers, DLLs (dynamic link libraries), for
specific database management systems or data sources.

Method of access
To access an ODBC-compliant data source in ACL, you need an
ODBC driver specific to ACL, and an ODBC driver specific to the
data source. Drivers, developed by data-source and third-party
manufacturers, form the core of ODBC, and act as the translator
between ACL and the data source.
The rules and methods of access do not differ, regardless of the
data source. ACL uses the ACL-ODBC driver to place a call to the
ODBC Administrator for the data. The Administrator, in turn,
uses the data-source ODBC driver to read the data from the data
source. This data is then translated into a standard ODBC format
and returned to ACL, where ACL copies the data to an ACL data
file.

ACL ODBC Administrator Data source

ACL ODBC driver (DLL) Data source ODBC driver (DLL)

 To import ODBC-compliant data


1 Select the ODBC option in one of these ways:
On the Select Data Source screen of the Data Definition
Wizard, select ODBC.
From the menu, select Data External Data ODBC.

Data Access Guide 61


Chapter 4: Sources of data

Although you see ACL in the background, you are now


working in the ODBC manager. You do not return to ACL
until ACL creates an ACL file from the imported data source.
2 Select a data source name (DSN) from one of the tabs in the
Select Data Source dialog box.
If your data source is a file, continue with the next step. If
your data source is a database, you will be prompted to
log on with your user name and password. Continue to
step 4.
If neither tab contains a DSN, click the New button. You
should see a list of available drivers. To create a new DSN,
select a driver and click Next. If there are no drivers,
ODBC is not installed on your computer. Contact your
system administrator for assistence.
3 Select the data source that you want and click OK to display
the Select Table dialog box.
The list of tables includes tables and views from the default
directory. You can select other table types, such as system
tables, from the Types area of the dialog box.
You can import physical or logical tables, one table at a time.
If Select Table displays more than one table with the same
name, distinguish one from another by checking table owner
information in the Owner drop-down list.
To reduce the access time, you can deselect the Estimate File
Size option.
4 Select the table that you want. Click Next, then name the file
that ACL will create for the imported data. Click Save to
display the Select Fields dialog box.
By default, all available fields appear in the Selected Fields
list. Click the arrow buttons, Add All, or Clear All to change
the selection to only those fields that you want.
You can also enter a Structured Query Language (SQL)
statement in the WHERE box to limit the records that ACL
imports.
If you selected the Estimate File Size option in the previous
dialog box, the Select Fields dialog box displays the amount
of disk space required for the imported file.

62 Data Access Guide


ODBC-compliant databases

5 Click Next to display a progress bar that shows the


progression of the ODBC conversion process. The message
flashes quickly for small ODBC files.
ACL imports the database, one record at a time, as a flat,
fixed-length, sequential file. When the conversion is
complete, ACL displays the table and you can begin your
analysis.
 To add a new DSN
A data source name (DSN) associates a driver with the data
source you want to access using ODBC. A file-based data source
can be shared among all users who have the same drivers
installed. A machine data source is specific to a particular
computer, but may be shared with other users of that computer if
you so specify.
In the Select Data Source dialog box, choose either the File Data
Source tab or the Machine Data Source tab. Click New and
follow the prompts.

Reference information
This section contains information about the commands that are
associated with ODBC-compliant data and about the SQL
WHERE clause.

Import ODBC data from within a script


The easiest way to do this is to import the database through the
wizard. Then copy the IMPORT command from the log and
paste it into your script. Once in the script, you can edit the
command to meet your specifications.
Command syntax
IMPORT ODBC SOURCE source-name TABLE
table-name <QUALIFIER data-qualifier>
<OWNER user-name> <USERID user-id>
<PASSWORD n> <WHERE where-clause> <TO
<path>table-name> <WIDTH
max-char-column-width> <max-text-width>
<FIELDS field-list...>

Data Access Guide 63


Chapter 4: Sources of data

When you paste the IMPORT command into a script, the


confidential password information is not included. You need to
manually add the PASSWORD parameter to the new script.

Refresh the ACL table


ACL copies the data to an ACL file. Consequently, ACL tables do
not reflect subsequent changes to the data source unless you
update the data in the file by using the Refresh command.
 To update a table
1 Right-click the table and select Refresh from Source or select
Edit Table Layout.
2 On the Table Options tab of the Table Layout window,
click the Refresh button.
Command syntax
REFRESH table_name <PASSWORD n>

Supply a password
To import or refresh password-protected ODBC data sources,
use the PASSWORD command to create a dialog box that
prompts for the password.
Or use SET PASSWORD to store a password in a script.
The PASSWORD method of prompting for a password provides
greater security than the SET PASSWORD method, which
provides a password that is visible in the text of your script.
PASSWORD command syntax
PASSWORD 1 "Enter Payroll Password:"
REFRESH Payroll PASSWORD 1
SET PASSWORD command syntax
SET PASSWORD 1 "passwordXYZ"
REFRESH Payroll PASSWORD 1

Filter records with the WHERE clause


The SQL (Structured Query Language) WHERE clause limits
the amount or type of data that you receive from the data source.
By default, ACL returns all rows from the specified data source.
When you use the WHERE clause, you specify a test condition.

64 Data Access Guide


ODBC-compliant databases

Then, ODBC returns only those records that meet the test
condition. For example, you can use the WHERE clause to limit
data to accounts receivable over a specified amount or to
shipping dates that fall within a certain range.
The WHERE clause requires two operands and one operator. Do
not type the word where in the WHERE text box. Syntax can
vary from one database to another, so if you experience
problems, contact your systems administrator.

Common syntax conventions


Here are some common syntax conventions:
Numeric fields: Use no punctuation.
QUANTITY < 100
returns records with QUANTITY values of less than 100.
Text fields (character data): Enclose in single quotes.
CITY = 'London'
returns records from the CITY field that contain the value
London.
Date Fields: Enclose in the # character.
ORDERDATE < #12/31/2000#
returns records from the ORDERDATE field that contain
date values older than December 31, 2000.
First operand: Use the name of an existing field. Use no
punctuation.
Operators: You can use the equal operator (=) and the
not equal operators (<>, !=) with numeric or text fields.
Use the following operators with numeric fields only: <,
<=, >=, >.
If you use these operators with text fields, the
corresponding numeric ANSI values for each character
within the fields are compared in left-to-right sequence.
LIKE and BETWEEN: Use to limit or simplify the
selection of data.
Use LIKE to specify a pattern match on specific fields. For
wildcard characters, use the underscore (_) to represent

Data Access Guide 65


Chapter 4: Sources of data

any single character and the percent sign (%) to represent


any combination of characters.
CUSTID LIKE 'B%'
returns records from the CUSTID field that contain
values that begin with the letter B.
CUSTID LIKE '__X%'
returns records in which the first two characters of the
customer identification can be any single character, the
third character is X, and the remaining letters can be any
combination of characters.
Use BETWEEN to restrict the returned records to those
where a particular field falls between two values.
SHIPDATE BETWEEN #07/01/1999# AND
#12/31/2001#
returns records that contain a shipping date that falls
between July 1, 1999, and December 31, 2001.
Boolean operators: Use AND, OR, and NOT to create
clauses that contain more than one logical expression.
These statements take the form WHERE
logical-expression AND logical-expression
AND...
AND, OR, and NOT work the same way in ODBC as they
do in ACL. Use parentheses to control the order in which
expressions are evaluated.
ACCREC >= 5000 AND ACCREC <= 10000
returns all records from the accounts receivable field that
fall between 5000 and 10000.
NOT(ACCREC BETWEEN 5000 AND 10000)
returns all records from the accounts receivable field that
do not fall between 5000 and 10000. Note the use of
BETWEEN instead of the AND statement.
Second operand: You can use another field name, an
expression, or a combination of expressions for the
second operand, which completes the clause. You use the

66 Data Access Guide


ODBC-compliant databases

operator to compare the second operand to the first


operand.
INVNO = CUSTNO
returns records with an invoice number that matches the
customer number.
INVNO >= 1000
returns records with an invoice number that is greater
than or equal to 1000.
IN and SELECT: Use IN and SELECT to join data from
one or more database tables before you import it into
ACL.
CLIENT_ID IN (SELECT CLIENT_ID FROM
CLIENTS)
returns only records from the imported table that match
on the CLIENT_ID field in both the imported table and
in the CLIENTS table. This is similar to an ACL matched
join between the table you selected in the Select Tables
dialog box and the CLIENTS table.
CLIENT_ID NOT IN (SELECT CLIENT_ID FROM
CLIENTS)
returns only records from the imported table that do not
match on the CLIENT_ID field in both the imported
table and in the CLIENTS table. This is similar to an ACL
unmatched join between the table you selected in the
Selected Tables dialog box and in the CLIENTS table.
CLIENT_ID NOT IN (SELECT CLIENT_ID FROM
CLIENTS WHERE LASTNAME LIKE 'A%')
returns only records that do not match on the
CLIENT_ID field in the imported table and in records
from the CLIENT_ID field of the CLIENTS table where
the LASTNAME field also begins with the letter A.

Proprietary syntax conventions


Some database management systems have proprietary variants
of SQL syntax.
For example, Oracle date formats do not conform to ANSI SQL
syntax. Date literals take the form 'DD-MMM-YY', with single

Data Access Guide 67


Chapter 4: Sources of data

quotes. You can use the Oracle TO_DATE( ) function to specify


dates.
Use one of these WHERE clauses to select data, based on specific
dates:
(WHERE) DATE = '20-MAR-99'
(WHERE) DATE = TO_DATE('20-MAR-99')
(WHERE) TO_DATE(DATE) = '20-MAR-99'
(WHERE) TO_DATE(DATE) = TO_DATE('20-MAR-99')

It is possible to customize Oracle SQL syntax. Consequently, you


might encounter a date format similar to DD MMM YY. If you find
syntax like this, obtain the correct format from the systems
administrator.

68 Data Access Guide


Oracle

Oracle
When you access Oracle data through ODBC, ACL imports the
data and copies it to a local drive. When you access Oracle data
through ACL Server Edition for AIX or ACL Server Edition for
Linux, ACL reads the data directly from the Oracle database.
This means that the ACL table reflects changes to source data as
such changes occur.

Method of access
Access Oracle data by one of these methods.

ACL Server Edition


To access Oracle data using ACL Server Edition, you must:
Enable the client/server option in ACL, then create a ? To learn more, select Help Index
server profile. From the Server Type drop-down list, and look up server profile.
select the server to which you want to connect.
Create a database profile. ? To learn more, select Help Index
and look up database profile.
Then, start the wizard, and follow these steps:
1 On the Select Platform for Data Source screen of the
wizard, select ACL Server. To establish a connection, select
the server on which your data resides from the drop-down
list.
2 On the Select ACL Server Data Source screen, select the
Database option, then from the drop-down list, select a
database profile.
3 On the Select Oracle Schema screen, select the schema that
you want.
4 Select a table from the drop-down list on the Choose
Database Tables screen. From the Available Tables list,
select the tables that you want. If you select more than one
table, you must relate the tables by using the Identify
Relationship dialog box.
5 If you selected more than one table, you can edit the
conditions of the join on the Condition Clause screen. To
edit a join condition, select the Edit the Condition Clause
option.

Data Access Guide 69


Chapter 4: Sources of data

6 Select the fields or columns that you want from the Select
Oracle Columns screen.
7 If you want to use WHERE and ORDER clauses, enter them
in SQL syntax on the Where and Order Clauses screen.
8 Once you define all of the fields, the wizard prompts you to
name and save the table.
To edit the query after you close the table, right-click the table in
the Overview. Select Properties, then click the Edit Query tab.
In a script, you can use the variables DBWHERE, DBORDER, ? To learn more, select Help Index
and DBCONDITION to edit WHERE, ORDER, and and look up defining server data files.
CONDITION clauses. The values that you assign to these
replacement variables remain in effect until you delete the
variables.

ODBC
You can also access Oracle data through ODBC. See
ODBC-compliant databases on page 61.

70 Data Access Guide


OS/400 FDF files

OS/400 FDF files


The record layout for data sets that are created on this platform is
stored in a reference file that is separate from the flat data file.
ACL calls such reference files external definition files. When ACL
converts the data in the FDF file to a table layout, it retains the
source data field names and identifies the source data types.
See a system administrator or use download utilities, such as PC
Support or Client Access, to download the data and the FDF file
from the OS/400 platform to a PC. Request the data in its native
EBCDIC format to avoid the risk of data error that conversion
introduces. Request the FDF file in ASCII format so that you can
read it in a text editor if you need to.

Method of access
Access OS/400 data by one of these methods.

External definition
Access the external definition file using the Data Definition
Wizard.
On the Select Data Source screen of the wizard, select External
Definition. On the next screen, select OS400 FDF, then browse
to locate the file. ACL creates a table layout using the external
definition, then prompts you to save it. If prompted, browse to
locate the data file. ACL creates the table.

ODBC
When you use ODBC, ACL imports the database as a flat,
fixed-length, sequential file and automatically creates a table.
See ODBC-compliant databases on page 61.

Other methods
If you cannot obtain an FDF file, obtain a printed or electronic
copy of the layout information, and create the table layout
manually.
You can also save the data in dBASE, text, delimited, or
print-image format in the source application. Then access the
data by the method applicable to that particular file type. ACL

Data Access Guide 71


Chapter 4: Sources of data

reads dBASE and print-image files more easily than text or


delimited files.

Reference information
The structure of your OS/400 FDF must resemble the structure
of the sample FDF below. With the FDF in ASCII format, you can
compare the ACL table to the FDF, and make changes to the table
layout, if necessary.

Sample OS/400 FDF


PCFDF
PCFT 6
PCFL JOENTRY 11 5/2
PCFL JOSEQN 10 6
PCFL JODATE 10 8
PCFL JOUSER 10 10

Interpret the FDF


The first two lines represent header lines.
PCFDF (Personal Computer File Description File)
identifies the file as a description file. The PCFDF line
must be the first entry.
PCFT (Personal Computer File Type), followed by a
number from the file type list, identifies the type of file in
which the data is stored.

Indicator File Type

1 ASCII text

2 DOS random

3 BASIC sequential

4 BASIC random

5 DIF (Data Interchange Format)

6 No-conversion file

72 Data Access Guide


OS/400 FDF files

Indicator File Type

7 Reserved (DBCS version only)

8 DOS random type 2

9 BIFF (Binary Interchange Format)

Subsequent lines represent field definitions.


PCFL identifies a field definition line.
JOENTRY represents a field name.
11 represents a zoned data type in accordance with the
OS/400 data type codes.

Code ACL Data type

1 ASCII

2 NUMERIC

3 ASCII

4 BINARY

5 ZONED

6 PACKED

7 MICRO

8 FLOAT

9 FLOAT

10 EBCDIC

11 ZONED

12 PACKED

5 represents the field length.


2 represents the number of decimals.

Data Access Guide 73


Chapter 4: Sources of data

Determine field positions


Field start positions begin at position one. Calculate subsequent
field positions by adding the lengths of the preceding fields.

74 Data Access Guide


PDF

PDF
You can capture Portable Document Format (PDF) text
electronically provided PDF security features do not prevent
copying or printing. Also, some PDF files store their content as a
raster image that you cannot edit.
ACL cannot read PDF files directly. To access data in a PDF file,
you must open it with an Adobe Acrobat product, such as
Acrobat Reader, from which you can select, copy, and paste
content into a text editor. Alternatively, you can print the
document to a text file.
 To print to a text file
1 Use the Windows Add Printer Wizard to add a
Generic/Text Only driver. For assistance on how to add a
printer, contact your systems administrator
2 In the Print dialog box, select Generic/Text Only from the
Name drop-down list and select the Print to file check box.
3 Click OK, and at the prompt, save the file.
You can open the file in a text editor to look at the record layout.
Sometimes the text no longer lines up properly. This occurs
because the PDF format and the application that created the file
store spacing information differently. Consequently, the spacing
information can become lost when you convert the file to text.
Import the text file through the Data Definition Wizard.

Data Access Guide 75


Chapter 4: Sources of data

PL/1 copybook files


The record layout for data sets created on this platform is often
stored in a reference file separate from the flat data file. ACL calls
such reference files external definition files. When ACL converts
the data in the copybook file to a table layout, it retains the source
data field names and identifies the source data types.
Ask the systems administrator to provide the data in its native
EBCDIC format to avoid the risk of data error that unnecessary
conversion introduces. Request the copybook file in ASCII
format so you can read it in a text editor if you need to.

Method of access
Access PL/1 data through the Data Definition Wizard, or by
defining the data manually.
If you have the PL/1 copybook on your local drive, this file can
be converted to a table layout in ACL. You can then link this
copybook to the PL/1 data that is defined by this copybook.
 To access PL/1 data through the Data Definition Wizard
1 First, you use ACL to convert the PL/1 copybook to an ACL
table layout. Select File > New > Table to open the Data
Definition Wizard.
2 Click Next and select Local. Click Next.
3 Select External Definition and click Next.
4 Select PL/1 and click Next. The Select External Definition
screen of the wizard appears.
5 In the External Definition box, click Browse and select the
PL/1 copybook file. Ensure that the PL/1 copybook file name
appears in the Selected Definitions pane. Click Next.
6 On the Select Conversion Properties screen, you can select
the Remove leading file indicator from field names and the
IBM Variable Length check boxes if applicable. Click Next.
The wizard displays the contents of the table layout. Click
Finish.
7 When prompted, enter the name of the new table layout.
Click OK. The Select File Location box appears. This box

76 Data Access Guide


PL/1 copybook files

allows you to browse for the PL/1 data that corresponds to


this copybook, on either the client or the server.
8 Select Client or Server, as appropriate. Browse to open the
data file. The table opens in ACL.
Note: If you have more than one PL/1 copybook for this data,
you can concatenate these files on the External Definition
screen of the wizard.

Manual layout
If you cannot obtain a copybook file, obtain a printed or
electronic copy of the layout information, and create the table
layout manually.

Reference information
Here is a sample PL/1 copybook.
DECLARE
1 ZDCBHDRD UNALIGNED BASED(ZDCBHDR_PTR),
3 HDR_RECORD,
5 DC_CONTROL,
7 RECORD_STATUS CHAR(1),
7 STATUS_DATE CHAR(6),
7 HDR_TYPE CHAR(1),
7 ENTRY_DETAIL,
9 POINT_OF_ENTRY,
11 OPER_ID CHAR(4),
11 TERMINAL_ID CHAR(8),
11 ENTRY_DATE BIN FIXED(15),
9 BATCH_BALANCE,
11 OPER_ID CHAR(4),
11 TERMINAL_ID CHAR(8),
11 ENTRY_START_DATE BIN FIXED(15),
11 ESTIME BIN FIXED(31),
11 ENTRY_STOP_DATE BIN FIXED(15),
11 ENTRY_STOP_TIME BIN FIXED(31),
9 CORRECTION,
11 OPER_ID CHAR(4),
11 TERMINAL_ID CHAR(8),
11 CORR_START_DATE BIN FIXED(15),
11 CORR_START_TIME BIN FIXED(31),
11 CORR_STOP_DATE BIN FIXED(15),
11 CORR_STOP_TIME BIN FIXED(31),

Data Access Guide 77


Chapter 4: Sources of data

Print-image
Print-image (report) files consist of records that contain different
types of data, usually in the form of a text report that is formatted
for print. Print-image data sources often contain extraneous
information, such as page headers, that you ignore when you
define the data.

Method of access
When you define print-image files through the wizard, they fall ? See Direct access, manual layout
into the import and copy, manual layout category of data on page 20.
access. When you manually define print-image files, they fall
into the direct access, manual layout category.
The Print Image File Definition screen of the wizard contains
features to help you process print-image files.

Print Image File Definition screen


ACL automatically assesses record length, but you can change ? To learn more, select Help Index
the length in the Record Length box, if necessary. The Hint and look up print-image.
section at the top of the screen provides prompts for the most
likely sequence of steps in the definition process. The screen also
shows a preview of the contents of your file and lets you scroll
through the data.
The wizard looks for patterns in your file and attempts to define
the file automatically. If the wizard finds a pattern, it highlights
records in gray and fields in blue. If you do not want to accept the
wizards suggestions, you can right-click in either the gray or the
blue areas to delete or edit both individual fields and entire
records.
You can define fields that span more than one line, such as an
address block or a multi-line description. And you can define
variable-height fields.
Use the Fill if Blank option in Advanced Options of the Field
Definition dialog box to specify that ACL copy data from a
preceding record into corresponding blank fields on subsequent
records.
You can create multiple header or footer type records. And you
can select the Transparent check box in the Record Definition

78 Data Access Guide


Print-image

dialog box to obscure repeating report headers or footers that


split multiline records.

Other options
Instead of using the Print Image File Definition screen when
you define your data source, you can select the Other File
Format option on the File Format screen of the wizard. Then,
on the File Type screen, select either the Print Image (Report)
File or the Multiple Record Type File option.
You can also select either the Skip to Finish or the Skip Field
Identification option in the wizard to define your file in the
Table Layout window.

Reference information
You can reuse or modify a table layout.

Reusing table layouts


You cannot link an existing table layout to another print-image
data source because the structures of the ACL file and the data
source will differ.
But ACL creates an IMPORT PRINT statement in the log with
the syntax:
IMPORT PRINT TO <table_name> "<file_name.fil>" FROM
"<path_and_file_name_of_source>" SERVER profile_name
character_set_value RECORD "Detail" 0 1 0 TEST 0 0

You can modify these values either in the command line or in a


script:
table_name
file_name.fil
path_and_file_name_of_source

Then, rerun the command from the log or in a script to import


another print-image data source. ACL applies the original table
layout to the new data source to create a file identical in structure
to the original file.

Data Access Guide 79


Chapter 4: Sources of data

Modifying table layouts


When you import a print-image file, the .fil that ACL creates is a
fixed-length file that contains only the defined sections of the
source data. The .fil file retains no undefined data. So determine
what data you need before you begin the definition process. To
import additional fields later on, you must either redefine the
file, or modify the IMPORT PRINT command, which requires
advanced knowledge of ACL processes.

80 Data Access Guide


Rich Text Format (RTF)

Rich Text Format (RTF)


You cannot import RTF files directly into ACL because of the
RTF codes that are included with the data. In the source
application, you can either save the RTF file as plain text or you
can print it to a text file.
Once you import the RTF document into ACL, you might find
that the text no longer lines up properly. The way that your
document displays depends upon the RTF formatting
commands that were used when the document was created.

Save as text
 To save RTF as text
1 From the File menu, select Save As.
2 From the Save as type drop-down list, select Text Only
(*.txt).
You can open the file in a text editor to look at the record layout.
Then import the data through Data Definition Wizard.

Print to file
As another option, you can use the Windows Add Printer ? For assistance on how to add a
Wizard to add a Generic/Text Only driver. printer, contact your systems
administrator.
 To print to a text file
1 In the Print dialog box, select Generic/Text Only from the
Name drop-down list and select the Print to file check box.
2 Click OK, and at the prompt, save the file.
You can open the file in a text editor to look at the record layout.
Then import the data through Data Definition Wizard.

Data Access Guide 81


Chapter 4: Sources of data

SAP
You can access SAP data through Direct Link. Or you can
download the data from SAP queries, reports, or the data
browser in a format that ACL can read. As a final option, you can
print your report to a file.

Direct Link
Direct Link is a complementary product that provides the ability ? To learn more about Direct Link, visit
to link directly to SAP data from within ACL. the ACL website.

First, you open Direct Link and log onto your SAP system. Then
you build queries to select the data that you want to download.
When you next run the queries, ACL automatically downloads
the source data and creates a table that contains the data that you
queried.

SAP output formats


SAP offers several output format options. These vary, depending
on your installation.
Reports and queries both offer the spreadsheet output option to
download results in a delimited file format. Then you can use
ACL to access the data as you would any other delimited data
source.
Reports and queries also offer the unconverted output option to
download results in a text file format. Then ACL processes the
data as print-image.
You can download data tables from the SAP data browser and
obtain the same output options as in reports and queries. To
display the SAP data browser, use the SAP transaction code
/se16.

If you have private file format installed, it appears in queries as an


option, too. When you download in SAP private file format, the
wizard offers the option of using local language or
standard-delivered SAP German abbreviations for ACL field
names. Then ACL automatically creates a table layout of your
SAP data.

82 Data Access Guide


SMF

SMF
System Management Facility (SMF) data sets collect and record
system and job-related information. Use this information to:
Invoice for system use
Report reliability
Analyze the configuration
Schedule jobs
Summarize direct access volume activity
Evaluate data set activity
Profile system resource use
Maintain system security
When a particular event occurs, SMF writes a certain type of
record to the data sets. Such events include job starts, job abends,
data set deletions, and initial program loads (IPLs).
By studying trends from historical SMF data, you can evaluate
changes in configuration, workload, or job scheduling
procedures. Similarly, you can analyze SMF data to find
inefficient operational procedures and programming
conventions.

Method of access
Download the SMF data set from the mainframe in binary
format. Obtain the SMF layout file, which describes the SMF data
layout, from the IBM Documentation CD.
In the Data Definition Wizard, import the SMF layout file.
Accept the wizard defaults until the File Properties screen,

Data Access Guide 83


Chapter 4: Sources of data

where you select the Skip to Finish option to manually define


the layout. The table layout that you create looks similar to this:
FILE_NAME 'SMF80.LAYOUT'
RECORD_LENGTH VARIABLE SKIP 0
REC_TYPE EBCDIC 8 1
START NUMERIC 9 3 0
NAME EBCDIC 20 8
LENGTH NUMERIC 29 5 0
TYPE EBCDIC 40 8
DESC EBCDIC 50 37
VBSTART COMPUTED
*N 0 1
START + 1
Next, you use this script to create a layout file to read the SMF
data set:
COMMENT
******** This will open the SMF layout table.

OPEN SMFLAYOUT

COMMENT
******** This filters out records based on their record type.

SET FILTER HEX(REC_TYPE) = 'FA'

COMMENT
******** This will create a an ACL table layout file with multiple IBM record
types.

GROUP IF length <> 0

LIST NAME ' ' TYPE vbstart LENGTH ' :'DESC


unformatted TO "SMF80.FMT"

ELSE

LIST '*' + blanks(31)+ ':'+ DESC as'' unformatted


TO "SMF80.FMT"

END

Once you run the script, add the FILE_NAME card to the first row
of the table layout file SMF80.FMT.
Finally, import the format file into ACL with the Import from
Server File option, then link the resulting ACL table layout to the
SMF data file.

84 Data Access Guide


SMF

Reference information
This section provides examples of SMF record types and shows
what types of reports you can create from SMF data. It also offers
suggestions for ways to use these reports.

SMF record types


Record Type 80 is written during Resource Access Control
Facility (RACF) processing when one of these events is detected:
Unauthorized attempts to enter the system
Authorized accesses or unauthorized attempts to access
RACF-protected resources
Authorized or unauthorized attempts to modify profiles
on RACF database
Successful or unsuccessful partner LU verification
Record Type 81 is written at the completion of the initialization
of the RACF.
Record Type 83 is written to audit data sets that are affected by
an RACF command that caused the security label associated
with a data set to be changed.

Data set activity records


SMF produces records that contain information on data set
activity. These records, which include types 4, 14, 15, 17, 18, 30,
and 34, can help answer these questions:
What is the average data set size for both tape and direct
access devices?
Is the number of multi-volume data sets significantly
large?
What percentage of all data sets are permanent? What
percentage are temporary?
What percentage of all temporary data sets does virtual
input output (VIO) control?
Which data sets do applications use most frequently?
How often do applications reuse permanent data sets?

Data Access Guide 85


Chapter 4: Sources of data

What is the average block size, block count, and EXCP


count for each tape data set?
How are problem programs using chained scheduling?

Problem-program activity records


These examples show some of the ways to evaluate
problem-program data set activity from SMF records.

Multiple extents
An installation can check the number of extents field in the
UCB section of SMF type 14 and 15 records. From this field, the
installation can identify direct access data sets that have exceeded
their primary allocation and used their secondary allocation.
Secondary allocation, while useful, can affect system
performance and fragment the space on direct access volumes.
Check for multiple extents to avoid an X37 abend in a
production job the next time it runs. While the job may get the
space it needs this time, the next allocation may be on a volume
that only has enough space for the primary allocation. The
attempt at secondary allocation will fail and waste resources in
reruns.

Data set modifications


SMF writes certain record types when you modify data sets.
A system can sort these records by job name or user ID. Then,
you can obtain a report of the data sets that were defined,
modified, or deleted by problem programs during a specified
interval. Such a report can be useful as backup, especially when
critical data sets have been unintentionally altered or destroyed.

Record Data set modification


type

17 Scratch a non-VSAM data set

18 Rename a non-VSAM data set

60 Update a VSAM data set

61 Define a catalog entry for the integrated catalog facility

66 Alter or rename a catalog entry for the integrated catalog facility

86 Data Access Guide


SMF

Record Data set modification


type

63 Define or alter a VSAM catalog entry

65 Delete a catalog entry for the integrated catalog facility (type


65)

67 Delete a VSAM catalog entry

68 Rename a VSAM catalog entry

Open/close activity
When EOV closes or processes a data set, SMF writes a type 14 or
15 record. The installation can count type 14 and 15 records to
find how many times EOV closed or processed a given data set.
For this kind of report, exclude SMF records for programs such
as sorts, where you know in advance that the open and close
activity is significant.

Blocking factors
From the block size and logical record length fields in SMF type
14 and 15 records, a system can identify data sets that are
processed with ineffective block factors. For example, a 10,000
record data set is processed, unblocked, with a logical record
length of 80, using a 3380 device. When the system encounters
such a data set, it can increase its block size to 6160 or 77 records.
Increased block size minimizes I/O-processing overhead and
reduces direct-access storage requirements.

Optional services
Although they are useful, optional services can hinder system
performance if they are used inappropriately. For example, the
write-validity check (OPTCD=W) service requires an additional
disk rotation to reread the data that is written for each output
block. Similarly, a data set that overuses the chained scheduling
(OPTCD=C) service might monopolize the available time on a
channel. The system can use the SMF type 14 and 15 records to
ensure that applications that use an optional service are
authorized or justified in using the service.

Data Access Guide 87


Chapter 4: Sources of data

UNIX-based data
The UNIX family of operating systems was one of the first
portable operating system that could be installed on different
hardware platforms, from PCs to mainframes. Originally free,
many businesses and organizations have developed customized,
proprietary versions of the original operating system. AIX is a
version of UNIX produced by IBM. Linux is an open-source
operating system derived from UNIX.
Like Microsoft Windows, UNIX typically uses the ASCII
character set. This means you do not need to convert data from a
computer that runs UNIX to use the data on a PC. However,
some numeric data types that are used on AIX and Linux
systems may be unreadable on a PC.

Method of access
Access UNIX-based data by one of these methods.

Network Access
You can access files on a network-enabled computer that runs a
UNIX-based operating system just as you access files on a
network-enabled PC, provided you have the appropriate access
rights.
To access a UNIX file system as a mapped drive or network share ? See also Drive mapping on
in Windows, the UNIX system must run a Server Message Block page 12.
(SMB) to provide Windows network share support. Samba
software is commonly used for this purpose.

FTP
You can retrieve files from a UNIX computer using FTP.

ODBC
You can access ODBC-compatible databases that run on a UNIX
system through ODBC. For information see ODBC-compliant
databases on page 61.

Direct Link
You can access SAP data on a UNIX system using Direct Link or
the methods of access described in SAP on page 82.

88 Data Access Guide


UNIX-based data

ACL Server Edition


You can access AIX or Linux-based data and process it on the
server where it resides using ACL Server Edition software. With
ACL Server Edition, you can read any flat file on the server, and
access both Oracle and DB2 databases directly from the Data
Definition Wizard.
To access DB2 databases using ACL Server Edition software, see
DB2 on page 31.
To access Oracle databases using ACL Server Edition software,
see Oracle on page 69.

Data Access Guide 89


Chapter 4: Sources of data

VSAM
ACL handles Virtual Storage Access Method (VSAM) files
similarly to the way it handles IBM variable-length files. You
specify variable length as a file property when you define VSAM
data.
VSAM Entry Sequence Data Sets (ESDS) are read in the order
that the records were written to the file. VSAM Key Sequence
Data Sets (KSDS) are processed in the sequence defined by the
VSAM index. VSAM Relative Record Data Sets (RRDS) are
processed according to the relative record number sequence. In
VSAM files, the data always starts in position 5.
VSAM consists of two major parts:
Catalog management
VSAM maintains extensive information about data sets
and direct access storage space in a catalog. The catalog
can be either an integrated catalog facility, which is
recommended, or a VSAM catalog. The catalogs
collection of information about a particular data set
defines that data set's characteristics. Every VSAM data
set must be defined in a catalog.
Record management
You can use VSAM to organize records into four types of
data sets: key-sequenced, entry-sequenced, linear, or
relative record. The way in which records are stored and
accessed accounts for the difference between these types
of data sets.
Define VSAM data sets by using either access-method-services
commands or Job Control Language (JCL) dynamic allocation.

90 Data Access Guide


VSAM

Method of access
Follow these steps to access VSAM data through a client/server
environment:
1 Once you set up a profile, activate the Data Definition Wizard
and select the ACL server on which the VSAM data resides.
Enter your password if prompted.
2 On the Select ACL Server Data Source screen, select the Flat
Files or VSAM option, then open the file that you want to
define.
3 As you continue through the wizard, select IBM mainframe
or minicomputer (EBCDIC) as the character set and
Variable Length as the file property. Make other choices
appropriate to your file. Define your fields, then name and
save the file.

Data Access Guide 91


Chapter 4: Sources of data

XML
XML is short for Extensible Markup Language, an open standard
for a markup language that you use to create documents and
exchange data between applications and between organizations.
XML uses tags to identify the structure and content of data that
can be transmitted in the form of text.
ACL reads XML data using Microsoft ActiveX Data Objects
(ADO) technology.

Method of access
ACL automatically creates a table layout from an XML document
provided your XML structure looks like this:
<RECORDS>
<RECORD>
<INVOICE_AMOUNT>618.30</INVOICE_AMOUNT>
<INVOICE_DATE>11/17/2000</INVOICE_DATE>
<INVOICE_NO>5981807</INVOICE_NO>
</RECORD>
<RECORD>
<INVOICE_AMOUNT>217.80</INVOICE_AMOUNT>
<INVOICE_DATE>11/18/2000</INVOICE_DATE>
<INVOICE_NO>5981808</INVOICE_NO>
</RECORD>
</RECORDS>

Each value is enclosed between two tags with the corresponding


field name, and every record is enclosed between the
<RECORD> and </RECORD> tags. ACL does not currently
support sub-levels.
If your file differs from this format you will need to access the
data in another way. In the source application, save your file in a
different format, such as text. You can then access the data by the
method applicable to that format.

92 Data Access Guide


Index

I NDEX
A identifying with SMF 87 DB2 32
Block-description field Oracle 70
Access. See Microsoft Access
IBM variable-length data 46 Control totals
Accessing data
Bucketed files. See Segmented files importance of 5
ACL methods 16
Conversion
ACCPAC data
character set 7
accessing 24
ACL file
C numeric to character, dBASE 35
Categories problems, avoiding 11
definition of 17
data access 16 copybook
ACL Server Edition
CDs COBOL, interpreting 27
DB2 31
storage media 3 PL/1, sample 77
Oracle data 69
Character data CR/LF
UNIX-based data 89
dBASE format 35 multiple-record-type file 56
ACL table layout
delimited files 37 CTOD( ) function
about 16
Character set parsing date fields 40
ACL Server Edition
about 12 conversion problems 7, 11
ActiveX Data Objects Client Access
and Microsoft Access 51 download utility 71 D
and Microsoft Excel 52 Client/server environment Data
and XML 92 data transfer option 13 finding sources of 5
Advanced Options DB2 31 integrity
Field Definition dialog box 78 Oracle 69 testing for 9
AIX processing data in 12 losing, undefined 80
support in ACL 13 VSAM data 91 missing
AIX-based data Client/server. See also Microsoft Excel 52
accessing 25 ACL Server Edition preparing for transfer 10
AIX-based dateless also UNIX-based COBOL data Data access
data accessing 26 ACL methods 16
AS/400. See OS/400 category of access 22 impediments to 4
ASCII Column titles stages of 2
COBOL copybook format 26 header records 56 Data browser
data conversion 7, 11 Command syntax SAP 82
FDF format 71 See also Scripts Data conversion problems
Automatic fill dBASE files, OPEN 36 avoiding 7
blank fields 78 IMPORT Data dictionary
Automatic opening ODBC 63 record-layout document 15
Table Layout window 39 print-image 79 Data error
REFRESH 64 and client/server 13
SET PASSWORD 64 risks in downloading 11
B SMF data, reading 84 Data requests
Completeness of data formulating 5
Barriers
checking 9 sample form 8
data access 4
Computed fields Data set activities
Blank fields
COBOL level 88 29 monitoring with SMF 86
filling automatically 78
Condition clauses Data source name. See DSN
Block factors

93
Index

Data subsets Field Definition 78 External definition files


extracting 4 ODBC Text Setup 43 category of access 22
Data transfer Record Definition 78 COBOL copybook 26
PC to PC 12 Select Data Source definition of 7
speeds, compared 11 62 OS/400 71
standard methods 10 Select Database 62 PL/1 copybook 76
Data types Direct access
COBOL and ACL compared 27 automatic layout 19
OS/400 codes 73 external definition 22 F
Database administrator manual layout 20 Field Definition dialog box
role of 3 Direct Link print-image files 78
Database tables using 82 Field levels
importing through ODBC 62 Disk space COBOL 28
Databases ODBC 62 Field start positions
DB2 31 Documents IBM variable-length 47
dBASE 6, 35 HTML 44 OS/400 74
IMS 48 Microsoft Word 55 Fields
Microsoft Access 51 PDF 75 losing undefined 80
ODBC-compliant 61 RTF 81 missing in dBASE data 53
Oracle 69 XML 92 parsing in delimited files 40
OS/400 71 Download precautions redefining, COBOL 30
Date formats terminal emulation 11 repeating. See Segmented files
Oracle 67 Drivers File Definition Format
DB variables ODBC 61 interpreting 72
DB2 32 DSNs File layout. See Record layout
Oracle 70 missing 62 File size estimate feature
DB2 data ODBC 62
accessing 31 File structure
category of access 19 E considerations 6
improving retrieval speed 31 EBCDIC File Transfer Protocol. See FTP
dBASE format character set, using 7 Files
about 6 COBOL data 26 ACL, about 17
Microsoft Access files 51 conversion problems 11 flat 6
Microsoft Excel files 53 OS/400 data 71 preparing for transfer 10
OS/400 data 71 Emulation software. See Terminal Fill if Blank option
dBASE-compatible data emulation print-image data 78
accessing 35 Estimating file size Filters
category of access 19 ODBC feature 62 limiting ODBC data 64
Decentralized data systems Excel. See Microsoft Excel separating record types 56
usefulness 5 Export formats Fixed-length files
Delimited files transferring data 10 ACL 17
accessing 37 Extensions dBASE 6
category of access 18 dbf 19, 35 Flat files
Delimited format doc 55 ACL 17
Microsoft Excel files 53 fil 17 definition of 6
SAP 82 fmt 84 Formats.acl
Detail records htm or html 44 ACCPAC 24
multiple-record-type files 56 txt 81 Formatting
Dialog boxes Extents WHERE clauses 65
Define Text Format 43 troubleshooting with SMF 86

94
Index

Four-byte record-length field conducting 9 Microsoft Access


bypassing 47 control totals, using 5 accessing 51
FTP Interfaces category of access 17
about 11 DB2 31 Microsoft Excel
UNIX systems 88 Oracle 69 accessing 52
Full_record field Internet logs category of access 17
delimited files 40 category of access 20 Microsoft Text Driver
IS. See Informations systems delimited data 43
Microsoft Word
G accessing 55
Generic/Text Only driver J Missing
adding 75 Jargon data
Groups information systems 4 Microsoft Excel 52
COBOL fields 28 DSNs 62
fields
L dBASE data 53
H Layout file record-lengths 47
Header records SMF 83 undefined data 80
multiple-record-type files 56 Layout. See Record layout Multiple field occurrences
Headers Legacy data adding to ACL table 30
hiding in multiline records 78 category of access 20 Multiple-record-type files
Hexadecimal values print-image format 7 See also IBM variable-length data
delimited files 38 Length. See Record length accessing 56
HTML files Levels
accessing 44 COBOL fields 28
Linux N
support in ACL 13 Native character set
I Linux-based data OS/400 data 71
IBM variable-length data See also UNIX-based data using 7
See also Multiple-record-type files accessing 50 Native format
accessing 46 Local systems reading data directly 16
missing record-lengths in 12 as sources of data 5 Numeric to character conversion
Import and copy Logical fields dBASE 35
automatic layout 17 COBOL level 88 29
manual layout 18 Lost data
IMPORT command Microsoft Excel 52 O
modifying for reuse 79 OCCURS statement
syntax, ODBC 63 defining 30
Import for OS/390 File option M ODBC
SMF 84 Mainframe data password protection 64
IMS data transferring to PC 10 security and performance
accessing 48 Manual definition concerns 6
category of access 20 delimited files 39 ODBC Link
IND$FILE methods of access 16 software 24
record-length problems 12 print-image files 79 ODBC-compliant data
Informations systems record-layout information 15 accessing 61
working with staff 4 Master file category of access 17
Input file definition. See Table layout ACCPAC 24 DB2 33
Input file. See Tables Methods delimited files 43
Integrity tests data access 16 IMS 49

95
Index

Microsoft Access 51 PIC clauses VSAM data sets 90


Microsoft Excel 53 interpreting 27 Record types
Oracle 69 PL/1 data multiple-record, processing 56
OS/400 71 accessing 76 SMF 85
refreshing 64 category of access 22 Record_length field
UNIX systems 88 Platforms creating 57
OFFSET( ) function support in ACL 13 Records
processing multiple OCCURS 26 Print files. See Print-image SMF data set activity 85
Open and close activity Print Image File Definition screen REDEFINES
monitoring with SMF 87 features 78 COBOL data 30
Opening problems Print to text file Refreshing data
dBASE files 36 HTML files 45 ODBC 64
Operating systems PDF documents 75 Repeating fields. See Segmented files
support in ACL 13 RTF documents 81 Report files. See Print-image
Optional services Print-image files Reports
monitoring with SMF 87 accessing 78 SMF 85
Oracle data category of access 18 Request for data
accessing 69 Print-image format formulating 5
category of access 19 HTML 44 sample form 8
date formats in ODBC 69 legacy data 7 Reusing table layouts
ORDER clauses Microsoft Access 51 delimited data 40
DB2 32 SAP unconverted output 82 print-image data 79
Oracle 70 Print-spool files. See Print-image Rich Text Format. See RTF
OS/390 Private file format RTF files
platform, support for 13 SAP 82 accessing 81
OS/400
accessing 71
category of access 22 Q S
Output formats Queries Sample
SAP 82 SAP 82 data request form 8
transferring data 10 File Definition Format file 72
Overlapping fields PL/1 copybook 77
defining COBOL 30 R record layout 5
Read-only XML data 92
ACL characteristic 15 SAP data
P Record Definition dialog box accessing 82
Password Transparent option 78 category of access 17
ODBC data sources 64 Record layout on UNIX system 88
PC data COBOL copybook 26 Script
transferring 12 external definition 7 importing ODBC data 63
PC Support OS/400 File Definition Format 71 offline server scripts 13
download utility 71 PL/1 copybook 76 processing segmented files 30
PC-based applications purpose of 5 reading SMF data sets 84
ACCPAC 24 sample 5 reusing table layouts 79
dBASE-compatible 35 See also ACL table layout Security concerns
PDF documents Record length ODBC 6
accessing 75 missing 47 Segmented files
Performance concerns problems, avoiding 12 COBOL 30
ODBC 6 segmented files, calculating 58 defining 58
specifying 57 extracting to a flat file 59

96
Index

multiple-record-type data 58 System Management Facility. See print-image processing 78


processing 59 SMF Troubleshooting
Select Data Source dialog box dBASE file-opening 36
ODBC 62 missing print-image data 80
Select Database dialog box T problem data set activity 86
ODBC 62 Table layout split multiline records 78
SELECT statements definition of 16 Truncation of fields
modifying for DB2 31 Table Layout window dBASE data 35, 53
SET PASSWORD opening automatically 39
command syntax 64 Table layouts
Shared drive reusing U
PC data 12 delimited data 40 Undefined data
SMF print-image data 79 losing 80
data, accessing 83 Tables UNIX
reports, using 85 ACL, about 16 support in ACL 13
Source data ACL, refreshing 64 UNIX-based data
copied to ACL file 17 database, importing 62 accessing 88
Sources of data Tapes Updating data source
finding 5 data storage method 3 ODBC 64
Space considerations Telephone logs
transferring data 10 category of access 20
Speed Terminal emulation V
comparisons, data transfer 11 about 11 Value of field separators
Spool files. See Print-image Terminology specifying 38
Spreadsheet option information systems 4 VALUE( ) function
SAP output 82 Testing parsing numeric fields 40
SQL syntax data integrity 9 Variable-length files. See IBM
DB2 31 Text files variable-length data
ODBC Tier 1 drivers 64 category of access 20 VSAM data
ODBC Tier 2 drivers 67 Text format accessing 90
Oracle HTML 45 category of access 19
data processing 69 Microsoft Access files 51
date formats 67 Microsoft Excel files 53
Stages RTF 81 W
data access 2 SAP 82
Storage media WHERE clauses
XML 92 DB2 32
types 3 Text qualifiers
String delimiters. See Text qualifiers ODBC 65
delimited data 37 Oracle 70
Structure of file Text-only driver
considerations in selecting 6 Word. See Microsoft Word
adding 75
Structured Query Language. See SQL Totals
syntax control 5 X
Subfields Trailer records
creating in delimited files 40 XML data
multiple-record-type files 56 accessing 92
Subsets Transaction file
data, extracting 4 category of access 17
ACCPAC 24
DB2, processing 34 Transfer data. See Data transfer
SUBSTR( ) function Transfer speeds
parsing character fields 40 comparing 11
Z
Syntax. See Command syntax Transparent option z/OS
importing SMF data 83

97
Index

98
2006 ACL Services Ltd.

You might also like