zero byte file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

zero byte file

Post by dodda »

hello

I have a datastage job which processes the file stocks.dat. i can expect the size of the file to be of zero bytes some times. In the cases datastage process the file stocks.dat with success with zero records imported and i produce a out put file with zero bytes. My problem is i want the datastage job to abort if it finds a file of zero bytes and i want to include that piece of code in shell script which is already existing.

can any body throw some light on how to make datastage job to abort if it finds a zero byte input file through shell script.

Regards
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

There's lots of ways. Count the file first and deal with it, maybe as a before-job routine. Another way is an after-job link count evaluation in a routine. Another way is thru a controlling jobstream process such as a Sequence, Batch, or command-line shell script which checks the input file.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply