Page 1 of 1

2 sequence daily job call a monthly job?

Posted: Wed Mar 30, 2005 1:35 am
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

Posted: Wed Mar 30, 2005 2:13 am
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)

Posted: Wed Mar 30, 2005 9:35 pm
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

Posted: Wed Mar 30, 2005 10:19 pm
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.

Posted: Thu Mar 31, 2005 2:41 am
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.

Posted: Thu Mar 31, 2005 4:42 am
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

Posted: Thu Mar 31, 2005 4:52 am
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,

Posted: Thu Mar 31, 2005 7:48 am
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.