ListDir on AS400 - WeOnlyDo Discussion board

ListDir on AS400 (wodSFTP / wodSFTP.NET / wodSFTPdll)

by tris, Thursday, May 03, 2007, 09:38 (6226 days ago)

Short question...

Is there a possibility to use the ListDir -function on an AS400?

That machine does not understand ls -al :


ftp> ls -al
200 PORT subcommand request successful.
550 Path does not exist: -al


Only possibility would be a dir , what is formated like this:

QLPINSTALL 12288 05.12.05 14:38:40 *DIR QSR/
QSYS 8192 23.03.05 12:24:50 *DIR var/
QSYS 40960 23.03.05 12:24:56 *DIR lib/
QSYS 8192 21.11.05 15:21:11 *DIR www/
QSYS 57344 23.03.05 12:19:31 *DIR bin/

If necessary, I could even parse it by myself, but how to send a dir?

Re: ListDir on AS400

by wodDamir, Thursday, May 03, 2007, 09:51 (6226 days ago) @ tris

Hi Tris,

Please try setting ListParams Property to .

By default, we send -al parametars when we issue List command. This Property is used to customize those parameters.

Hope this helps.

Regards,
Damba

Re: ListDir on AS400

by tris, Thursday, May 03, 2007, 10:56 (6226 days ago) @ wodDamir

Thank you... at least I could now parse it on my own. But information isn't parsed in your objectmodel correctly.

Isn't this format supported by your component?

Re: ListDir on AS400

by wodSupport, Thursday, May 03, 2007, 10:59 (6226 days ago) @ tris

Not officially. However, we can help and improve our parser. If you would be so kind to send us sample directory listings, we would be happy to make improvements.

Kreso

Re: ListDir on AS400

by tris, Thursday, May 03, 2007, 11:29 (6226 days ago) @ wodSupport

ftp> dir
200 PORT subcommand request successful.
125 List started.
QPGMR 118784 23.03.05 12:18:18 *FILE QAAPFILE
QPGMR *MEM QAAPFILE.QAAPF1X1
QPGMR *MEM QAAPFILE.QAAPF1X2
QPGMR *MEM QAAPFILE.QAAPF2X2
QPGMR 159744 23.03.05 12:18:20 *FILE QAAPFILE$
QPGMR *MEM QAAPFILE$.QAAPF1X1
QPGMR *MEM QAAPFILE$.QAAPF1X2
QPGMR *MEM QAAPFILE$.QAAPF2X2
QPGMR 73728 23.03.05 12:18:19 *FILE QAAPFILE#
QPGMR *MEM QAAPFILE#.QAAPF1X1
QPGMR *MEM QAAPFILE#.QAAPF1X2
QPGMR *MEM QAAPFILE#.QAAPF2X2
QAAPFILEº
QAAPFILEº.QAAPF1X1
QAAPFILEº.QAAPF1X2
QAAPFILEº.QAAPF2X2
QSYS 49152 23.03.05 11:00:32 *FILE QAOEFFVL
QSYS *MEM QAOEFFVL.QAOEFFVL
QSYS 839680 23.03.05 16:44:10 *FILE QAPZCOVER
QSYS *MEM QAPZCOVER.QTL05032
QPGMR 45056 23.03.05 12:17:00 *FILE QASUUSRPMT
QPGMR *MEM QASUUSRPMT.QASUUSRPMT
QPGMR 28672 23.03.05 12:17:45 *FILE QAUOOPT
QPGMR *MEM QAUOOPT.QAUOOPT
QPGMR 28672 23.03.05 12:21:20 *FILE QCBLLESRC
QPGMR *MEM QCBLLESRC.VERIFY
QPGMR 20480 23.03.05 12:21:46 *FILE QCBLSRC
QPGMR *MEM QCBLSRC.VERIFY
QPGMR 8192 23.03.05 11:00:32 *FILE QCLSRC
QPGMR 8192 23.03.05 11:00:32 *FILE QCMDSRC
QPGMR 8192 23.03.05 12:20:31 *FILE QCPPSRC
QPGMR 8192 23.03.05 12:21:58 *FILE QCSRC
QPGMR 53248 23.03.05 11:00:33 *FILE QDDSSRC
QPGMR *MEM QDDSSRC.QDSIGNON
QPGMR *MEM QDDSSRC.QDSIGNON2
QSYS 8192 23.03.05 11:00:32 *FILE QEWCKBDMAP
QSYS 8192 23.03.05 11:00:32 *FILE QEWCSCNFMT
QSYS 8192 23.03.05 11:00:32 *FILE QEWCSRC
QSYS 8192 23.03.05 11:00:32 *FILE QEWLSRC
QPGMR 8192 23.03.05 11:00:32 *FILE QFMTSRC
QPGMR 36864 23.03.05 12:17:53 *FILE QINVFILE
QPGMR *MEM QINVFILE.QADZINVF
QPGMR 53248 23.03.05 12:17:54 *FILE QINVREC
QPGMR *MEM QINVREC.QADZINVR
QPGMR 20480 23.03.05 12:21:53 *FILE QLBLSRC
QPGMR *MEM QLBLSRC.VERIFY
QPGMR 8192 23.03.05 11:00:32 *FILE QMNUSRC
QPGMR 53248 23.03.05 12:18:03 *FILE QORDDTL
QPGMR *MEM QORDDTL.QADZORDD
QPGMR 36864 23.03.05 12:18:01 *FILE QORDFILE
QPGMR *MEM QORDFILE.QADZORDF
QPGMR 53248 23.03.05 12:18:02 *FILE QORDHDR
QPGMR *MEM QORDHDR.QADZORDH
QPGMR 8192 23.03.05 11:00:32 *FILE QPNLSRC
DANIELC 6348800 02.06.05 09:42:40 *FILE QQRYOUT
DANIELC *MEM QQRYOUT.QQRYOUT
QPGMR 8192 23.03.05 11:00:32 *FILE QREXSRC
QPGMR 20480 23.03.05 12:20:43 *FILE QRPGLESRC
QPGMR *MEM QRPGLESRC.PROOF
QPGMR 40960 23.03.05 12:21:12 *FILE QRPGSRC
QPGMR *MEM QRPGSRC.PROOF
QPGMR *MEM QRPGSRC.PR

Re: ListDir on AS400

by tris, Thursday, May 03, 2007, 11:30 (6226 days ago) @ tris

250 / is current directory.
ftp> dir
200 PORT subcommand request successful.
125 List started.
QSYS 77824 23.03.05 11:23:56 *DIR QOpenSys/
QDOC 8192 01.01.70 00:00:00 *FLR QDLS/
QSYS 12976128 03.05.07 09:34:28 *LIB QSYS.LIB/
QDFTOWN 4096 01.01.70 00:00:00 *DDIR QOPT/
QSYS 2272 03.05.07 09:04:00 *DDIR QFileSvr.400/
QDFTOWN 1200 03.05.07 09:04:01 *DDIR QNTC/
QSYS 40960 23.03.05 11:59:49 *DIR dev/
QSYS 8192 23.03.05 10:57:18 *DIR home/
QSYS 12288 03.05.07 09:08:46 *DIR tmp/
QSYS 8192 23.03.05 12:00:05 *DIR etc/
QSYS 8192 23.03.05 12:24:50 *DIR usr/
QSYS 8192 22.04.05 17:34:31 *DIR QIBM/
QLPINSTALL 12288 05.12.05 14:38:40 *DIR QSR/
QSYS 8192 23.03.05 12:24:50 *DIR var/
QSYS 40960 23.03.05 12:24:56 *DIR lib/
QSYS 8192 21.11.05 15:21:11 *DIR www/
QSYS 57344 23.03.05 12:19:31 *DIR bin/
QTCP 8192 23.03.05 12:05:18 *DIR QTCPTMM/
JHEIL 21439 13.10.05 09:43:06 *STMF TEST1
DANIELC 8192 05.12.05 14:38:16 *DIR opt/
250 List completed.
FTP: 64d Bytes empfangen in 0,00Sekunden 1169000,00KB/s

Re: ListDir on AS400

by tris, Thursday, May 03, 2007, 11:36 (6226 days ago) @ tris

10 chars owner
seperator
10 chars size
seperator
8 chars date created
seperator
8 chars time created
seperator
10 cahrs type
seperator
name (folders followed by / )
crlf

How fast could that definition be implemented in your compiler? If I don't have to wait for it too long, i'd like to use it instead of parsing the information by my self, because i could use your objectmodel and the user would not have to choose type of parsing.

Re: ListDir on AS400

by wodSupport, Thursday, May 03, 2007, 11:37 (6226 days ago) @ tris

Tris,

it could be even today (or in next 24 hrs).

Does AS/400 have 2 different datasets? Partitioned and nonpartitioned? How are they differentiated? Which one did you show sample for?

Any chance we can connect there?

Kreso

Re: ListDir on AS400

by tris, Thursday, May 03, 2007, 12:43 (6226 days ago) @ wodSupport

Sorry, I can't give you access to our AS/400 machine.

But I've create an account for you on a german open AS/400 system. Mailed you the login information.

Re: ListDir on AS400

by wodDamir, Thursday, May 03, 2007, 12:50 (6226 days ago) @ tris

Hi Tristan,

Thank you for the account, we have received the credentials.

Please leave the server open, we will do the testing during the day, and inform you when we are done.

Regards,
Damba

Re: ListDir on AS400

by wodSupport, Friday, May 04, 2007, 01:58 (6225 days ago) @ wodDamir

We made some changes to wodFtpDLX (ActiveX). Please download it again and try against your server. I hope it will work ok - but you should try it out.

You *MAY* set DirFormat = fmtAS400 but I think it will autodetect it anyway.

Let me know how it goes!

Kreso

Re: ListDir on AS400

by Everett, Tuesday, July 13, 2010, 15:45 (5058 days ago) @ wodSupport

Sorry to reopen such an old thread, but were these changes for AS400 also implemented in the .Net FtpDLX component?

We made some changes to wodFtpDLX (ActiveX). Please download it again and try against your server. I hope it will work ok - but you should try it out.

You *MAY* set DirFormat = fmtAS400 but I think it will autodetect it anyway.

Let me know how it goes!

Kreso

Re: ListDir on AS400

by wodDamir, Tuesday, July 13, 2010, 15:55 (5058 days ago) @ Everett

Hi Everett,

Yes, the wodFtpDLX.Net also does support AS400 file system. You can specify it using the DirFormat property of the main object.

Hope this helps.

Regards,
Damba

Re: ListDir on AS400

by Everett, Tuesday, July 13, 2010, 21:27 (5058 days ago) @ wodDamir

Thanks!

When setting the DirFormat to AS400 is it no longer necessary to set ListParams to an empty string (instead of the default -al ) or send the QUOTE SITE NAMEFMT 1 command? I've seen both of these workarounds listed elsewhere in the forums for calling ListDir and accessing DirItems on an AS400.

I've also been testing setting the DirFormat to a value that doesn't match the server, but it doesn't appear to affect the behavior (e.g. DirFormat set to AS400 and connect to a UNIX ftp server). Should this generate any type of error when using ListDir and DirItems?

- Everett

Hi Everett,

Yes, the wodFtpDLX.Net also does support AS400 file system. You can specify it using the DirFormat property of the main object.

Hope this helps.

Regards,
Damba

Re: ListDir on AS400

by woddrazen, Tuesday, July 13, 2010, 22:10 (5058 days ago) @ Everett

Everett,


I don't think that AS400 server is using -al parameter for LIST command. Unfortunately I cannot be sure because we don't have such server for a test.

You can check command that is send and server reply inside wodFtpDLX.NET FtpRepy Event using Command and ReplyText statement there.

If you are using one value in DirFormat and connect to some other server type you could receive parsing problem with DirItems collection.


Drazen