Page 1 of 1

checking flat bfile

Posted: Fri Jul 28, 2017 3:50 pm
by ehersh
We currently have a process of manually checking flat files for errors. We scroll all the way to the right. slowly moving down checking to see if any CRLF's are out of alignment. then if they are we fix that record. It may be a blank line, it may have a special character inserted etc. I know GOANYWHERE can read flat files and we can designate the delimiter but is there any way we can use GOANYWHERE to check a flat file and if any record delimiters are out of alignment to let us know which line that happened on? Then we can just go to that line and fix the record.

Re: checking flat bfile

Posted: Tue Sep 12, 2017 2:17 pm
by Support_Julie
The Validate Rowset task was added in version 5.4.1 and then enhanced in Version 5.5.2.

The Validate RowSet task allows you to validate the data contained in a RowSet that was generated by tasks that read the contents of a file or database (for example, SQL or Read CSV tasks). This is useful for identifying problems with data before it is used in another task, such as inserting it into a database or translating it to another file format.

The Validate RowSet task can be used to determine if the RowSet contains a minimum or maximum amount of rows in the RowSet. The task can additionally determine if the expected number of columns are present, can verify the data in the column meets specified conditions, or the data is of the correct data type and format.

In your situation, you would read the file and save to an output rowset. Then using the Validate Rowset Variable task, verify if a column has a certain value. This would be accomplished by using a substring expression. The online help for this task includes a very nice example.