30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

them on to the to-file. The system then deletes the temporary file when the<br />

copy function from the temporary file to the database or DDM files completes.<br />

Parallel data loader support to use with the CPYFRMIMPF<br />

command<br />

The Copy From Import <strong>File</strong> (CPYFRMIMPF) supports copying the data in parallel<br />

from an import file to a to-file using multiple jobs during the copy. This allows<br />

you to copy data files from other platforms into a to-file quickly and easily. This is<br />

especially useful for those who use data warehousing. To use multiple jobs, your<br />

system must have the Symmetric Multiprocessing Product (SMP).<br />

The number of jobs you use during the copy is determined by the<br />

DEGREE(*NBRTASKS) parameter of the Change Query Attributes (CHGQRYA)<br />

command. If the from-file has less than 50,000 records, only one job will be used<br />

regardless of the *NBRTASKS value.<br />

The CPYFRMIMPF command (with the parallel data loader support) essentially<br />

breaks the import file into smaller portions or blocks. Each of these smaller<br />

portions is submitted in parallel, so the entire file processes at the same time. (This<br />

eliminates the latency of sequential processing.)<br />

To maintain the same relative record numbers of the from-file in the to-file, use<br />

only one job for the copy. Specify DEGREE(*NONE).<br />

Handling data from the import file<br />

The Copy From Import <strong>File</strong> (CPYFRMIMPF) reads data from an import file and<br />

copies the data to a to-file. The data of the import file can be formatted by<br />

delimiters or in a fixed format.<br />

A “Delimited import file” has a series of characters (delimiters) that define where<br />

fields begin and end. The parameters of the command define which characters are<br />

used for delimiters.<br />

A “Fixed formatted import file” on page 145 requires the user to define a Field<br />

Definition <strong>File</strong> that defines the format of the import file. The Field Definition <strong>File</strong><br />

defines where fields begin, end, and are null.<br />

Delimited import file<br />

The following characters and data types interpret the import file’s data for a<br />

delimited import file:<br />

Blanks<br />

Blanks are treated in the following ways:<br />

v All leading and trailing blanks are discarded for character fields unless<br />

enclosed by string delimiters.<br />

v A field of all blanks is interpreted as a null field for character data.<br />

v You cannot embed blanks within numeric fields.<br />

v You cannot select a blank as a delimiter.<br />

Null Fields<br />

A null field is defined as:<br />

Chapter 4. Copying files 143

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!