Hi All,
I am extracting files for a directory using a file pattern using sequential file. I need to perform audit check as well for all the files. Each file has record count as a part of its name. Ex. test1.R3000. This test1 file has 3000 records. I need to abort the job if the record count fail. As iam extracting using file pattern how can I reject the file that does not pass the audit check and extract remaining files.
Thanks in advance
Record Count
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
You can do a
and compare the line counts
Code: Select all
wc -l yourFilePattern
When does this 'abort' need to happen? Any check like that can be made well before it ever hits a DataStage job, if that's what you need. Or you could count it first, pass that count to the job and have it validate that count as part of its processing... usually involving an Aggregator doing the counting.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers