× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



If you are attempting to retrive a specific file name, if the GET fails, FTP will log a specific message. I can't recall the message ranges specifically, but if the return message starts with 100 through 199, that indicates success. There is a specification about the number ranges. Unlike sFTP. all messages have standard numbers. But, the returned text is not guaranteed. The message number, the first three characters, is somewhat consistent. The first character is always, from my experience, reliable. Thus, in the ftp log, the message logged immediately following the get atempt will always start with a digit one if successful.

If the specific file name is unknown at the time of the get, then you need to examine the file date returned from the server for the file. I have a two step CL get process to retrieve first the list of available files, and then, using that list, files with a specific date on the remote server. The code is somewhat specific to the format used by DEC, but is adapatable.

John McKee
-----Original message-----
From: "Dennis Lovelady" iseries@xxxxxxxxxxxx
Date: Mon, 09 Aug 2010 10:53:01 -0500
To: "'Midrange Systems Technical Discussion'" midrange-l@xxxxxxxxxxxx
Subject: RE: Checking file existence on windows server

If this file is available to you via IFS e.g. as a windows share) you can
use stat() or fstat() to determine this.

A kludgey FTP process may do the trick otherwise(?)

Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
The difference between genius and stupidity is that genius has its limits.
-- Albert Einstein


Can anyone give me an idea of the best, most reliable, way (if it is
even possible) to check to see if a file exists on a Windows server
from an iSeries RPG (or CL) application? I want to try and condition an
action in an RPG application based on a picture files existing or not
existing on the windows server. My only thought is to create an IFS
directory and FTP all the files from the server directory to the IFS
and then check to see if an IFS file exists using CHKIFSOBJ

Thanks
--


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.