MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2014

RE: Process FTP Output log



fixed

I got something from all three of you so if you're at the COMMON Fall
Conference, one night's on me!

--
Jim Oberholtzer
Chief Technical Architect
Agile Technology Architects


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott
Klement
Sent: Wednesday, July 09, 2014 2:50 PM
To: Midrange Systems Technical Discussion
Subject: Re: Process FTP Output log

Charles,

It seems to me that the proper solution then is for:

1) Gary to buy you dinner.
2) You to buy me dinner.

This keeps in the spirit of you benefiting from my work, and Gary benefiting
from your sharing & knowledge.

-SK

On 7/8/2014 7:17 AM, Charles Wilt wrote:
Glad you found it useful, but the example is Scott's. He includes a
whole set of examples with FTP API.

Charles


On Mon, Jul 7, 2014 at 4:07 PM, Gary Thompson <gthompson@xxxxxxxxxxx>
wrote:

Charles,
Forget the bet.
Based on your generosity, It will be my pleasure to buy that dinner
: )

As you've observed, I actually have most all of what I need because
our current local FTP program does have the FTP output in a source
member - I'd totally over-looked that until today's e-mail exchange.

Definitely, FTPAPI is what we need to start using and your simple
example will be very helpful.

Thanks again!



-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of Charles Wilt
Sent: Monday, July 07, 2014 1:58 PM
To: Midrange Systems Technical Discussion
Subject: Re: Process FTP Output log

Gary,

I'd be willing to bet a rib dinner that you can get a program that
uses FTP in place quicker than one that properly parses the log file...

Here's a complete program that does a put:

H BNDDIR('FTPAPI') DFTACTGRP(*NO) ACTGRP(*NEW)

/COPY FTPSRC,FTPAPI_H

D Msg S 52A
D sess S 10I 0

* connect to FTP server. If an error occurs,
* display an error message and exit.
c eval sess = ftp_conn('ftpserv.mydomain.com':
c 'myname':
c 'mypassword')
c if sess < 0
c eval Msg = ftp_errorMsg(0)
c dsply Msg
c eval *inlr = *on
c return
c endif

* put the FIPS utility (downloaded in TESTGET program) on
* the FTP server.
c callp ftp_binaryMode(sess: *on)
c if ftp_put(sess: 'fips.exe': '/fips.exe')<0
c eval Msg = ftp_errorMsg(sess)
c dsply Msg
c endif

c callp ftp_quit(sess)
c eval *inlr = *on
c return

Charles


On Mon, Jul 7, 2014 at 3:52 PM, Gary Thompson <gthompson@xxxxxxxxxxx>
wrote:

Jeff,
Thanks, I needed that!
Totally over-looked OVRDBF.
I have a copy of FTPAPI and want to implement but I'm in results NOW
mode - and you just saved my life!

And thanks also to Charles - I believe I am on Scott's mailing list
so I'm hoping to circle back because we too need reliability which
my current hack will not address.

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf
Of Jeff Young
Sent: Monday, July 07, 2014 1:43 PM
To: Midrange Systems Technical Discussion
Subject: Re: Process FTP Output log

Gary,
Others here will suggest that you use Scott Kelments' FTPAPI utility
that will give you finer control and total error handling.
If you want to process the FTP Output Log, I would suggest that you
create a Source File and prior to the FTP command issue an OVRDBF
command as
follows:
OVRDBF FILE(OUTPUT) TOFILE(your file) TOMBR(your member).
The file name OUTPUT is used by FTP to write the output log.


Jeff Young
Sr. Programmer Analyst


On Mon, Jul 7, 2014 at 3:38 PM, Gary Thompson
<gthompson@xxxxxxxxxxx>
wrote:

I am looking for a quick way to process output FTP session "logs".

We have a "never-ending" job which monitors for customer deliveries
which are ready and creates and sends an EDI 856 ASN (actually an
imitation) via FTP.

One need is to know if the FTP was successful.

This job creates two spool files for each FTP step, one with input
commands and the other with output. During the course of a day
there are over 200 of these files so I need to read the most recent
FTP output spool, which can be identified by the three parts of file:
Name, Device or Queue and User Data.

My current idea is to scan for 'bytes transferred'

I've worked with spool API's but not here and not for some time but
a link to the API name and any/all hints will be much appreciated.
--
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.


--
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.

--
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.


--
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.

--
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.


--
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.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact