Questions tagged [macro-variable]

5 questions
0
votes
0 answers

Proc SQL Select Into not working as I would like

One (I hope simple) question: why does the following code DATA DIZIONARIO; INFILE DATALINES DELIMITER=" "; INPUT ENTRY $ TRADUZIONE $; DATALINES; 0 K 1 5 2 L 3 9 4 G 5 3 6 Y 7 0 8 U 9 X ; RUN; %MACRO CODIFICA (VARIABILE); PROC…
0
votes
1 answer

SAS set the 'middle' parameter of intnx to always set to the 15th

I have the following SAS codes: DATA _NULL_; today = today(); if day(today) ge 1 and day(today) le 15 then do; date2=put(intnx('month',today,-1,'m'), date11.); date1=put(intnx('month',today,-1,'E'), date11.); end; if…
budding pro
  • 135
  • 1
  • 2
  • 10
0
votes
2 answers

How to create multiple macro variables using a loop in SAS Enterprise Guide?

I am constantly using SAS datasets in SAS EG to create macro variables that can be used as variables in a query from SAS EG to my internal servers. There is a character limit of 65,534 for a macro variable. When I need to get 100k ids that are 9 to…
0
votes
1 answer

How to create a macro variable from a list of date in a table SAS

I have a work table named WORK.WEEK_YEAR_FESTIVITA with two records with dates 08dec2022 and 09dec2022 in the field "HolidayDate" and I would to convert this list in a macro variable like "Elenco_Date = '08dec2022'd,'09dec2022'd" and so on for other…
0
votes
2 answers

Macro variable (date) not working as expected in query

I've several SAS (PROC SQL) queries using a MIN(startdate) and MAX(enddate). To avoid having to calculate these every time I want to do this once at the beginning and store it in a macro variable but I get an error every time. What is going wrong or…
John Doe
  • 9,843
  • 13
  • 42
  • 73