cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter based XSJS jobs

shyam_uthaman
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

lucas_oliveira
Advisor
Advisor
0 Kudos

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

shyam_uthaman
Participant
0 Kudos

Hi Lucus,

Thanks for the reply. I haven't tried anything yet as the solution is still in design.

Since I am new to XSJS, I have lots of gaps in understanding of it's capabilities.

Your reply surely helps. Thanks a lot for that.

Regards,

Shyam

Answers (0)