Download as pdf or txt
Download as pdf or txt
You are on page 1of 94

DATA ACCESS GUIDE

DATA ACCESS GUIDE


Copyright © 2007 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
December 2007

ACL Services Ltd.


1550 Alberni Street
Vancouver, BC
Canada V6G 1A5
Telephone: +1-604-669-4225
E-mail: [email protected]
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. z/OS is a registered trademark of IBM Corporation. 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.

November 9, 2007 11:01 am


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
COBOL copybook files .................................................................. 25
DB2 ................................................................................................. 30
dBASE-compatible ......................................................................... 31
Delimited ........................................................................................ 33
HTML ............................................................................................. 37
IBM variable-length ....................................................................... 39
IMS .................................................................................................. 41
Microsoft Access ............................................................................ 43
Microsoft Excel ............................................................................... 45
Microsoft Word .............................................................................. 47
Multiple-record-type data .............................................................. 48
ODBC ............................................................................................. 53
Oracle .............................................................................................. 55
OS/400 FDF files ............................................................................. 56
PDF ................................................................................................. 60
PL/1 copybook files ........................................................................ 62
Print-image (Report files) .............................................................. 64
Rich Text Format (RTF) ................................................................ 66
SAP .................................................................................................. 67
SMF ................................................................................................. 68
SQL Server ....................................................................................... 73
UNIX-based data ............................................................................ 74
VSAM .............................................................................................. 75
XBRL 2.1 ......................................................................................... 77
XML ................................................................................................. 79

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 L 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 data access options 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 L 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 system’s 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 system’s 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 [email protected]

From George Auditor, West Branch, Metaphor Corporation

E-mail address [email protected]

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, L 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 39.

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 L 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 Windows and z/OS platforms.

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, and any ODBC-compliant data “ODBC” on page 56.
source, such as SQL Server, Oracle, and 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 from any of these sources can be refreshed at any
time.
Excel, Access, XML, SAP, and ODBC-compliant data sources

Data source Import

00110100 01010 00010 001101 110011

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, PDF, 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 PDF and 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.
Data imported from any of these sources can be refreshed at any
time.

Delimited files, PDF files, print-image files


with multiple types of records

Manual layout

Data source

Import data

00110100 01010 00010 001101 110011

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 z/OS can access DB2, IMS, and
VSAM 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.

dBASE, DB2, Oracle, VSAM

Import layout

00110100 01010 00010 001101 110011

Data source Table layout Views

Data Access Guide 19


Chapter 3: Access the data

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.

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


flat, sequential data file

Record-layout or
data-dictionary
document

Manual layout

00110100 01010 00010 001101 110011

Data source Table layout Views

20 Data Access Guide


Direct access

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 110011

Data source Table layout Views

Data Access Guide 21


Chapter 3: Access the data

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.

Data access options


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


COBOL copybook files

■ 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.

Data access options


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.

Data Access Guide 25


Chapter 4: Sources of data

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

26 Data Access Guide


COBOL copybook files

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,

Data Access Guide 27


Chapter 4: Sources of data

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".

28 Data Access Guide


COBOL copybook files

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 L Contact ACL Help Desk at
record, as in a bucketed file, use the LOOP command and the [email protected] to obtain a standard
OFFSET( ) function in an ACL script. script to remove or process segments of
bucketed files.

Data Access Guide 29


Chapter 4: Sources of data

■ DB2
DB2 is a relational database management system (RDBMS)
developed by IBM. The software is most commonly installed on
IBM mainframes, but is also available for the Unix and Windows
operating systems.

Data access options


The two main ways to access DB2 data are outlined in the
following sections. If neither of these methods can be applied in
your situation, your systems administrator or database
administrator will need to provide you with a copy of the data
you need in a dBASE file, or other flat file format.
Using ACL Desktop to access ODBC data
If you have the required DB2 ODBC driver installed on your
workstation, and you have the necessary rights to the DB2
database, you can use ODBC to connect to the database with
ACL Desktop. For more information on using ACL Desktop to
access ODBC data sources, see “ODBC” on page 53.

Using the DB2 database interface in ACL Server Edition


ACL Server Edition ships with an interface you can use to
directly access data in DB2 databases. All processing takes place
on the server which ensures the highest level of security and
performance.
You need to complete the following steps to directly access DB2
data using ACL Server Edition:
■ Create a Server Profile with the settings required to
connect to the server where ACL Server Edition is
running.
■ Create a Database Profile with the settings required to
access the DB2 database you want to import data from.
Select DB2 as the database profile type.
■ Use the Data Definition Wizard to create an ACL table
from the DB2 database.

30 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.

Data access options


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 31


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.

32 Data Access Guide


Delimited

■ Delimited
Delimited text files are commonly used to import and export
data from spreadsheet and database applications. Delimited text
files represent each database or spreadsheet row as a row in the
delimited text file. In a delimited text file, each record is
separated by a line separator. The valid line separators are:
carriage-return (CR), line-feed (LF), and the standard
DOS/Windows character sequence CRLF (both). Fields in each
record are separated by a field separator character. There are
three main types of delimited files that are categorized based on
the field separator character they use:
■ Comma separated values (.csv) - Commas are used to
delimit the fields in each record.
■ Tab-separated values (.tsv) - Tabs are used to delimit the L Tab-separated value files can
fields in each record. easily become corrupted. If you are
working with tab-separated values you
■ Text files (.txt) - May be comma or tab delimited, or may
should never edit the files by hand. Tabs
use another field separator. Other common field can be mistaken for spaces and when
separators used are spaces, pipes (|), and semicolons (;). the files are manually edited the tabs
can be accidentally deleted.
If the field separator character is used in the data, a text qualifier
(typically double-quotes (" ") or single- quotes (' ')) is used to
indicate that the character is a part of the value, and not a field
separator. If you use a comma as your field separator, values that
use commas need to be qualified with quotes. For example,
$1,000 would be interpreted as two fields ($1 and 000) unless the
field uses a text qualifier ("$1,000").
Once you import data from a delimited text file, you can update
the table whenever necessary without going through the Data
Definition Wizard again. Note, however, that you need to ensure
that the field lengths are large enough to import any new data.
The field length is set based on the longest value in the field, or
the field title if it is longer. You can modify this default value by
editing the field length in the table layout. Any field values that
are longer than field length will be truncated.

Data Access Guide 33


Chapter 4: Sources of data

Example
The following example shows the first four records from a
delimited text file. The file uses commas as the field separator
and double-quotes as the text qualifier. Each row includes seven
fields separated by commas. The first row identifies the field
names in the table. The last field includes a text qualifier, so that
the comma in the dollar value is not interpreted as field
separator.
First_Name,Last_Name,CardNum,EmpNo,HireDate,Salary,Bonus_2007

Lila,Remlawi,8590122497663807,000008,12/28/1997,52750,"$1,405.40"
Vladimir,Alexov,8590122281964011,000060,10/5/1997,41250,"$4,557.43"

Alex,Williams,8590124253621744,000104,8/12/2001,40175,"$7,460.02"

Creating tables from delimited text files


You can create tables in ACL by importing data from delimited
text files. The Data Definition Wizard allows you to select the
field separator, the text qualifier, and the fields to import. The
following procedure outlines the steps for importing delimited
text data into a table that you will only use once.
If you need to import delimited text files with the same structure ? To learn more, select Help » Index
more than once, you can make the process more efficient by and look up “reusable table layouts”.
creating a reusable table layout. A reusable table layout can be
associated with any delimited text files that share a common
structure.
Data from delimited text files can also be imported through
ODBC using the Microsoft Text Driver. For more information on
ODBC, see “ODBC” on page 53. You can also import delimited
text files using a script. For more information, see the IMPORT
command reference in ACL Online Help.
 To create a table from a delimited text file
1 Select File » New » Table.
2 In Select Platform for Data Source, select Local and click L The Select Platform for Data
Next. Source form is only displayed in the
Data Definition Wizard if the Enable
3 Select Disk and click Next. Client/Server option is selected.

34 Data Access Guide


Delimited

4 In Select File to Define, locate and select the delimited text


file you want to import data from and click Open. The
delimited text file can have a .csv, .tsv, or .txt extension.
Ensure that the Data Definition Wizard has correctly
classified the file as the Delimited text file type and click
Next. If you have a file that contains delimited text data and
uses the .txt extension, you will need to select the Delimited
text file option.
5 Use the Delimited File Properties form to specify the
following properties for the delimited text file you are
importing:
■ Start on Line - Enter a value greater than one to specify
the number of lines the Data Definition Wizard should
skip when reading the file. This option is useful if you
want to ignore header information at the top of the file.
■ Field Width - Selecting the appropriate field in the
preview grid and enter a new value to change the width of
the field in the ACL table.
■ Use first row as field names? - Select this option to
indicate that the first line in the file is used to list field
names.
■ Treat Consecutive qualifiers as one - Select to indicate
that qualifier symbols inside qualifiers should be ignored.
■ Field Separator - Select the character used to separate
fields in the file you are importing. You can select
Comma, Tab, or Semicolon, or you can select Other and
enter the character to use as the field separator.
■ Text Qualifier - Select the text symbol used to identify
characters that belong inside the field. You can select
Double Quote or Single Quote, specify None to indicate
that a text qualifier is not being used, or you can select
Other and enter the character to use as the text qualifier.
6 Click Next.
7 In Save Data File As, enter the name for the table data file
(.fil) you are creating and click Save.

Data Access Guide 35


Chapter 4: Sources of data

8 In Edit Field Properties, you can modify the name and


properties for each field by selecting the appropriate field in
the preview grid and updating any of the following fields:
■ Ignore this field - Select this check box for any fields you
don't want to import into your ACL table.
■ Name - If necessary, enter a new column name.
■ Column Title - Enter the column title to display in the
column heading of ACL table you are creating.
■ Type - Select the appropriate data type from the
drop-down list (Text, Numeric, or Date). For Date fields,
you can specify appropriate formatting in the Date
Format text box. For Numeric fields, you can specify the
number of decimal places to include in the Decimal text
box.
9 Review the properties of the table you are creating and click
Finish.
10 Enter a name for the ACL table you are adding to your project
and click OK.

36 Data Access Guide


HTML

■ 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.

Data access options


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.

Data Access Guide 37


Chapter 4: Sources of data

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.

38 Data Access Guide


IBM variable-length

■ 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

Data Access Guide 39


Chapter 4: Sources of data

Data access options


Import IBM variable-length data by using either the Data L 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.

40 Data Access Guide


IMS

■ 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.

Data access options


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 L 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.

Data Access Guide 41


Chapter 4: Sources of data

ODBC
You can also access IMS data through ODBC. See “ODBC” on
page 56.

42 Data Access Guide


Microsoft Access

■ Microsoft Access
ACL can import data from Microsoft Access directly. You do not L Access 2007 data can only be
need Microsoft Access installed on your PC to import the data imported using Windows XP or
into ACL. Windows Vista operating system.
Earlier versions of Windows do not
If the file is password-protected, ensure you have the correct support Office 2007 formats.
password before importing the file.
Numeric Access data with a large number of digits may be
rounded automatically during the import, particularly when
your data was created by an earlier version of Access.

Data access options


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

Data Definition Wizard


Follow the instructions provided in the wizard. In the Source
Data screen, select Disk. In the following screen select Access
database as the file format.
During the import, the wizard prompts you to enter the
maximum character field length. This is the maximum field
length for character data. Enter a value from 0 to 255 characters.
In the same screen, enter the maximum memo field length. This
is the maximum field size for memo data. This value cannot be
more than 32,000 characters.
Data that exceeds the limits specified here is truncated in the
ACL table.

Command line import


You can also import data from Access through the command line
using the following syntax:
IMPORT ACCESS TO output_tablename
<PASSWORD n> “output_fil_filename” FROM
“input_database” TABLE "input_tablename"
CHARMAX max_column_width MEMOMAX
max_memo_width

Data Access Guide 43


Chapter 4: Sources of data

The syntax elements must be entered in the same order as in the


example above.
Instead of writing the syntax, import the database through the ? To learn more, select Help » Index
Data Definition Wizard. Then copy the syntax from the and look up “IMPORT”.
command log and paste it in the command line, where you can
edit it as required.

Other methods
To import files from versions of Access earlier than 2000, use
ODBC or save the data in a different format.
The ODBC interface reads Access data and translates it into a
standard ODBC format that can be imported into ACL.
To import Access data through ODBC, open the Data Definition
Wizard and select ODBC in the Source Data screen. The ODBC
wizard is launched. See “ODBC” on page 56 for more details.
You can also save the data in another format that ACL can read. ? For more information, see
Access files can be saved as delimited, XML, dBASE, text, or “Delimited” on page 33.
print-image files.
Tables created from an Access file can be updated to include
changes in the source. To update a table use the Refresh from
Source File button or the REFRESH command.

44 Data Access Guide


Microsoft Excel

■ Microsoft Excel
ACL can read Microsoft Excel data directly. You do not need
Microsoft Excel installed on your PC to import Excel files into
ACL. Excel files that are password-protected cannot be
imported.
A successful import of data from Excel into ACL depends on a L Excel 2007 data can only be
number of factors, particularly on the type of data contained in imported using Windows XP or
each column. In Excel, columns can contain various types of Windows Vista operating system.
data. In the same column, one cell might contain a date, another Earlier versions of Windows do not
a number, and another a text string. These inconsistencies may support Office 2007 formats.
cause loss of data during the import.
When a column has different types of data, Excel samples the
first eight cells and determines the data type based on the format
of the majority. For example, if the first few cells in a column
contain numbers, the column is considered a numeric column.
Then, when importing this data into ACL, cells containing
non-numeric data will appear empty. Similarly, if the first few
cells contain text, subsequent cells that contain numbers will be
considered as character data in ACL.
To get complete and correct data from Excel ensure that:
■ Data in a column is of the same type and has the same
format.
■ The data area contains no blank rows or columns.
You can also import Excel data from within a named range.

Data access options


Import tables from a Microsoft Excel database by one of the
following methods.

Data Definition Wizard


Follow the instructions provided by the wizard. In the Source
Data screen select Disk. In the next screen select Excel as the file
format.
In the Data Source screen, the wizard prompts you to select the
spreadsheet or named range that contains the data you want to
import. You can select one spreadsheet or named range at a time.

Data Access Guide 45


Chapter 4: Sources of data

The “$” at the end of a name indicates that the source is a


spreadsheet. This symbol is added temporarily and does not
appear in the final file and table names.
In the same screen, select the checkbox if you want to use the first
row of the source file as field names. In addition, enter the
maximum character field length. Data that exceeds this limit is
truncated in ACL.

Command line import


You can also import data from Excel through the command line
using the following syntax:
IMPORT EXCEL TO output_tablename
"output_fil_filename" FROM
"input_filename" TABLE
"input_worksheet$_or_named_range"
CHARMAX max_column_width <KEEPTITLE>
Ensure that you enter the syntax elements in the same order as in ? To learn more, select Help » Index
the example above. and look up “IMPORT”.

Instead of writing the syntax, import the database through the


Data Definition Wizard. Then copy the syntax from the
command log and paste it in the command line, where you can
edit it if necessary.

Other methods
To import files from versions of Excel earlier than 3.0 use ODBC
or save the file in a different format.
ODBC interface reads the data and translates it into a standard
ODBC format that can be imported into ACL.
To import Excel data through ODBC, open the Data Definition
Wizard and select ODBC in the Source Data screen. The ODBC
wizard is launched. See “ODBC” on page 56 for more details.
Alternatively, you can save the Excel file in another format that ? For more information, see
ACL can read. Excel files can be saved as delimited and other text “Delimited” on page 33.
file formats.
Tables created from an Excel file can be updated to include
changes in the source. To update a table use the Refresh from
Source File button or the REFRESH command.

46 Data Access Guide


Microsoft Word

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

Data access options


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 66.

Data Access Guide 47


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.

Data access options


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 (Report files)” on page 64.

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 39.

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.

48 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.

Data Access Guide 49


Chapter 4: Sources of data

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.

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.

50 Data Access Guide


Multiple-record-type data

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.
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

Data Access Guide 51


Chapter 4: Sources of data

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
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

52 Data Access Guide


ODBC

■ ODBC
Open Database Connectivity (ODBC) is a data access
technology you can use to import data from a variety of data
sources into ACL for analysis. ODBC enables you to import data
from any ODBC-compliant data source on your local
workstation, or from any network location that you have the
appropriate security rights to access.
ODBC provides a middle layer, called a database driver, between
the data source and ACL. This layer translates ACL’s queries into
commands that the data source understands. ODBC drivers exist
for almost all relational databases, and are also available for
many non-relational data sources such as spreadsheets and text
files. In order to access a particular data source using ODBC you
must have the correct driver for the data source installed. For
example, in order to access a Microsoft SQL Server database you
must have the appropriate SQL Server ODBC driver installed. In
some cases, the required ODBC drivers are installed with the
operating system. In other cases, you need to install the ODBC
driver that is provided with you application or available from a
third-party vendor. Contact your systems administrator if you
need assistance locating and installing an ODBC driver.
When you access a data source through ODBC, ACL imports the
data you select in the Data Definition Wizard into an ACL table.
You can import both physical database tables and views. To
import an ODBC table into ACL, you need to select the data
source to connect to, and then select the particular table and
fields to import. You can also filter the records in the table you are
importing using a WHERE clause. After you import the data,
you can modify the data type and formatting for individual
columns.

Data Access Guide 53


Chapter 4: Sources of data

Data access options


You can create tables from ODBC data sources using ACL
Desktop Edition. For detailed instructions, see “Creating tables
from ODBC data sources” in ACL Online Help.
To access a data source using ODBC you must have the
appropriate ODBC driver for the data source installed on your
system.
If your systems administrator is reluctant to provide ODBC
access to the database because of security concerns or because of
performance considerations, you may need to have the data
extracted to a dBASE file or other flat file.

54 Data Access Guide


Oracle

■ Oracle
Oracle is a relational database management system (RDBMS)
developed by Oracle Corporation. The software is available for
the Linux, Unix, and Windows operating systems.

Data access options


The two main ways to access Oracle data are outlined in the
following sections. If neither of these methods can be applied in
your situation, your systems administrator or database
administrator will need to provide you with a copy to the data
you need in a dBASE file, or other flat file format.

Using ACL Desktop to access ODBC data


If you have the required Oracle ODBC driver installed on your
workstation, and you have the necessary rights to the Oracle
database, you can use ODBC to connect to the database with
ACL Desktop. For more information on using ACL Desktop to
access ODBC data sources, see “ODBC” on page 53.

Using the Oracle database interface in ACL Server Edition


ACL Server Edition ships with an interface you can use to
directly access data in Oracle databases. All processing takes
place on the server which ensures the highest level of security
and performance.
You need to complete the following steps to directly access data
using ACL Server Edition:
■ Create a Server Profile with the settings required to
connect to the server where ACL Server Edition is
running.
■ Create a Database Profile with the settings required to
access the Oracle database you want to import data from.
Select Oracle as the database profile type.
■ Use the Data Definition Wizard to create an ACL table
from the Oracle database.

Data Access Guide 55


Chapter 4: Sources of data

■ 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.

Data access options


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” on page 56.

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

56 Data Access Guide


OS/400 FDF files

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

Data Access Guide 57


Chapter 4: Sources of data

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.

58 Data Access Guide


OS/400 FDF files

Determine field positions


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

Data Access Guide 59


Chapter 4: Sources of data

■ PDF
You can import data from PDF files into ACL. ACL can read files
created with Acrobat 5 and later versions.
PDF documents can contain images and text, which may appear
in paragraphs, tables, headers, footers, and other structures. ACL
extracts text data only.
A PDF file may be password-protected. Depending on the type L Before importing a PDF file,
of security applied, you may be required to provide a document verify the security settings. If the file is
open password (to open the file) or a permissions password (to password-protected, ACL will prompt
copy the content). PDF files with Certificate Security (public key you to enter the appropriate password.
encryption) cannot be accessed by ACL.
PDF files keep spacing and font information from the original
application. Extra spaces or inconsistent fonts may cause data to
be misaligned during the file definition. If possible, ensure that
the spaces and fonts in the original file are consistent before
creating a PDF file.

Data access options


Import data from PDF files by one of these methods.

Data Definition Wizard


Follow the instructions provided in the wizard. Select Disk as
source of data and PDF Adobe Acrobat file as the file format.
The PDF File Definition screen shows the document
information. If the file is password-protected, the wizard
prompts for the password. You must provide the correct
password in order to continue. In the same screen, specify the
pages you want to import.
The wizard looks for patterns in your file and attempts to define ? For more information on how to
the table automatically. In the following screens, you can define define fields and records manually,
the fields, record length, and edit the table layout manually. The select Help » Index and look up
Hint section at the top of the screen provides prompts for the “Creating a table from a PDF or
most likely sequence of steps in the definition process. print-image file”.

60 Data Access Guide


PDF

Command line import


You can also import data from a PDF file through the command
line, using the following syntax:
IMPORT PDF TO table_name <PASSWORD n>
“output_file_name.fil” FROM
“path_and_file_name_of_source”
<PAGES page_range>
After the import, you can edit the table layout manually and
select the data you want to display in the table. To modify the
table layout, go to Edit » Table Layout.
Data imported from a PDF file can be updated to include
changes in the source. To update a table created from a PDF file,
use the Refresh from Source File button or the REFRESH
command.

Data Access Guide 61


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.

Data access options


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.

62 Data Access Guide


PL/1 copybook files

7 When prompted, enter the name of the new table layout.


Click OK. The Select File Location box appears. This box
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 63


Chapter 4: Sources of data

■ Print-image (Report files)


Print-image (report) files are electronic copies of reports. These
files can be generated from different applications and usually
have extension .txt.
ACL can access report files and import the text data into a table
for further analysis.

Data access options


Import data from report files by one of these methods.

Data Definition Wizard


In the Data Definition Wizard select Disk as source of data and
Print-Image (Report) file as the file format.
The Print-Image File Definition screen displays the report file.
The wizard attempts to identify detail records and fields from
patterns in your data. If the wizard finds a pattern, it highlights
records in gray and fields in blue.
If the wizard is unable to find a pattern or you want to edit the ? For more information on how to
wizard’s suggestions, you must define the data manually. In the define fields and records manually,
following screens, you can define detail records, headers, and select Help » Index and look up
fields. The Hint section at the top of the screen guides you “Creating a table from a PDF or
through the steps in the definition process. print-image file”.

In addition, 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 and create multiple header or footer
type records.
Alternatively, you can also define your file in the Table Layout
window. select either the Skip to Finish or the Skip Field
Identification option in the wizard.

64 Data Access Guide


Print-image (Report files)

Command line syntax


You can also import data from a report file through the
command line, using the following 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

Data Access Guide 65


Chapter 4: Sources of data

■ 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.

66 Data Access Guide


SAP

■ 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.

Data Access Guide 67


Chapter 4: Sources of data

■ 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.

Data access options


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,

68 Data Access Guide


SMF

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.

Data Access Guide 69


Chapter 4: Sources of data

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?

70 Data Access Guide


SMF

■ 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

Data Access Guide 71


Chapter 4: Sources of data

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.

72 Data Access Guide


SQL Server

■ SQL Server
Microsoft SQL Server is a relational database management
system (RDBMS) developed by Microsoft. The software is only
available for the Windows operating system.

Data access options


The two main ways to access SQL Server data are outlined in the
following sections. If neither of these methods can be applied in
your situation, your systems administrator or database
administrator will need to provide you with a copy of the data
you need in a dBASE file, or other flat file format.

Using ACL Desktop to access ODBC data


If you have the required SQL Server ODBC driver installed on
your workstation, and you have the necessary rights to the
SQL Server database, you can use ODBC to connect to the
database with ACL Desktop. For more information on using
ACL Desktop to access ODBC data sources, see “ODBC” on
page 53.

Using the SQL Server database interface in ACL Server Edition


ACL Server Edition ships with an interface you can use to
directly access data in SQL Server databases. All processing takes
place on the server which ensures the highest level of security
and performance.
You need to complete the following steps to directly access SQL
Server data using ACL Server Edition:
■ Create a Server Profile with the settings required to
connect to the server where ACL Server Edition is
running.
■ Create a Database Profile with the settings require to
access the SQL Server database you want to import data
from. Select SQLServer as the database profile type.
■ Use the Data Definition Wizard to create an ACL table
from the SQL Server database.

Data Access Guide 73


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.

Data access options


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” on
page 56.

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

74 Data Access Guide


VSAM

■ 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 catalog’s
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.

Data Access Guide 75


Chapter 4: Sources of data

Data access options


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.

76 Data Access Guide


XBRL 2.1

■ XBRL 2.1
eXtensible Business Reporting Language (XBRL) is an
XML-based standard for defining and exchanging business and
financial data. XBRL can be used to submit financial data to
regulators, and to transfer data between companies or between
systems in a company. ACL supports the current XBRL 2.1
standard.
An XBRL instance document is an XML file that uses XBRL
elements and conforms to the standard. Examples of XBRL 2.1
instance document types include balance sheets, general ledgers,
and financial statements.
An XBRL 2.1 document is a valid XML file that typically uses the
standard XML file extension (.xml). The root element, or first
element in the file, identifies the file as an XBRL file. For more
information on XML files, see “XML” on page 79.

About XBRL Contexts


An XBRL 2.1 instance document includes definitions for one or
more contexts. A key piece of information the context identifies
is the time period an individual data element is valid for. Each
element in an instant document is associated with one of the
following periods:
■ Instant - A point in time. For example, the value of a
bank balance on 2007-01-01.
■ Period - A period beginning and ending on specified
dates. For example, financial transactions occurring
between 2007-01-01 and 2007-12-31.
■ Forever - The data is valid for an indefinite or undefined
period of time. For example, an account number is valid
forever.
The Data Definition Wizard only allows you to import one
context type into an ACL table. If an XBRL instance document
contains more than one context type, you can import the file
multiple times and create a separate ACL table for each context
type.

Data Access Guide 77


Chapter 4: Sources of data

An XBRL instance document may contain more than one


occurrence of a particular context. For example, a document
may contain two Period contexts, one that refers to the period
between 2006-01-01 and 2006-12-31, and another that refers to
the period between 2007-01-01 and 2007-12-31. In the Data
Definition Wizard, each period is displayed as a context you can
select.

Data access options


You can use the Data Definition Wizard in ACL Desktop
Edition to import data from XBRL 2.1 files on your local
workstation, or from any network location that you have the
appropriate security rights to access. For detailed instructions,
see “Creating tables from XBRL 2.1 files” in ACL Online Help.

78 Data Access Guide


XML

■ XML
eXtensible Markup Language (XML) is a markup language
commonly used to transmit data between computer systems or
applications. ACL can import any well-formed XML document.
A well-formed document is one that follows XML syntax rules.
XML files typically use a standard file extension (.xml). In some
cases, other file extensions are used, and the first line of the
document identifies it as an XML file. If a non-standard file
extension is used, you will need to manually select the XML file
format in the Data Definition Wizard.
XML files are structured in a standard way and support any
number of hierarchy levels. Hierarchy levels are represented by
nesting elements within other elements. When you attempt to
import an XML file, ACL identifies any data structure in the file
that can be imported into ACL tables. A data structure is a group
of elements that can be mapped to an ACL table. Each data
structure is identified with a table icon .
When you import a simple XML document with only one data
structure, it can be mapped directly to an ACL table. If you have
a more complex XML file with several data structures, you can
import each data structure into a separate table. You can then
define relationships between tables using the Relate Tables
command in ACL.
XML uses elements and attributes to identify the structure and
content of data. ACL can import both elements and attributes.
An element is a unit of XML data delimited by tags, and each
XML element can enclose other elements. In the following
example, the name element defines the value "John Smith":
<name>John Smith</name>

An attribute provides additional information about an element.


In the following example, the type attribute specifies that the
account element represents a checking account:
<account type="checking">991110101</account>

In the Data Definition Wizard, attribute names are distinguished


from element names by appending the "@" symbol to the start of
the name. For example, an attribute named "type" is displayed as
"@type".

Data Access Guide 79


Chapter 4: Sources of data

XML files usually include a mixture of elements and attributes,


and at least one data structure. The following example shows the
contents of a simple XML file that contains two client records:
<?xml version="1.0"?>
<accounts>
<client>
<name>John Smith</name>
<ID>JS004</ID>
<account type="checking">991110101</account>
<account type="savings">991110808</account>
</client>
<client>
<name>Jane Smith</name>
<ID>JS005</ID>
<account type="checking">771110103</account>
<account type="savings">771110303</account>
</client>
</accounts>

You can also import XBRL 2.1 files using the Data Definition
Wizard. XBRL 2.1 is an XML-based standard used by the
financial community. ACL has specific built-in support for
handling XBRL 2.1 files. For more information on XBRL 2.1
files, see “XBRL 2.1” on page 77.

Data access options


You can use the Data Definition Wizard in ACL Desktop
Edition to import data from XML files on your local workstation,
or from any network location that you have the appropriate
security rights to access. For detailed instructions, see “Creating
tables from XML files” in ACL Online Help.

