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

How can I automatically read this file

http://www.nanpa.com/nanp1/allutlzd.zip

in SAS?

 

the code below is not working !

 

filename allstate url "http://www.nanpa.com/nanp1/allutlzd.zip" ;

data urlall;

LENGTH

State $ 2

'NPA-NXX'n $ 7

OCN $ 4

Company $ 50

RateCenter $ 10

EffectiveDate 8

Use $ 2

AssignDate 8

'Initial/Growth'n $ 1

'Pooled Code File Updated 04/06/2'n $ 1 ;

LABEL

'Pooled Code File Updated 04/06/2'n = "Pooled Code File Updated 04/06/2017" ;

FORMAT

State $CHAR2.

'NPA-NXX'n $CHAR7.

OCN $CHAR4.

Company $CHAR50.

RateCenter $CHAR10.

EffectiveDate MMDDYY10.

Use $CHAR2.

AssignDate MMDDYY10.

'Initial/Growth'n $CHAR1.

'Pooled Code File Updated 04/06/2'n $CHAR1. ;

INFORMAT

State $CHAR2.

'NPA-NXX'n $CHAR7.

OCN $CHAR4.

Company $CHAR50.

RateCenter $CHAR10.

EffectiveDate MMDDYY10.

Use $CHAR2.

AssignDate MMDDYY10.

'Initial/Growth'n $CHAR1.

'Pooled Code File Updated 04/06/2'n $CHAR1. ;

INFILE allstate MISSOVER DLM=' ' DSD FIRSTOBS=2 ;

INPUT

State : $CHAR2.

'NPA-NXX'n : $CHAR7.

OCN : $CHAR4.

Company : $CHAR50.

RateCenter : $CHAR10.

EffectiveDate : ?? MMDDYY10.

Use : $CHAR2.

AssignDate : ?? MMDDYY10.

'Initial/Growth'n : $CHAR1.

'Pooled Code File Updated 04/06/2'n : $CHAR1. ;

 

 

run;

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

Include a call to proc http! Here is blog from @Chris describing the method: http://blogs.sas.com/content/sasdummy/2014/01/29/using-filename-zip/

 

Art, CEO, AnalystFinder.com

 

View solution in original post

2 REPLIES 2
art297
Opal | Level 21

Include a call to proc http! Here is blog from @Chris describing the method: http://blogs.sas.com/content/sasdummy/2014/01/29/using-filename-zip/

 

Art, CEO, AnalystFinder.com

 

MikeAAC
Calcite | Level 5

It works.

Ty Art.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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