BookmarkSubscribeRSS Feed
onyeajam
Calcite | Level 5
Thanks @PaigeMiller
I did that and the program wont stop running. It was running for 20 minutes with nothing happening, so I KILLED IT
PaigeMiller
Diamond | Level 26

SHOW US the actual code you are using. Just saying it didn't work tells us nothing. Also, how do you know this is a problem with the code? It could be that the TERADATA server is taking 20 minutes or more to do the extract.

--
Paige Miller
Kurt_Bremser
Super User

Just 20 minutes? On your patience to work you need, young Padawan.

 

Seriously, check what is to be expected with that SELECT out of your database. Have a DBA run it with a simple count to see how many records/observations you will get. Multiply that with the observation size, and you will have an idea how much data you will move across the network.

Tom
Super User Tom
Super User

@onyeajam wrote:
@Tom
I went back to original code and change the call to use a quoted string instead of a date literal . That does not work too. Endless running of the program
and t1.bene_fct_efctv_dt between input(&start_dt.,date9.) and input(&end_dt.,date9.)
and t1.BENE_FCT_OBSLT_DT >=input(&start_dt.,date9.);
QUIT;
%mend zip5;
%zip5 ("01JAN2019", "31DEC2019");

So you have solved this issue and are now on to a new issue.  Please open a new thread to talk about how to optimize queries using remote databases.  Here is a suggestion to try : It looks like you are joining two tables in your remote database so just use explicit passthru SQL to run the query on the database instead.  In that case you will want to replace the hardcoded date values with values that work with the SQL dialect used by that database.

onyeajam
Calcite | Level 5

Its an endless running of the program after i removed the input statment in offeding lines. Thus I had to kill the program. 

 

and t1.bene_fct_efctv_dt between &start_dt. and &end_dt.

      and t1.BENE_FCT_OBSLT_DT >= &start_dt.;

QUIT;

%mend zip5;

%zip5 ("01JAN2019"d, "15JAN2019"d);

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 20 replies
  • 3016 views
  • 0 likes
  • 4 in conversation