2 sequence daily job call a monthly job?

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
gwen
Participant
Posts: 16
Joined: Fri Mar 11, 2005 4:16 am

2 sequence daily job call a monthly job?

Post by gwen »

Hello~

did anyone do this kind of job control before?
I have 2 sequence daily jobs should be followed by a monthly job which is executed only when the first 2 sequence daily jobs finished and the last day of the month.I tried to figure out some solutions but seemed not easy to be done. Please give me some comment to the best solution.

1. put two sequence daily jobs and the monthly job to one sequence job but how to control the monthly job only executed on the last day of month.

2.find the last executeable server job in one of the sequence jobs and edit its job control to execute a monthly job but it might be wrong if the other sequence daily job doesn't finish yet.

Gwen
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a job sequence that runs every day. It runs the two daily sequences using Job Activities.
The OK triggers from these run through an All Sequencer to a Nested Condition or Routine activity that determines whether it's the last day of the month, and this may or may not trigger the end of month processing.
A suitable routine is:

Code: Select all

FUNCTION IsLastDayOfMonth(DateOfToday)

* Ignores argument, and uses system variable for today's date.
* Returns 0 if today is last day of month, returns 1 otherwise.
* It determines this by checking whether tomorrow's day number is 1.

Today = @DATE                         ; * this is in DataStage internal format
Tomorrow = Today + 1                  ; * this is also in DataStage internal format
TomorrowDay = Oconv(Tomorrow, "DD")   ; * the day number

Ans = Not(TomorrowDay = 1)

RETURN(Ans)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gwen
Participant
Posts: 16
Joined: Fri Mar 11, 2005 4:16 am

Post by gwen »

Thank you! Ray~

I tried your suggestion but when I opened Nested Condtion and Routine Activities to edit them which made my DataStage Desinger crashed. Even worst I can't open and edit the properties of any stage in this job sequece.I have never used Nested Condtion or Routine Activities before ,is any configuration missed for me to turn on these functions?Or any other solution to avoid using these Stages.

Gwen
davidnemirovsky
Participant
Posts: 85
Joined: Fri Jun 04, 2004 2:30 am
Location: Melbourne, Australia
Contact:

Post by davidnemirovsky »

I think if you start trying NOT to use Nested Condtion or Routine Activity stages in a sequence job you might be limiting yourself a little...

If you client is crashing it sounds to me like your client installtion may be corrupt or you are on a pc with low memory/disk space.
Cheers,
Dave Nemirovsky
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'd have to agree with David. These activities aren't too heavy on memory consumption so, unless you have a really minimally configured client, I'd try uninstalling and re-installing DataStage client. All your work is saved on the server, so you won't lose any of that, though you may lose some customised preferences.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gwen
Participant
Posts: 16
Joined: Fri Mar 11, 2005 4:16 am

Post by gwen »

:?
I found the reason which might cause my designer crashed. I upgraded my client machine to Windows XP SP2 and compared to other client machines stayed on SP1 the desinger works nornmal on them. Is there any patch for windows XP SP2 that will fix this kind of problem?

Gwen
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
I know there is some firewall configurations but not sure they apply to clients, then again I never had to try it.
you can download the doc from the ADN on Ascential's site

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

gwen wrote:Is there any patch for windows XP SP2 that will fix this kind of problem?
Yes, there is! You can download it from Ascential's eServices website.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply