Complex Flat File stages are used
only as source stages and cannot receive input links. As a source, they read
data from a flat file. Complex Flat File stages can have one or more output
links, and the outputs must be linked to active stages.
When
you edit a Complex Flat File stage, the Complex Flat File Stage dialog
box appears. This dialog box has two pages:
- Stage.
Displays the stage name, which can be edited. This page has up to five tabs.
The General tab is where you specify the source data
attributes. You can also type an optional description of the stage, which
appears in the generated COBOL program. The General tab
has the following fields:
- The File name field is the mainframe source file
from which data will be read.
- Generate an end-of-data
row. Select this check box to add an end-of-data indicator after the last
row is processed on each output link. The indicator is a built-in variable
called ENDOFDATA which has a value of TRUE, meaning the last row of data has
been processed. (See ENDOFDATA for more information about using this variable). In
addition, all columns are set to null.
- The DD name field is the data definition name of
the file in the JCL. It can be 1 to 8 alphanumeric characters and the first
character must be alphabetic. The default name is DDn, where n is
the internal job number. You can edit this name.
- The Access type list defines whether the
data is part of a QSAM or VSAM file. You must specify the category your data
falls into:
QSAM_SEQ_COMPLEX. QSAM file structure.
VSAM_ESDS. VSAM Entry-Sequenced Data Set file structure.
VSAM_KSDS. VSAM Key-Sequenced Data Set file structure.
If this is selected, at least one column must be defined as a Key.
VSAM_RRDS. Relative Record Data Set file structure.
- Start row. Select First
row to read the source file starting with the first row, or Row
number to start reading from a specific row number. Type a whole number
in the Row number field, which has a default value of 1. There is no
maximum.
- End row. Select Last row to
stop reading the source file after the last row, or Row number to stop
after a specific row number. Type a whole number in the Row number field,
which has a default value of 1. There is no maximum.
- Block type. Select the block type of the source file.
The default is Fixed block file, which indicates that the source file
contains fixed record lengths. Complex Flat File stages can also be used to
read variable-block files with or without OCCURS DEPENDING ON clauses.
The Columns tab is where you specify
the column definitions for the source data. See Specifying Stage Column Definitions for details about defining or loading column definitions.
The File
view tab displays specialized information about the columns in
your source file, including the COBOL PICTURE clause, the starting and ending
offsets, and the storage length of each column. You can right-click to save
the file view layout as an HTML file.
The Pre-sort tab
allows you to pre-sort your source data before passing it to the next stage
in the job design. See Pre-Sorting Data for details about creating the sort control statement.
The Options tab is available only if you have chosen
to pre-sort your source data on the Pre-sort tab. See Specifying Sort File Parameters for
details about setting these options.
- Outputs. Specifies the column definitions for the
data output links.
Click OK to close this dialog
box. Changes are saved when you save the job.