[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: help - IFS



It's simple enough as well to use some of the system's underlying procedures (I believe they are probably in C, but you can easily prototype them).   Then you can just simply open the directory, read the contents, and close the directory.  Scott has some samples of this as well on his site.

Note... I would make sure that you can fully allocate/lock the IFS object.  You would not want to start processing/reading it while it still may be getting outputted to the IFS.


Dean


-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Robert Gilsdorf
Sent: Thursday, August 23, 2012 10:51 AM
To: HTTPAPI and FTPAPI Projects
Subject: RE: help - IFS


You could use a little program in the SG24-6503-02 publication from IBM. It is in section 15.9. It details out a program that creates a user defined SQL function that  will return a table of files in a given input directory. I have used this program for years to see what is in a particular directory so that I can process files from it.



-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Michael Ryan
Sent: Thursday, August 16, 2012 10:50 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: help - IFS

Good point. Another option is to have another file transferred (after the subject file) that's a 'marker' file. When the marker file is found, you know the target file exists. Do whatever with the target file and delete the marker file.

On Thu, Aug 16, 2012 at 10:41 AM, Alan Campin <alan0307d@xxxxxxxxx> wrote:
> I would definitely not recommend this method. The problem is simple.
> You have some job sitting on a wait and every few minutes it wakes up.
> You run a readdir and you find a new file and you start to process it
> but what happens when the file has not finished writing you get a
> partial file! Any method that uses polling is going to run into the
> same problem. That is why journaling is good. The journal entries are
> not written by the OS until the file has been written and closed.
>
> On Thu, Aug 16, 2012 at 4:47 AM, Craig Jacobsen <CJacobsen@xxxxxxxxxxxxx> wrote:
>> Giel,
>>
>> I would just use readdir using Scott's IFS stuff.
>> Here is a reference:
>> http://www.scottklement.com/rpg/ifs_ebook/readdir.html
>>
>>
>> Craig
>>
>>
>> -----Original Message-----
>> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>> [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Giel van
>> der Merwe
>> Sent: Wednesday, August 15, 2012 3:58 PM
>> To: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>> Subject: help - IFS
>>
>> I get sent a XML file that is placed on the IFS in a dedicated library, but the file name changes, what would you recommend I do to get the file name, so that I could process in my RPGLE program, any ideas?
>>
>> Giel van der Merwe
>>
>>
>> #####################################################################
>> ################
>>
>> The provisions of Sections 11,12, and 13 of the Electronic Communications and Transactions Act, 25 of 2002, in so far as e-contracting is concerned is expressly excluded and contracted out by  Barloworld South Africa (Pty) Ltd ("Barloworld") and no data message or electronic communication will be recognised as having legal contractual status as per the aforementioned provisions under any circumstances. All contracts concluded by Barloworld, its Business Units, Divisions and Subsidiaries will only be legally binding and recognised once reduced to physical writing and physically signed by a duly authorised representative of Barloworld.
>>
>> All other provisions of  the Electronic Communications and Transactions Act, 25 of 2002 are accepted.
>>
>> #####################################################################
>> ################
>> Note:
>> This message is for the named person's use only.  It may contain confidential, proprietary or legally privileged information.  No confidentiality or privilege is waived or lost by any mistransmission.  If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender.  You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Avis and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks.
>>
>> Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
>>
>> Thank You.
>> #####################################################################
>> ################
>>
>> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.  Unless expressly stated in this e-mail, nothing in this message or any attachment should be construed as a digital or electronic signature.
>> ---------------------------------------------------------------------
>> -- This is the FTPAPI mailing list.  To unsubscribe, please go to:
>> http://www.scottklement.com/mailman/listinfo/ftpapi
>> ---------------------------------------------------------------------
>> --
> ----------------------------------------------------------------------
> - This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> ----------------------------------------------------------------------
> -
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Rush Trucking, PO Box 1011, Wayne, MI 48184 www.rushtrucking.com
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------