Hello,
Why there is nothing for table stack_monthly? Anything wrong with the macro? I attached part of the data for chargedisb. Please help, thanks!
%macro pull(stack, where);
PROC SQL;
CREATE TABLE &stack. AS
SELECT
*
FROM
chargedisb
&WHERE.
%mend;
%pull(stack_monthly, where month3 ='January' );
%pull(stack_ytd, where month3 is not null );
Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.
The instructions here will allow you to create data step code that you can paste to the forume or attach as a TEXT file to create a data set we can test code against: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
A very likely cause is that you are missing a ; to end the create table statement and missing quit; to end the Proc Sql
Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.
The instructions here will allow you to create data step code that you can paste to the forume or attach as a TEXT file to create a data set we can test code against: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...
A very likely cause is that you are missing a ; to end the create table statement and missing quit; to end the Proc Sql
Assuming you fix the errors already pointed out ...
It looks like your month values are centered. The actual value would never be "January" because there would be leading blanks. In SAS, "January" and " January" are different.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.