BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Rafa0001
Calcite | Level 5

I'm trying to create

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

That is not what dataset would generally look like. A data set consists of variables and values,

So it might be:

 

Old   New

1      0

1      0

1      1

1      1

0      1

 

 What type of operation are you going to do with the resulting data set?

 

View solution in original post

3 REPLIES 3
ballardw
Super User

Are you saying that currently you have a text document that you need to create data from?

I would expect 'Good' and 'Bad' to be LEVELS of the Variables Old and New (or OldClaim and NewClaim) or such.

 

Can you provide a few rows of what you might want this to actually look like.

 

Here's a guess of one way:


data want;
  do i=1 to 243;
    old= 0;
    new= 0;
    output;
  end;
  do i=1 to 49;
    old= 0;
    new= 1;
    output;
  end;
  do i=1 to 71;
    old= 1;
    new= 0;
    output;
  end;
  do i=1 to 40;
    old= 1;
    new= 1;
    output;
  end;
  drop i;
run;

   
   
Rafa0001
Calcite | Level 5

Hi

 

I've attached the table.

ballardw
Super User

That is not what dataset would generally look like. A data set consists of variables and values,

So it might be:

 

Old   New

1      0

1      0

1      1

1      1

0      1

 

 What type of operation are you going to do with the resulting data set?

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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