0
votes

I have got a variable &OldCount in SAS Enterprise Guide and I am trying to create a new dataset called Count1 which has one Column Called VarName and a second column Called ColumnCount. I want to create a row where VarName = "OldCountTotal" and ColumnCount = The value of Oldcount (let's say 56).

How do I do this linking the Column Count value to the macro variable created?

enter image description here

Thanks in advance for helping me.

1

1 Answers

0
votes

If I understand you correctly, you would do the following (generating just a single-row dataset):

data Count1;
    VarName = 'OldCountTotal';
    ColumnCount = &OldCount.;
    output;
run; 

I assume your variable is defined earlier in the program, something like this:

%let OldCount = 56;