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.

The parameters of the command define which characters are used for delimiters. A<br />

fixed format import file uses a fixed format. For more information on this, see<br />

“Copying data to the import file in a fixed format (CPYTOIMPF command)” on<br />

page 148.<br />

The data in the from-file is read from the formatted database file and written to<br />

the import file with the parameters from the command.<br />

The from-file can be any of these:<br />

v A source physical file<br />

v A program described physical file<br />

v A distributed physical file<br />

v A single format logical file<br />

v An externally described physical file<br />

The to-file can be any of these:<br />

v a stream file<br />

v a source physical file<br />

v a program described physical file<br />

v a distributed physical file with one non-numeric field<br />

v an externally described physical file with one non-numeric field<br />

Notes on the delimited import file (CPYTOIMPF command)<br />

Null Fields<br />

If a field is null, the field contains two adjacent field delimiters (no data in<br />

between).<br />

Delimiters<br />

v A delimiter cannot be a blank.<br />

v A period cannot be a character string delimiter.<br />

v A string delimiter cannot be the same as a field or record delimiter.<br />

v A field and record delimiter can be the same character.<br />

v The defaults for delimiters are as follows:<br />

– String is: ″ Double quote.<br />

– Field is: , Comma.<br />

– Decimal point is: . Period.<br />

– Record is: *EOR End of record.<br />

Numeric Fields<br />

Decimal points are either a period or a comma (command option).<br />

Graphic Fields<br />

The string delimiter is placed around all graphic data. If graphic data is<br />

contained in the file and the string delimiter is the *NONE value, an error<br />

is signaled.<br />

All Fields<br />

The CAST function in SQL copies the data from the from-file to the to-file.<br />

All data is copied and the relative record numbers of the from-file and<br />

to-file are the same, unless the from-file contains deleted records. Deleted<br />

records are not copied.<br />

CCSIDs<br />

The data from the from-file is read into the to-file’s CCSID.<br />

Chapter 4. Copying files 147

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

Saved successfully!

Ooh no, something went wrong!