|
And.. I'm not sure how to put the code below in an rpg program withsession.
"exec sql"
The filename and path would always be variable.
I'm not 100% sold on using the joblog - it's way to verbose for what I
want. I would like to just see the FTP commands and results (i.e.
like you would see in an interactive session)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Marco Facchinetti
Sent: Tuesday, December 16, 2025 12:04 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: FTPAPI
With Sql it's very easy:
BEGIN
CALL QSYS2.IFS_WRITE(
PATH_NAME *=>* '/tmp/logsample',
LINE *=>* '',
FILE_CCSID *=>* *1200*,
OVERWRITE *=>* 'REPLACE',
END_OF_LINE *=>* 'NONE'
);
FOR SELECT (*CHAR*(MESSAGE_TIMESTAMP) || ' - ' || MESSAGE_TEXT) AS
LOGLINE
FROM TABLE (
QSYS2.JOBLOG_INFO('216955/MYUSER/MYJOB')
)
DO
CALL QSYS2.IFS_WRITE(
PATH_NAME *=>* '/tmp/logsample',
FILE_CCSID *=>* *1200*,
LINE *=>* LOGLINE,
OVERWRITE *=>* 'APPEND',
END_OF_LINE *=>* 'CRLF'
);
END FOR;
END;
HTH
--
Marco Facchinetti
Mr S.r.l.
Tel. 035 962885
Cel. 393 9620498
Skype: facchinettimarco
Il giorno mar 16 dic 2025 alle ore 16:16 Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx> ha scritto:
I use Scott's LIBFTP (FTPAPI) occasionally instead of an FTP Script
when exchanging data.
I would like to have a simple "text" log on the IFS for each FTP
https://protect.checkpoint.com/v2/r01/___https://www.totalbizfulfillment.comWith a script, I override OUTPUT to a PF in QTEMP, then usingto
CPYTOIMPF
create the text file.
(As CYA, I typically have DIR or LS in the script before I get and
remove
files)
With FTPAPI, the logging can go to the joblog by enabling FTP Logging.
So, I'm considering using CPYSPLF to send the entire joblog to the IFS.
Just wondering if anyone has done something similar?
TIA,
Greg
[Logo]<
Greg Wilburnhttps://protect.checkpoint.com/v2/r01/___https://lists.midrange.com/mailman/
Director of IThttps://protect.checkpoint.com/v2/r01/___www.totalbizfulfillment.com__
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@totalbizfulfillment
.com
1 Corporate Dr
Grantsville, MD 21536
_.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplYTE0YmZlMWIxMjFhNTMzMDhkYTQ0
Y2Y2OTAzYzY2Mjo3OjE3MzA6Y2RjMjcwM2Q2NmRlYzFjZjE0MGY1NWQ1ZDM4NDZkZjM2Nj
VjM2NhN2M0MGI5MmQ2M2RlNTYwZjdiMDA3MWM2MDpwOlQ6Rg
<
https://protect.checkpoint.com/v2/r01/___http://www.totalbizfulfillmen
t.com___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplYTE0YmZlMWIxMjFhNTMzM
DhkYTQ0Y2Y2OTAzYzY2Mjo3OmUxODY6NjgyMTU2Nzk0MTBiMzQ2ZDc1MWMwMGMzZGI3MjZ
iYzUzYWFkOWNlYTgwYzI3ZDQyMzRmMmZhYjE5NTk1YzA0YTpwOlQ6Rg
https://protect.checkpoint.com/v2/r01/___https://lists.midrange.com/ma
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post
a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
ilman/listinfo/rpg400-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplYTE
0YmZlMWIxMjFhNTMzMDhkYTQ0Y2Y2OTAzYzY2Mjo3OmY2YmU6NjdlMjI4ZDdkZjhiODI2Y
mZkYjIyYjkzOTc1Y2ZjMmM0NjUyMWFiOTMyNDU1NjJmMjRlODU1Y2I4MDk5MjE0OTpwOlQ
6Rg
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxxhttps://protect.checkpoint.com/v2/r01/___https://archive.midrange.com/
Before posting, please take a moment to review the archives at
rpg400-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzplYTE0YmZlMWIxMjFhNT
MzMDhkYTQ0Y2Y2OTAzYzY2Mjo3OjFiN2I6MTZmNmM2YjUwMmI3NDFjMGIwMDYyZTJkNjJj
Y2ZhOTAwM2JmZGVjZTQwNTYzZTRiZjViZDU3MmEyYmU3YjJiMTpwOlQ6Rg
.
--
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxxhttps://protect.checkpoint.com/v2/r01/___https://archive.midrange.com/rpg400
Before posting, please take a moment to review the archives
at
.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Greg Wilburn
Director of IT
301.895.3792 ext. 1231
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.