%net_get ------------------------------------------------------------------------ Download a package of files from a web server to a local computer Description The %net_get macro will download a "package" over the internet and install it on your local computer. A "package" is simply a list of files available at a web site, and would typically be composed of a SAS macro (e.g. test.sas), a help file for the macro (e.g. test.hlp), and possibly one or more supplemental files (e.g. hsb2.sas7bdat). Once you have used %net_get to download a macro, you can then immediately use that macro. Also, if the macro contains a help file, you can get help on using the macro using the %local_help macro, for example %local_help(sp_plot) . Syntax %net_get( package_name [ url , data_loc , replace=no ) ] package_name - name of the package to be downloaded, required url - web location of the package; It can be optional. The "url" will default to the most recently used "url" with any of the %net_ commands for the current SAS session. data_loc - name of a folder on your local machine any supplemental data files to be downloaded to. It can be optional. If omitted, the supplemental data files, if any, will not be downloaded. replace=no - option can be used when a package has already been downloaded and you wish to download and overwrite the existing package automatically. By default, if a package has already been downloaded, a dialog window will pop up and you will be asked if you want to replace the existing package. Setting replace=yes bypasses the dialog window and overwrites the contents of the existing package automatically. Examples To download "test" from "http://www.ats.ucla.edu/stat/sas/macros" you can type %net_get( test , http://www.ats.ucla.edu/stat/sas/macros ) To download "srs" from "http://www.ats.ucla.edu/stat/sas/macros", after having issued to above command and defaulting to the same "url", you can type %net_get( srs ) To download "srs" from "http://www.ats.ucla.edu/stat/sas/macros" again and replace the existing version, you can type %net_get( srs, replace=yes ) To download "test" from "http://www.ats.ucla.edu/stat/sas/macros" and to include the supplemental data files to "c:\myfiles", you can type %net_get( test, , c:\myfiles ) or if you want to explicitly name the "url" you can type %net_get( test , www.ats.ucla.edu/stat/sas/macros, c:\myfiles ) Also See Also see the help from %net_help(net_list, http://www.ats.ucla.edu/stat/sas/macros/nettools) %net_help(net_describe, http://www.ats.ucla.edu/stat/sas/macros/nettools) Also see the web at http://www.ats.ucla.edu/stat/sas/macros/nettools.htm Also see the macro itself from http://www.ats.ucla.edu/stat/sas/macros/nettools/net_get.sas.txt