run job once otherwise exit

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
htrisakti3
Charter Member
Charter Member
Posts: 36
Joined: Thu Jun 10, 2004 11:22 pm

run job once otherwise exit

Post by htrisakti3 »

I need help to do the following:

1 job is to populate/refresh hash-files only 1x/day.

Can I have a logic that checks the recency of the hash-files, if they're > 24hrs old, open DB connection & re-create them.. otherwise just exit from the job without openning DB. this is due to slow DB performance for lookup.

cheers
HT
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You need to check this before you run the job either in a routine or in batch job. You can open the file and use STATUS command to see how old it is or use a DOS or UNIX command like DIR or ls -l.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your job that does it can emplace a flag, for example a record in a hashed file (SDKSequences would do). This record has a constant for its key, and the date as its non-key field. Look this up and proceed only if it's date is earlier than today's date.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply