BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Gieorgie
Quartz | Level 8
Sas enterprise guide sas eg im using
Reeza
Super User
Is Date in mart_credit a SAS date? Numeric with a format?
What is the name of the prompt with the date and how does it resolve? You can check it with the following:

%put &promptVariable.;

If the date is numeric with a date format and promptVariableValue looks like '01Jun2021' then your code would look like:

where date = "&promptVariable"d;
Gieorgie
Quartz | Level 8

Ok, I created a prompt where I can select a list from the hints, how to enter a macro in the Program icon that will load me the date from the prom?

Reeza
Super User
Did you look at the video or paper referenced? It has instructions on how to create a prompt and then use it in your processes.
Gieorgie
Quartz | Level 8
%let gv_dateF=%sysevalf(%bquote('&datacorep.'d));
%let gv_date_hF=%sysevalf(%bquote('&datacorep_h.'d))%let gv_dateF=%sysevalf(%bquote('&datacorep.'d));
%let gv_date_hF=%sysevalf(%bquote('&datacorep_h.'d))

I created oromt and assigned to program, but i would like load data from promt like a above code and run code which will created table

proc sql;
create table NewDef as
select
spr_NRB,
spr_DEFAULT
from kredyty
where data danych = &gv_dateF;

 

but still not working 😞

Reeza
Super User
Because as someone else said, macro variables do not resolve in single quotes. Try double quotes instead for starters.
Gieorgie
Quartz | Level 8

Thanks for everyone its working 🙂

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 22 replies
  • 2335 views
  • 2 likes
  • 3 in conversation