Page 1 of 1

Establish columns on pipe-delimited file.

Posted: Fri Jun 20, 2014 10:43 am
by wfpturner
I'm relatively new to GoAnywhere, so this may be a simple task.

I am downloading and decrypting a pipe-delimited text file (with CRLF as the row delimiter) and would like to place the contents into a DB2 file. I'm using the readFlatFile task to put the records into a rowset, but I cannot figure out how or where to tell GoAnywhere that the file is pipe-delimited so that I can assign column characteristics and move the necessary columns into the DB2 file.

My project tasks are:

Create Workspace

SFTP Task
-------Get Files
-------------Fileset

PGP Decrypt Task

Read Flat File Task

SQL Task
(for connecting to AS400)
--------Query Element (for importing data into DB2 file)

Any help or other suggestions would be appreciated.

Re: Establish columns on pipe-delimited file.

Posted: Fri Jun 20, 2014 11:01 am
by Support_Rick
Try using the ReadCSV instead of the ReadFlatFile task.

This will give you the option to change the Field Delimiter as well as the record delimiter (if necessary).

Then, you can do the insert by field into your DB2 Table using the Rowset Variable created from the ReadCSV Task.

Re: Establish columns on pipe-delimited file.

Posted: Fri Jun 20, 2014 11:09 am
by wfpturner
Thanks, Rick. That's exactly what I was looking for.