BookmarkSubscribeRSS Feed
podarum
Quartz | Level 8

I received a code from an outside source and can't get in my own format:  I got (HAVE) and I want it to look like (WANT):

HAVE:

data temp1;

infile cards dlm=',' missover

;

input

COL1

COL2

COL3

COL4

COL5;

rename

COL1=Ref_Date;

rename

COL2=GEO;

rename

COL3=AREA;

rename

COL4=STR;

rename

COL5=Value;

datalines

;

199001,"Canada","All areas","Residential (x 1000)",2400224

199602,"Newfoundland and Labrador","All areas","Residential (x 1,000)",16567

run;

WANT it cleaned up, you  know what I mean once you run it.  Thanks.. Also I don't know why I can't just insert the sas code neatly in this post..

2 REPLIES 2
art297
Opal | Level 21

data temp1;

  infile cards dsd dlm=',' missover;

  informat GEO area str $20.;

  input Ref_Date GEO AREA STR Value;

  datalines;

199001,"Canada","All areas","Residential (x 1000)",2400224

199602,"Newfoundland and Labrador","All areas","Residential (x 1,000)",16567

;

podarum
Quartz | Level 8

Thanks art, I knew I can count on you

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 681 views
  • 0 likes
  • 2 in conversation