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

Hi,

I am having difficulty properly importing this file into SAS. http://www.dougstats.com/12-13RD.txt

I would like to be able to write a code that imports it directly from the web. Let me know if you can help!

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Use URL Access method (and change variable 3m and 3a to v3m and v3a) :

filename ex URL "http://www.dougstats.com/12-13RD.txt";

data test;
infile ex firstobs=2;
length player $16;
input Player $ Team $ PS $ GP Min FGM FGA V3M V3A FTM FTA OR TR AS ST TO BK PF DQ PTS TC EJ FF Sta;
run;

PG

PG

View solution in original post

3 REPLIES 3
Reeza
Super User

Here's how to read it from the web.

But my syntax doesn't work either and I don't want to debug Smiley Sad

I'm sure someone else will help though...

filename foo url

    'http://www.dougstats.com/12-13RD.txt';

     

data test;

   infile foo length=len firstobs=2;

   input Player $8.  Team $3. PS $2. GP  Min  FGM  FGA  3M  3A FTM  FTA  OR   TR   AS  ST  TO  BK  PF  DQ   PTS  TC  EJ  FF ;

run;

PGStats
Opal | Level 21

Use URL Access method (and change variable 3m and 3a to v3m and v3a) :

filename ex URL "http://www.dougstats.com/12-13RD.txt";

data test;
infile ex firstobs=2;
length player $16;
input Player $ Team $ PS $ GP Min FGM FGA V3M V3A FTM FTA OR TR AS ST TO BK PF DQ PTS TC EJ FF Sta;
run;

PG

PG
yn623
Calcite | Level 5

Thanks!

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!

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.

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
  • 3 replies
  • 531 views
  • 3 likes
  • 3 in conversation