Hi All,
I have a requirement where i need to pass date parameter.
for ex: Date parameter '07/15/2013'
table1 have below columns
field1,
field2,
field3,
field4,
-
-
field14
and i have two jobs
job 1: extracts field 1 to field 10 from table 1 to target file
job 2 : extracts field 5 to field 14 from table 1 to target file
if date falls in (1-5) then pick job 1 else if the date falls above 5 then pick job2. In the example the date is 15 so i need to pick job 2.
Any ideas will be appreciated.
Thanks
Need to use date to run certain jobs in a Sequence
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hi Ray,
This is the trigger condition i am using in sequence under job activity.
for ex: 07-16-2013 is the date parameter and its not between (02,05) dates so it has to pick the job2
if (evdate[4,2] <='02' and evdate[4,2] <= '05') then job1.$JobName else job2.$JobName
sequence is getting aborted.
Not sure where i am going wrong.
Thanks
Raji
This is the trigger condition i am using in sequence under job activity.
for ex: 07-16-2013 is the date parameter and its not between (02,05) dates so it has to pick the job2
if (evdate[4,2] <='02' and evdate[4,2] <= '05') then job1.$JobName else job2.$JobName
sequence is getting aborted.
Not sure where i am going wrong.
Thanks
Raji
You can't do "assignments" in trigger expressions. An trigger expression evaluates to TRUE or FALSE so use two triggers to two different Job Activity stages, one for each job with the proper range check in them:
Job1: evdate[4,2] >='02' and evdate[4,2] <= '05
Job2: evdate[4,2] < '02' or evdate[4,2] > '05
An 'Otherwise' trigger would work just as well for the second one.
Job1: evdate[4,2] >='02' and evdate[4,2] <= '05
Job2: evdate[4,2] < '02' or evdate[4,2] > '05
An 'Otherwise' trigger would work just as well for the second one.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Thanks Chulett.
Sequence is working fine. but if i pass '07-03-2013' how ever i change data parameter it is just running one job not the other one.
i am using data parametr evdate as string in properties.
below is my job design
nestedcondition activity------------------job1
!
!--------------------job2
in first condition i have provided evdate[4,2] >='02' and evdate[4,2] <= '05 otherwise for job2 in nested activity.
Sequence is working fine. but if i pass '07-03-2013' how ever i change data parameter it is just running one job not the other one.
i am using data parametr evdate as string in properties.
below is my job design
nestedcondition activity------------------job1
!
!--------------------job2
in first condition i have provided evdate[4,2] >='02' and evdate[4,2] <= '05 otherwise for job2 in nested activity.
If "evdate" is a job parameter in the Sequence job then you may need to encase it in hash marks '#' so it knows that.
See if that helps at all.
Code: Select all
#evdate#[4,2] >= '02' and #evdate#[4,2] <= '05'
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact: