conditional import?

R

r

I am creating a program that will automatically import data, manipulate it,
then delete it. Currently the import is done via macros and the transfer
text action (using a preset spec) and delimited data. I was able to simply
import all the data into various fields, though there were about six
different record types -- I could pull them apart with queries easily.

The challenge: My client has recently asked for a modification because the
input data layout has changed. The new data is fixed width, still
containing six different record types. So record-type 1 has a different
layout than record type 2, and because the data is fixed width, I can no
longer cleanly pull all the data into their respective fields.

Is there a way to say (easily!) "import any data with 1 in the first
position using this spec", then "import any data with 2 in the first
position using some other spec"?

I want to keep this as simple as possible. If I can't find an easy
workaround, I'll just use string functions in queries to pull the data from
the various positions ... but I'm not sure how fun that will be. *sigh*

I'm certain this file layout concept is fairly common, so I'm hoping there
is an equally common way to deal with it!

Thanks for any tips!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top