On Monday, 08/31/2009 at 06:14 EDT, "Schuh, Richard" <rsc...@visa.com> 
wrote:
> I am trying to FTP a file that is Wnidoze ASCII to VM without having it 
> translated to EBCDIC. In this case, the PC is the client and VM, the 
host. I 
> have tried:
> 
> BIN - it gets translated
> TYPE A - it gets translated
> SITE AUTOTRANS OFF - I get a message saying that the SITE command is 
invalid. 
> The same applies to using an abbreviation for AUTOTRANS.
> MODE B - invalid command
> SITE MODE B (out of frustration) - invalid command
> Rename the file, changing the extension from .CSV to .BIN - it almost 
works 
> after a PIPE < fine | deblock string x0d0a | > file

On Windows XP, the "bin" command results in TYPE I transfers and get/put 
work fine, however the AUTOTRANS on the server is likely messing you up. 
So "quote site autotrans off".

AUTOTRANS was invented to solve problems for some some stupid web browsers 
that ASSUME a binary FTP results in ASCII data.  I mean, isn't all data 
natively stored in ASCII?  (growl)

> The files I am transferring are CSV files. The values are contained in 
double 
> quotes with comma separators. Null values are indicated by two double 
quotes. 
> There is another problem - any of the FTPs that transfer data strip  the 
quotes 
> surrounding the data values - not good for values containing a comma. 
Not good 
> for something expecting a pair of quotes as a null value indicator.

FTP, binary or text, does not strip out double quotes.  Something else is 
doing that.  Note that in a .csv file, text fields that do not contain 
commas or double quotes will likely not be quoted.  (I can't remember the 
exact rules.)  Double-check the source file.  A null value should be 
represented by nothing.  No null, no space, no quotes, no nothing.  You 
will see consecutive commas (unquoted).

Example: If there are 4 fields and all are null, you would see: ,,,<crlf>

Be sure to upload into a V-format file.  My experiments were performed 
using Excel.

Alan Altmark
z/VM Development
IBM Endicott

Reply via email to