Page 1 of 1

How to pass year and month fro ma sequencer to the job

Posted: Thu Sep 27, 2012 9:25 am
by venkata pradeep
Hi,

I have a requierment like i am extarcting the data from a query using teradata stage and in that for automation i need to pass year and month to the query.

The year and month should be pass from the sequencer becuase it will take the values when ever we run the seq and pass it to the job inside.


Please suggest ...?

Rd,
pradeep.

Posted: Thu Sep 27, 2012 9:27 am
by ArndW
I suggest using DataStage job parameters for this.

Posted: Thu Sep 27, 2012 11:12 am
by ankursaxena.2003
Extract Date -----> Read file -------> Extract Query

Above the structure of the Job Sequence.
First you Extract the Date and write on to a file.

In the next stage you read the file using cat command in Execute command(ExecCommand).

And in the Extract Job write the below code in Value Expression in Job Activity.

Field(Convert(@FM, "", ExecCommand.$CommandOutput),',',1)

Posted: Thu Sep 27, 2012 11:30 am
by chulett
Note that there would be no need for the "extract date - write/read file" steps if you're just talking the current year / month. A routine could easily return them.

Posted: Thu Sep 27, 2012 12:28 pm
by bhasds
Hi Venkata,

If you need to pass current year and month from sequence as a parameter then you can use Oconv function in the expression grid of the Job activity.

Code: Select all

Oconv(Date(),"DYM[4,2]")