After job routine - empty data source

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Juls
Participant
Posts: 51
Joined: Tue Sep 14, 2004 9:17 am

After job routine - empty data source

Post by Juls »

Hi,

I am having a problem where Job Fails and Aborts if Data source is empty. I read in one of other posts that I should run the below routine in after-job to get some more info. Since I am pretty new to DS and not too familiar with BASIC and routine execution.
Where would I place this routine to get row count as described here?


DSGetLinkInfo(DSJ.ME, "src_tbl_SW_VAL_PRODUCT","lnk_GO_TO_SORT_1",DSJ.LINKROWCOUNT)

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

Post by kcbland »

You have to write a routine that "does something". In that DS BASIC routine, do whatever you need to do: open files, look at link counts, log a message, send an email, whatever. Just getting the link count does nothing, what do you want to do about it? So, go into DS Manager, write a routine, and use it in a DS Designer job as a before/after job/transformer subroutine.
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
sonia jacob
Participant
Posts: 122
Joined: Mon Jul 05, 2004 1:33 pm
Location: MA

Post by sonia jacob »

I generally use a FOLDER stage to check for 0KB or empty file. The two input columns for the FOLDER stage are filename and record (holding the entire data of the file or just the length mentioned).
Post Reply