Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IdFTP and a AS/400 ftp-Server ?

1 view
Skip to first unread message

Ben Müller

unread,
Mar 26, 2003, 8:38:57 AM3/26/03
to
Hallo all,

I got problems reading files from a AS/400 ftp-Server.
if i use get and manually give it the filename i can download it without
problems.
i can also get the FileList in a TStrings object, but the direcorylist is
empty.
So is the only chance to get a correct DirectoryList to parse it manually ?
And can anybody help me with that ?

greeting Bene

J Peter Mugaas

unread,
Mar 26, 2003, 1:35:09 PM3/26/03
to
On Wed, 26 Mar 2003 14:38:57 +0100, "Ben Müller"
<mira...@connectdata.de> wrote:

>Hallo all,
>
>I got problems reading files from a AS/400 ftp-Server.
>if i use get and manually give it the filename i can download it without
>problems.
>i can also get the FileList in a TStrings object, but the direcorylist is
>empty.
>So is the only chance to get a correct DirectoryList to parse it manually ?

I'm afraid so. The Indy 10 framework has a plug in architecture for
various FTP directory list formats and we have a parser for AS/400.

Indy 9 does not have that capability and the AS/400 directory format
is totally different than Microsoft IIS or the standard Unix /bin/ls
format.

Just a little background on this, the original FTP RFC never did
specify a standard directory listing format. Thus, developers were
free to do as they were and they did. At the time, most FTP clients
were simple console programs where people used a CD manually and could
use their human judgement in determining if something was a directory
or file name. That was important at the time because each system was
totally different and some systems still have flat file systems (not
hierarchical like what you see in MS-DOS and Unix) and these file
systems unique quirks or features. Then, trouble emerged with GUI
clients such as WS_FTP and several others in the mid 1990's because
they had to replace this human judgement with "intelligent code" and
display things in a more intuitive manner. Suffice it to say that the
code was often a mess simply because of the complexity and the Indy
FTP list parsing code was over 150KB and before a restructure, I often
joked that it was not messy enough. To illustrate the unique demands,
I currently have about 400 directory output samples showing some
totally different formats.

To give everyone some idea, here's some sample directory output data
from my museum of gore (turn word wrap off for best viewing):

Unix ===
total 3
-rw-r--r-- 1 0 31 129 Jan 2 1997 .message
Microsoft IIS MS-DOS format===
08-15-02 12:19AM <DIR> incoming
IBM AS/400=====
MSECOFR 44060672 05/10/02 09:22:25 *FILE #541_NT.FILE
MSECOFR *MEM
#541_NT.FILE/TXT.MBR
HP3000 or MP/iX ====
PATH= /FTPGUEST/PUB/

CODE ------------LOGICAL RECORD----------- ----SPACE---- FILENAME
SIZE TYP EOF LIMIT R/B SECTORS #X MX

1B BA 605 2147483647 1 16 1 *
.sh_history
16W HBD 0 67107839 1 32 1 * dist/
1B BA 0 2147483647 1 0 0 *
index.html

VMS =====

BIG:[ANONYMOUS]

CLEANUP.SH;6 179 18-JUL-2001 11:17 [ISCS,ANONYMOUS]
(RWED,RWED,,)
COINS.DIR;1 9 21-DEC-1994 07:38 [ISCS,ANONYMOUS]
(RWE,RE,,)
HELP.TXT;6 5 30-JAN-1998 12:58 [ISCS,ANONYMOUS]
(RWED,RWED,,)
INDEX.TXT;1 0 23-JUN-1994 07:53 [ISCS,ANONYMOUS]
(RWED,RWED,,)


Total of 193 blocks in 4 files.
IBM VM/CMS===
OMA00215 PLAN V 64 28 1 6/26/02 9:33:21
-
WEBSHARE DIR - - - 5/30/97 18:44:17
-
===
J. Peter Mugaas - Chairperson, Distribution Team, Indy Pit Crew
Internet Direct (Indy) Website - http://www.nevrona.com/Indy
Personal Home Page - http://www.wvnet.edu/~oma00215
If I want to do business with you, I will contact you. Otherwise, do not contact me.

Johannes Berg

unread,
Mar 26, 2003, 2:24:10 PM3/26/03
to
On Wed, 26 Mar 2003 13:35:09 -0500, J Peter Mugaas wrote:

> The Indy 10 framework has a plug in architecture for
> various FTP directory list formats

nice :)

johannes

Ben Müller

unread,
Mar 27, 2003, 7:50:34 AM3/27/03
to
Thanks for the help and the history,

I am going around the problem adn just do not use the directoryList.

greets Ben

PS: Sorry for the bad english

"J Peter Mugaas" <oma0...@mail.wvnet.edu> schrieb im Newsbeitrag
news:b8r38v8cbo0137on6...@4ax.com...

0 new messages