BookmarkSubscribeRSS Feed
buechler66
Barite | Level 11

Hi.  I'm wondering if you have suggestions for ways to monitor the progress of a Rsubmit SAS Connect Program. Once I submit my program all I see is:

 

NOTE: Remote submit to ISASPROD commencing.

 

A good deal of my program is a looping macro that creates a dataset named QueryData and appends it to FinalData. This looping can happen up to 100+ times.  Depending on server resources my program can take anywhere from 20 minutes or 8+ hours.  I'd like to be able to check in and see how far along the program is.  Any suggestions?

2 REPLIES 2
LinusH
Tourmaline | Level 20

One idea if you have necessary rights is to create a file with the current loop counter.

 

Also, with a job taking up to 8 hours, I would suspect that is a candidate for overnight scheduling.

And, I'm also suspect that you could optimize this job quite a lot. 100+ looping often can be rewritten in a more efficient way (generally speaking, not knowing about your specifics of course).

Data never sleeps
buechler66
Barite | Level 11

Hmm..how can I write out a filename?  Maybe I could write a filename and append on the &rule_order somehow.  Like QueryData_&rule_order perhaps?

Yah, each iteration is a Rule loop. And each record can only be flagged with the first rule's criteria it meets. And the rules are run in order of precedence from 1 to 100+. So if a record qualifies for Rule 1 then it cannot also qualify for Rule 2 on.

 

* RULE QUERIES. Build and execute rule queries based on the rules defined in QueryRules (one at a time looping) ;
%macro BuildQueryData(analysis_desc= , rule= , rule_order= );

	proc sql;
	create table QueryData as 
	(       select DISTINCT %str(%')&analysis_desc.%str(%') as RULE_NM length = 58, 
			b.actual_dlvry_date as AD_DT, 
			b.imb_code length = 31, 
			&rule_order as RULE_ORDER,
			b.spm_calc_batch_date
            from iv_ora.bi_spm_piece_recon a,  bids_ora.bi_spm_piece_recon b                                                                                                                                                                                                                                                                                                                                                                                                                                                   
            where a.spm_calc_batch_date = b.spm_calc_batch_date
              and a.imb_code = b.imb_code
            and &rule
	); 
	quit;

	* Append datasets to final dataset ;
	proc append base=FinalData data=QueryData force;
	run;

	* Create unique index (if not exist), to meet the criteria that only one record (imb) per ;
	* rule is kept and counted in the data ;
	data _null_;
		set sashelp.vmember (where=(Libname='WORK' and memname='FINALDATA'));
		if upcase(index) = 'NO' then call execute('%CreateUniqueIndex');
	RUN;

%mend BuildQueryData;

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 831 views
  • 0 likes
  • 2 in conversation