BookmarkSubscribeRSS Feed
niespolo
Obsidian | Level 7

Hi,

I need to develop a SAS Data integration Studio job (call it myjob) that runs some jobs in parallel.

When I drag and drop a jobs (call them job1, job2, etc.) in myjob, the tool automatically create an execution order between job1 and job2.
So I cannot avoid an execution order and forced to run the job in a sequential order.
But I would run the jobs in parallel, or run some tasks in parallel. How can I do it?

Thanks.

6 REPLIES 6
LinusH
Tourmaline | Level 20

Basically, i defer from using DI Studio's job-in-job functionality unless I want to build parametrized loop jobs.

I think that defining isolated (non-iterative/parametrized) job sequences is best done in your scheduling tool/software (for some like cron/WinTask and LSF) can be defined even in SAS Management Console.

On drawback I see to use job-in-job is the lengthy logs, hard to monitor etc.

 

That said, there is a Fork transformation that might work for this (haven't tried it with jobs, only "normal" transformations).

Data never sleeps
LinusH
Tourmaline | Level 20

Edit: just tested the Fork, and it seem you can not map jobs to it, only other transformations.

So I guess my first recommendation is still the most viable...

Data never sleeps
niespolo
Obsidian | Level 7

I've created a loop transformation. The job included in the loop uses an Execute Transform, that should call an Oracle stored procedure for each parameter values. Actually, the user written code of this transform is:

 

proc sql;

connect to oracle (user=DWH
                   password=<password>
                   path=GEC);

execute(execute myproc('CLIENTE', 11)) by oracle;

disconnect from oracle;

quit;

i would sobstitute the 11 value with a parameter but SAS doesn't recognize the syntax of the parameter, because "11" is in the Oracle code statement.

 

LinusH
Tourmaline | Level 20

This sounds like a slightly different question, and it's best practice to create a new thread, that would make the issue and its potential solution easier to find.

 

That said, what have you tried?

I think a simple macro variable (parameter) evaluation would work.

Data never sleeps
niespolo
Obsidian | Level 7

Before correcting the question in my last post, I've commented the user code in the Execute Transform.

 

I've tried to create the job_test:

job_test.png

But the loop runs for 2-3 minutes and ends in error.

 

The job cliente_NETAS_test ends without errors when Loop and Loop End are disabled.

 

The parameter details follow:

 

cliente_NETAS_test.png

loop.png

niespolo
Obsidian | Level 7

The errors after runing the job is:

 

job_test.png

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1485 views
  • 0 likes
  • 2 in conversation