Page 1 of 1

Partial read of sequential file

Posted: Mon Apr 16, 2007 11:37 pm
by takyn
I have a requirement to read a number of files that much the following format:

TYPE, DESCRIPTION, col1, col2, col3, ... coln

note: each record in the sequential file is terminated by a Unix newline.


I am trying to create a job that will read all the files at once (using file pattern), but only read in the first two columns, as the data will vary between files.


If I try to read an individual file using a DS Server job, this works a treat - however I don't have the option of picking up files based on a file mask.

In DS Parallel, I can't seem to read in the files (whether referenced individually, or using a mask). The output returns 0 rows.

any thoughts?

-David

Posted: Mon Apr 16, 2007 11:59 pm
by takyn
Played around with settings.

Used:
Final delimiter = none (or just delete this option)
Record Delimiter = UNIX newline
Delimiter = comma
Quote = double

Also set APT_IMPORT_PATTERN_USES_FILESET=TRUE to get the filenames out.

-Dave

Posted: Tue Apr 17, 2007 1:48 am
by ray.wurlod
You must read every byte in a sequential file to get to the next byte. Therefore you must read every field. But, if you look carefully, you will find that each column as a "Drop On Import" property - you could set this property for all except the two fields you want to read.