[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FTPAPI] Reply message from ftp_put
Hi Luciano -
Sure...here's the Logger procedure...I know I copied the basics from
one of Scott's programs. It was important for us to have a logging
routine because transfers to a bank provide their batch number in the
returned text. We needed that when the bank would lose our transfer.
- Michael
// Logging routine
D Logger PR
D Msg 256A Const
D extra * Value
/////////////////////////////////////////////////////////
// Log FTP status information to a file.
/////////////////////////////////////////////////////////
P Logger B
D Logger PI
D peMsgTxt 256A Const
D peLogFile * Value
/Free
FOAPPL = WkAppl;
FOMESG = peMsgTxt;
FODATE = WkDate;
FOSTMP = %TimeStamp();
Write FTPOUTR;
/End-Free
P Logger E
On Tue, Dec 14, 2010 at 3:59 AM, Luciano Vigna
<[1]luciano.vigna@xxxxxxxxx> wrote:
Hi Michael,
Can you explain in detail the procedure "Logger", please?
I think your suggestion is interesting, I'll try it! Thank you!
Luciano
-----Messaggio originale-----
Da: [2]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Per conto di
Michael Ryan
Inviato: lunedì 13 dicembre 2010 19:03
A: HTTPAPI and FTPAPI Projects
Oggetto: Re: [FTPAPI] Reply message from ftp_put
Hi Luciano -
I do it like this:
/////////////////////////////////////////////////////////
// Set logging routine.
/////////////////////////////////////////////////////////
BegSr SetLogging;
// Register logging exit process.
FTP_exitProc(sess: FTP_EXTLOG: %paddr(Logger): *null);
// Turn FTP logging on for this session.
FTP_logging(sess:*ON);
EndSr;
And my Logger procedure is just writing to a file. Here's an
example
procedure call:
If ftp_put(sess: %Trim(ToName): %Trim(FmName)) < 0;
Logger('Could not put file-' + %Trim(FmName) : *NULL);
HTH...
- Michael
On Mon, Dec 13, 2010 at 9:49 AM, Luciano Vigna
<[4]luciano.vigna@xxxxxxxxx>wrote:
>
> Hello, everyone
>
>
> How can retrieve the message response from the ftp_put command?
(i.e.
> "226 File upload OK" or any error message), we need to know if
the
> file was upload correctly or not.
>
>
> Thanks so much!
>
>
> Luciano
>
>
-------------------------------------------------------------------
---
> - This is the FTPAPI mailing list. To unsubscribe, please go to:
> [5]http://www.scottklement.com/mailman/listinfo/ftpapi
>
-------------------------------------------------------------------
---
> -
>
>
-------------------------------------------------------------------
----
This is the FTPAPI mailing list. To unsubscribe, please go to:
[6]http://www.scottklement.com/mailman/listinfo/ftpapi
-------------------------------------------------------------------
----
References
1. mailto:luciano.vigna@xxxxxxxxx
2. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
4. mailto:luciano.vigna@xxxxxxxxx
5. http://www.scottklement.com/mailman/listinfo/ftpapi
6. 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
-----------------------------------------------------------------------