Dynamic Parameter

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
reddy
Premium Member
Premium Member
Posts: 168
Joined: Tue Dec 07, 2004 12:54 pm

Dynamic Parameter

Post by reddy »

Hi Guys,

My requirement is like this:

We are using partitioned (year) and subpartitioned(month) oracle target table.we are going to refresh this table daily 4,5 times so as per requirement i have to truncate the subpartitioned (current month )and then load the data in that subpartition.

Here is my rough idea:

Job 1: i am going to get month from dual table and store into a seq file (D:\ASCENTIAL\DATASTAGE\PROJECTS\HR\MONTH.TXT)
CY2006_M02

Job 2:using custom sql TRUNCATE LABOR_TEST SUB_PARTITION(#JOBPARAMETER) AND THEN INSERT INTO TARGET TABLE.

Please light on me how to pass the value in the seqfile like CY2006_M02

into TRUNCATE STATEMENT..



Thanks in advance
reddy
kwwilliams
Participant
Posts: 437
Joined: Fri Oct 21, 2005 10:00 pm

Re: Dynamic Parameter

Post by kwwilliams »

Create a routine that reads the file you created and then pass the return value to the job that you have the truncate.
Post Reply