[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ftpapi - testing
hi Jim,
On 4/5/2011 11:57 AM, Jim Dorsett wrote:
>
> c eval file = 'jimdsavf'
> c eval files = 'jdorsett/' + %trimr(FILE)
[SNIP]
> c if FTP_put(sess:'files': 'files')<0
The way this is coded, you're trying to PUT a file that's named 'files'.
This is no different from:
eval x = 'test';
eval myvar = x;
vs.
eval myvar = 'x';
When you put the string in quotes, it assigns a literal value. When you
leave the quotes off, it's treated as the name of a variable.
You're making the same mistake in your code. You have this:
if FTP_put(sess:'files': 'files')<0
It should (presumably) be this:
if FTP_put(sess: files: files)<0
Hope that makes sense. Also, FTPAPI currently only supports naming
convention 1. It does not support the old-fashioned lib/obj naming
convention. (I had no reason to support two naming conventions, since
namefmt 1 can address any object anywhere on the system.)
therefore, you should code it like this if you want to send a PF:
eval files = '/qsys.lib/jdorsett.lib/'
+ %trimr(FILE) + '.file'
Good luck
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------