80 Data Access Guide


Index

I NDEX
A C D
Access. See Microsoft Access Categories Data
Accessing data data access 16 finding sources of 5
ACL methods 16 CDs integrity
ACCPAC data storage media 3 testing for 9
accessing 24 Character data missing
ACL file dBASE format 31 Microsoft Excel 45
definition of 17 Character set preparing for transfer 10
ACL Server Edition conversion problems 7, 11 Data access
DB2 30, 31, 37, 40, 41, 47, 48, Client Access ACL methods 16
56, 62, 68, 74, 76 download utility 56 impediments to 4
ACL table layout Client/server environment stages of 2
about 16 data transfer option 13 Data browser
ACL Server Edition DB2 30, 31, 37, 40, 41, 47, 48, SAP 67
about 12 56, 62, 68, 74, 76 Data conversion problems
ActiveX Data Objects Oracle 55 avoiding 7
and Microsoft Access 43 processing data in 12 Data dictionary
and Microsoft Excel 45 Client/server. See also record-layout document 15
and XML 79 ACL Server Edition Data error
Advanced Options COBOL data and client/server 13
Field Definition dialog box 64 accessing 25 risks in downloading 11
AIX category of access 21 Data requests
support in ACL 13 Column titles formulating 5
AS/400. See OS/400 header records 48 sample form 8
ASCII Command syntax Data set activities
COBOL copybook format 25 dBASE files, OPEN 32 monitoring with SMF 71
data conversion 7, 11 SMF data, reading 69 Data subsets
FDF format 56 Completeness of data extracting 4
Automatic fill checking 9 Data transfer
blank fields 64 Computed fields PC to PC 12
COBOL level 88 28 speeds, compared 11
Control totals standard methods 10
B importance of 5 Data types
Barriers Conversion COBOL and ACL compared 26
data access 4 character set 7 OS/400 codes 58
Blank fields numeric to character, dBASE 31 Database administrator
filling automatically 64 problems, avoiding 11 role of 3
Block factors copybook Databases
identifying with SMF 72 COBOL, interpreting 26 DB2 30
Block-description field PL/1, sample 63 dBASE 6, 31
IBM variable-length data 39 CR/LF IMS 41
Bucketed files. See Segmented files multiple-record-type file 48 Microsoft Access 43
Oracle 55
OS/400 56
DB2 data

81
Index

accessing 30 Export formats ACCPAC 24


category of access 19 transferring data 10 Four-byte record-length field
improving retrieval speed 30, 31, Extensions bypassing 40
37, 40, 41, 47, 48, 56, 62, 68, dbf 19, 31 FTP
74, 76 doc 47 about 11
dBASE format fil 17 UNIX systems 74
about 6 fmt 69
Microsoft Access files 44 txt 66
Microsoft Excel files 46 Extents G
OS/400 data 56 troubleshooting with SMF 71 Generic/Text Only driver
dBASE-compatible data External definition files adding 62
accessing 31 category of access 21 Groups
category of access 19 COBOL copybook 25 COBOL fields 27
Decentralized data systems definition of 7
usefulness 5 OS/400 56
Delimited files PL/1 copybook 62 H
category of access 18 Header records
Delimited format multiple-record-type files 48
Microsoft Excel files 46 F Headers
SAP 67 Field Definition dialog box hiding in multiline records 64
Detail records print-image files 64 HTML files
multiple-record-type files 48 Field levels accessing 37
Dialog boxes COBOL 27
Field Definition 64 Field start positions
Record Definition 64 IBM variable-length 40 I
Direct access OS/400 59
automatic layout 19 IBM variable-length data
Fields See also Multiple-record-type files
external definition 21 redefining, COBOL 29
manual layout 20 accessing 39
repeating. See Segmented files missing record-lengths in 12
Direct Link File Definition Format
using 67 Import and copy
interpreting 57 automatic layout 17
Documents File layout. See Record layout
HTML 37 manual layout 18
File structure Import for OS/390 File option
Microsoft Word 47 considerations 6
PDF 60 SMF 69
File Transfer Protocol. See FTP IMS data
RTF 66 Files
XML 79 accessing 41
ACL, about 17 category of access 20
Download precautions flat 6
terminal emulation 11 IND$FILE
preparing for transfer 10 record-length problems 12
Fill if Blank option Informations systems
print-image data 64 working with staff 4
E Filters Input file definition. See Table layout
EBCDIC separating record types 48 Input file. See Tables
character set, using 7 Fixed-length files Integrity tests
COBOL data 25 ACL 17 conducting 9
conversion problems 11 dBASE 6 control totals, using 5
OS/400 data 56 Flat files Interfaces
Emulation software. See Terminal ACL 17 DB2 30, 31, 37, 40, 41, 47, 48,
emulation definition of 6 56, 62, 68, 74, 76
Excel. See Microsoft Excel Formats.acl Oracle 55

82
Index

Internet logs data platform, support for 13


