We're sorry, but there is no www.hhs.gov page that matches your entry. Possible reasons:
- The page may have been moved,
- It no longer exists, or
- The address may have been typed incorrectly.
Hello,
I am trying to run the following code I downloaded from a government website.
*=============================================================================;
* DOWNLOAD THE LATEST LOOKUP TABLES WITH CONTRACEPTIVE CLAIMS CODES
*=============================================================================;
%let urldir = https://www.hhs.gov/opa/sites/default/files/;
%macro getlookup(tablename);
filename _inbox "%sysfunc(getoption(work))/&tablename..sas7
bdat";
proc http
method="get" url="&urldir.&tablename..sas7bdat" out=_inbox;
run;
%mend; *...Claims code tables will now be downloaded to work library and directly readable;
%getlookup(lookup_iud_&year.);
%getlookup(lookup_infecund_&year.);
%getlookup(lookup_pregnancy_&year.);
%getlookup(lookup_non_live_birth_&year.);
%getlookup(lookup_live_birth_&year.);
%getlookup(lookup_sterilization_&year.);
%getlookup(lookup_implant_&year.);
%getlookup(lookup_injectable_&year.);
%getlookup(lookup_oral_pill_&year.);
%getlookup(lookup_patch_&year.);
%getlookup(lookup_ring_&year.);
%getlookup(lookup_diaphragm_&year.);
I get the following note in my log.
"NOTE: PROCEDURE HTTP used (Total process time):
real time 1.01 seconds
cpu time 0.00 seconds
NOTE: 404 Not Found"
I looked up the error, and it seems it is related to a JAVA virtual machine error. Could anyone offer any help as how to resolve this?
Thanks,
Ted
@LEINAARE wrote:
I was able to download a file containing the SAS datasets available online and store it on my desktop. Is there anyway to modify the %getlookup macro to function in a similar way to read datasets stored on my computer?
From the portion you've shown, that's actually all this macro did, download the files.
Hi Reeza,
This is a small excerpt from a very large code that calls multiple component programs. However, I have not been able to find any step that specifically defines 'year'. The datasets it is trying to download are from 2013-2016.
I have followed the URL :
"https://www.hhs.gov/opa/sites/default/files/"
Which Says :
We're sorry, but there is no www.hhs.gov page that matches your entry. Possible reasons:
Apparently the Site has changed since the code was written.
Hi r_behata,
I tried that as well, and got the same message. The data tables referenced in the original program can be found at https://www.hhs.gov/opa/performance-measures/claims-data-sas-program-instructions/index.html .
But, when I replaced the URL with the link above, it did not execute either.
Hi @LEINAARE
You will have to find the new web file server link where the data files are hosted in case the URL has changed. Simply replacing the URL with a HTML page might not work.
Hi @r_behata
Thank you for the suggestion. I will email the contact on that page and see if there is an updated URL.
Thanks,
Ted
I was able to download a file containing the SAS datasets available online and store it on my desktop. Is there anyway to modify the %getlookup macro to function in a similar way to read datasets stored on my computer?
@LEINAARE wrote:
I was able to download a file containing the SAS datasets available online and store it on my desktop. Is there anyway to modify the %getlookup macro to function in a similar way to read datasets stored on my computer?
From the portion you've shown, that's actually all this macro did, download the files.
Hi @Reeza,
Thanks for taking a look at this. I used proc copy to convert the datasets contained in the download file to temporary datasets, which is what I believe the larger body of program needs.
Thanks,
Ted
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.