Skip to Content

Parameter based XSJS jobs

HI All,

I want to create an XSJS job that does the following:

select A, B, C from <schema_name>.Table1 .. and some more calculations.

Table1 exists in 4 different schemas since we have 4 different ECCs.

I need to run this same XSJOB with the same calculation for all 4 source systems.

Problem is that those 4 runs will happen at different times of the day and hence I need the <schema_name> to be dynamic.

When the job is executed, it should be possible to pass it as a parameter so that the code runs for that schema.

Please let me know your thoughts on this.

Thanks,

Shyam

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 24, 2015 at 10:19 PM

    Hi Shyam,

    Well you could certainly use xsjob scheduling and call an xsjs script with the schema name as parameter. The xsjs would then either crea and execute the call with the schema name passed by the xsjob or you could even call procedure with dynamic SQL execution. Last option does not seem to be necessary but it's another option for sure.

    Not too sure about your requirements, but that seems pretty straightforward to implement.

    What's missing? What have you tried so far?

    BRs,

    Lucas de Oliveira

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.