[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FTP_getRaw (line mode) not converting to EBCDIC
Is FTP_getRaw okay to call, or is it for internal use only? (It's used
internally by FTP_get and FTP_url_get_raw.) It works nicely for my
purposes, except I need EBCDIC data passed to my write procedure.
get_byLine has code to do the conversion, but it's conditioned by
wkXltHack. Comments indicate that it's only there for older versions
of FTPAPI calling RecvLine for directories??
FTP_lstRaw and FTP_dirRaw set this flag on when invoking get_byline
but FTP_getRaw doesn't.
I've added a procedure FTP_EBCDICmode to set the wkXltHack indicator.
This solves my problem, but I'd like to check whether I'm on the wrong
track.
(To implement properly, I'd have to save old value of wkXltHack rather
than just turn off after lstRaw and dirRaw.)
Here's what I'm trying to do:
I'm reading a list of csv files on an FTP server using FTP_List. For
each file, I extract a code from the file name which I pass to my
record-processing procedure via FTP_getRaw (using peFileDes which
luckily is the correct data type.) I then delete the file if my
procedure returns successfully.
(FTP_List uses FTP_LstRaw which sets on wkXlatHack when calling
get_byLine.)
I also call FTP_LineMode(fd: *on) and FTP_BinaryMode(fd: *off).
Any thoughts?
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------