SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
watsoninvest
Calcite | Level 5

Hello, 

I am attempting to utilized SAS to created a code that obtain the data from the clerk directory to help make my co-workers job easier and help make it easier to inform them about this important new update regarding vital records. I review several articles and am stuck on the step involving the processing/parse the web page contents to gather the data. I have made some progress but I am not sure how to create a data steps that allows me to actually read formName, formCounty, formJobTitle, and formEMail

 

I am attempting to to pull Clerk Name, Job Title, County, and Email from this webpage: https://www.cdcatexas.com/Directory/Clerks

 

* Pull out Clerk Name, Job Title, County, and Email;

filename src temp ;
proc http
method="GET"
url="https://www.cdcatexas.com/Directory/Clerks"
out=src;
run;

/* Read the entire file and skip the blank lines */
/* the LEN indicator tells us the length of each line */

data rep;
infile src length=len lrecl=32767;
input line $varying32767. len;
line = strip(line);
if len>0;
run;


 

 

1 ACCEPTED SOLUTION

Accepted Solutions
JosvanderVelden
SAS Super FREQ
You'll probably have to study the javascript that runs when clicking on the buttons on the page.
That is what allows you to see the names on the page. The file is https://www.cdcatexas.com/js/clerks.min.js .

Best regards, Jos

View solution in original post

2 REPLIES 2
JosvanderVelden
SAS Super FREQ
You'll probably have to study the javascript that runs when clicking on the buttons on the page.
That is what allows you to see the names on the page. The file is https://www.cdcatexas.com/js/clerks.min.js .

Best regards, Jos
watsoninvest
Calcite | Level 5
Thanks for your tip.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2 replies
  • 670 views
  • 1 like
  • 2 in conversation