BookmarkSubscribeRSS Feed
Quentin
Super User

@ecofred Did you hear anything interesting from tech support?

ecofred
Fluorite | Level 6

Dear Tom, 

 

Yes I do have a practical need, but i'm also curious because it does not fit in my current model of how DOSUBL (and RUN_FILE) works.

 

I have a list of output names in a dataset, each output is associated to a file. Each files produce 3 things: a dataset, a ods document object, a pdf (replay).

 

With a DATA STEP, I visit the dataset, infer the path to each output files, give it to dosubl/%include, check that the files where produce and create new variable to report the success/failure for the production of each outputs.

 

An other step is to let run a QC program. this gives 'only' a dataset for each output. I can then dosubl or run_macro to capture the &SYSINFO. value of the proc compare.

 

Compared to the call execute, I get better encapsulation/local properties for my processes and can streamline the success/failure directly to the PDV (did I mentionned how gorgious i find the DOSUBL/RUN_* function?). all in one path.

 

With call execute I have to insert the progresses to another dataset, open it many times and take the risk of having some concurrency issues.

From experience I find DOSUBL more reliable than CALL EXECUTE,

Title 'DOSUBL = reliable';
data zz;
	rc=dosubl("proc contents data=sashelp.cars short; run';");
	output;
	rc=dosubl("proc contents data=sashelp.airline short; run;");
	output;
run;

Title 'CALL EXECUTE leak: AIRLINE missing!';
data zz;
	call execute("proc contents data=sashelp.cars short; run';");
	call execute("proc contents data=sashelp.airline short; run;");
run;

Please let this code illustrate my point:. a typo is placed in the form of *run';* in the 2 datasteps. luckily for CALL EXECUTE, the 2nd instruction is not mission critical... (did I mentionned that I can not trust the output programs).

 

So technically, this dosubl/proc document issue is the last challenge in an attempt of abstracting the full processes line (output generation + Quality check) in what I would define as a reliable and metadata-driven and BASE SAS only solution.

 

Now, in a sane world, I would refactor more than one part and make it work, but I'm not living in a sane world, and I can not touch programs generating the outputs.(lack of time and QC issue are the 2 main reasons).

 

I currently have a call execute as a 2d pass to correct the outputs, (following the 'first make it work' principle 🙂 ). But it seems so close,..

 

Regards,

Frederic

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 16 replies
  • 3882 views
  • 0 likes
  • 4 in conversation