Validation and Row Counts

I need help validating rows. 1st. I have a sequential file that has 139 rows, 2 columns (TABLENAME, CLOB). Of those rows, two (in TABLENAME column) are named "HEADER" and "TRAILER". I do not want these in my output. How do I keep the 137 rows and cut off the HEADER & TRAILER. 2nd. In the TRAILER row (TABLENAME column), there is a number that reads 00000000137 (in the CLOB column), which is the 137 rows I need. With each file that comes in, the TRAILER will change, as will the rows. That number in the TRAILER must always match the rows. How would I code that?

Questions by sdeuces90

Showing Answers 1 - 2 of 2 Answers


  • Nov 17th, 2015

One thing is not clear from you question i.e. the record count will be written on 138th record I think. As part of sequential stage ignore the 1st line as header. Use a shell script to get the record count and deduct 2. that count need to be funnel to the records in the csv file. You have to use a sequence. 1st get the record count and then call the job where it will records and merge with record count. Also to merge the record count at last a dummy column to be used for sorting purpose.

  Was this answer useful?  Yes

Mahesh R

  • Nov 18th, 2015

You can use constraints facility in transformer stage, to cut-off rows with HEADER and TRAILER. If you mention the column name with IN condition the rows will get dropped off.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions