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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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