[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: TESTPUT



Sender: "Calabro, Buck" <Buck.Calabro@xxxxxxxxxxxx>

> However, when I attempt to use a variable 
> for those paramaters, I always get
> a "No Such File or Directory" error message.  

What are the chances that these parms are coming from the command line?  If that's the case, you may have garbage at the end of the parameters because you didn't specify at least 256 characters between the apostrophes.

If you're doing
call testput '/dir/dir/dir/file.ext' '/dir/file.ext'

then OS400 will pass the first 32 characters of the literals followed by whatever happens to be following them in memory.  (A better explanation is in the FAQ at http://faq.midrange.com  Search for 'garbage'.)

Instead try
call testput '/dir/dir/dir/file.ext           





' '/dir/file.ext









'

or something equivalent.  If you pass enough blanks then your %trim will work because you won't have junk after the part you typed in.  One good way to debug that is to either use the debugger and inspect the variables in hex, or use the DUMP opcode.
  --buck


The information contained in this electronic mail transmission is intended by Communications Software Consultants, Inc. for the use of the named individual or entity to which it is directed
and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please notify the sender immediately and delete this
message from your system without copying or forwarding it.

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------