An Idea Exchange for SAS software and services

Comments
by New Contributor ThomKinCA
on ‎03-05-2015 06:05 PM

This would be great to avoid to have to manually change the scripts after they are generated, the way I do now.

by New Contributor ThomKinCA
on ‎07-23-2015 06:43 PM

On windows, I was able to use the generated scripts with an internal ftp proxy (bluecoat) by modifying them after they were created.

For sas94_hfadd_data_ftp_dowload_script.txt, here's the before:

open ftp.sas.com

anonymous

SASHFADD

binary

get techsup/download/hotfix/HF2/util01/SASHotFixDLM/data/SAS94_HFADD_data.xml

quit

For sas94_hfadd_data_ftp_dowload_script.txt, here's the after:

open ftp-proxy.internal.xxx

anonymous@ftp.sas.com USERID

SASHFADD

Password

binary

get techsup/download/hotfix/HF2/util01/SASHotFixDLM/data/SAS94_HFADD_data.xml

quit

For UNIX, I modified the SASHFADD.pl script to use an internal ftp proxy that didn't require a authentication.  This doesn't require any manual editing of the ftp scripts/files that like the windows example above because the perl script generates them with the proxy changes you specify.

Note, for the ftp proxy I was using, it required the ftp user, ftp password, and ftp host all be included on the same line.

Here's my notes of what I changed.  Use at your own risk.

# Changes for SASHFADD.pl to use an ftp proxy server

# Change From:

#               $xmlscripttxt .= "open ftp.sas.com\n";

#               $xmlscripttxt .= "anonymous\n";

#               $xmlscripttxt .= "SASHFADD\n";

# Change To:

#               $xmlscripttxt .= "open anonymousSmiley FrustratedASHFADD\@ftp.sas.com\n";

#

# Change From:

#               $xmlscriptbat .= "ftp -s:$scriptouttxtfile";

# Change To:

#               $xmlscriptbat .= "ftp ftp-proxy.domain.com -s:$scriptouttxtfile";

#

#

# Change From:

#               $xmlscripttxt .= "FTPHOST=ftp.sas.com\n";

#               $xmlscripttxt .= "FTPUSER=anonymous\n";

#

# Change To:

#               $xmlscripttxt .= "FTPHOST=ftp-proxy.domain.com\n";

#               $xmlscripttxt .= "FTPUSER=anonymousSmiley FrustratedASHFADD\@ftp.sas.com\n";

#

# Change From:

# The SAS9x_HFADD_data.xml file contains the ftp site where the hotfix can be downloaded from.

# This is used to generate the ftp download scripts when the SASHFADD.pl script is executed.

#       <ftpx ftpcode="f1" ftpval="ftp.sas.com" />

#       <ftpx ftpcode="s1" ftpval="sftp1.sas.com" />

#

# These lines need to be changed in the SASHFADD.pl script.

# Note: Search for the group below, so the window lines are not chnaged.

#

# $dlscripttxt .= "#!/bin/sh\n";

#                $dlscripttxt .= "FTPHOST=$ftpx{f1}\n";

#                $dlscripttxt .= "FTPUSER=anonymous\n";

#

# Change To:

# $dlscripttxt .= "#!/bin/sh\n";

#                $dlscripttxt .= "FTPHOST=ftp-proxy.domain.com\n";

#                $dlscripttxt .= "FTPUSER=anonymousSmiley FrustratedASHFADD\@ftp.sas.com\n";

#

################################################################################################

Idea Statuses
Top Liked Authors