category of access 20 Microsoft Excel 45 OS/400
IS. See Informations systems record-lengths 40 accessing 56
Multiple field occurrences category of access 21
adding to ACL table 29 Output formats
J Multiple-record-type files SAP 67
Jargon See also IBM variable-length data transferring data 10
information systems 4 accessing 48 Overlapping fields
defining COBOL 29

L N
Layout file Native character set P
SMF 68 OS/400 data 56 PC data
Layout. See Record layout using 7 transferring 12
Legacy data Native format PC Support
category of access 20 reading data directly 16 download utility 56
print-image format 7 Numeric to character conversion PC-based applications
Length. See Record length dBASE 31 ACCPAC 24
Levels dBASE-compatible 31
COBOL fields 27 PDF documents
Linux 74 O accessing 60
support in ACL 13 OCCURS statement Performance concerns
Local systems defining 29 ODBC 6
as sources of data 5 ODBC PIC clauses
Logical fields security and performance interpreting 26
COBOL level 88 28 concerns 6 PL/1 data
Lost data ODBC Link accessing 62
Microsoft Excel 45 software 24 category of access 21
ODBC-compliant data Platforms
category of access 17 support in ACL 13
M IMS 42 Print files. See Print-image
Mainframe data Microsoft Excel 46 Print Image File Definition screen
transferring to PC 10 Oracle 55 features 64
Manual definition OS/400 56 Print to text file
methods of access 16 UNIX systems 74 HTML files 38
print-image files 64 OFFSET( ) function PDF documents 62
record-layout information 15 processing multiple OCCURS 25 RTF documents 66
Master file Open and close activity Print-image files
ACCPAC 24 monitoring with SMF 72 accessing 64
Methods Opening problems category of access 18
data access 16 dBASE files 32 Print-image format
Microsoft Access Operating systems legacy data 7
accessing 43 support in ACL 13 Microsoft Access 44
category of access 17 Optional services SAP unconverted output 67
Microsoft Excel monitoring with SMF 72 Print-spool files. See Print-image
accessing 45 Oracle data Private file format
category of access 17 accessing 55 SAP 67
Microsoft Word category of access 19
accessing 47 date formats in ODBC 55
Missing OS/390

83
Index

Q record layout 5 Subsets


SAP data data, extracting 4
Queries
accessing 67 System Management Facility. See
SAP 67
category of access 17 SMF
on UNIX system 74
Script
R offline server scripts 13 T
Read-only processing segmented files 29 Table layout
ACL characteristic 15 reading SMF data sets 69 definition of 16
Record Definition dialog box Security concerns Tables
Transparent option 64 ODBC 6 ACL, about 16
Record layout Segmented files Tapes
COBOL copybook 25 COBOL 29 data storage method 3
external definition 7 defining 51 Telephone logs
OS/400 File Definition Format 56 extracting to a flat file 52 category of access 20
PL/1 copybook 62 multiple-record-type data 50 Terminal emulation
purpose of 5 processing 51 about 11
sample 5 SELECT statements Terminology
See also ACL table layout modifying for DB2 30, 31, 37, information systems 4
Record length 40, 41, 47, 48, 56, 62, 68, 74, Testing
missing 40 76 data integrity 9
problems, avoiding 12 Shared drive Text files
segmented files, calculating 50 PC data 12 category of access 20
specifying 49 SMF Text format
VSAM data sets 75 data, accessing 68 HTML 38
Record types reports, using 70 Microsoft Access files 44
multiple-record, processing 48 Source data Microsoft Excel files 46
SMF 70 copied to ACL file 17 RTF 66
Record_length field Sources of data SAP 67
creating 49 finding 5 Text-only driver
Records Space considerations adding 62
SMF data set activity 70 transferring data 10 Totals
REDEFINES Speed control 5
COBOL data 29 comparisons, data transfer 11 Trailer records
Repeating fields. See Segmented files Spool files. See Print-image multiple-record-type files 48
Report files. See Print-image Spreadsheet option Transaction file
Reports SAP output 67 ACCPAC 24
SMF 70 SQL syntax Transfer data. See Data transfer
Request for data DB2 30, 31, 37, 40, 41, 47, 48, Transfer speeds
formulating 5 56, 62, 68, 74, 76 comparing 11
sample form 8 Oracle Transparent option
Rich Text Format. See RTF data processing 55 print-image processing 64
RTF files Stages Troubleshooting
accessing 66 data access 2 dBASE file-opening 32
Storage media problem data set activity 71
types 3 split multiline records 64
S Structure of file Truncation of fields
Sample considerations in selecting 6 dBASE data 31
data request form 8 Structured Query Language. See SQL
File Definition Format file 57 syntax
PL/1 copybook 63

84
Index

U
UNIX
support in ACL 13
UNIX-based data
accessing 74

V
Variable-length files. See IBM
variable-length data
VSAM data
accessing 75
category of access 19

W
Word. See Microsoft Word

X
XML data
accessing 79
category of access 17

Z
z/OS
importing SMF data 68

85
Index

86
© 2007 ACL Services Ltd.

You might also like