Here is my method used to do what we are talking about. The CASE tctransfer_acct_vendor_name=="IFS" is the particular code we are talking about:
LPARAMETERS tcfiletoupload,tcftp_edv_host,tcftp_edv_userid,tcftp_edv_pw,tctransfer_acct_vendor_name
LOCAL lcfiletouploadnopath,llretval,llsuccess
&&...