Re: FTPAPI
Marco Facchinetti <marco.facchinetti-kthxv0ud/[email protected]>
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <CAMsgu4qb+5DjCzZuCFjygOQTrcg_63a+Hcx=-SE5FZKah2tO0w@mail.gmail.com> |
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-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]> 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 session.
> With a script, I override OUTPUT to a PF in QTEMP, then using CPYTOIMPF to
> 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]<https://www.totalbizfulfillment.com/> Greg Wilburn
> Director of IT
> 301.895.3792 ext. 1231
> 301.895.3895 direct
> gwilburn-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]<mailto:gwilburn-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]>
> 1 Corporate Dr
> Grantsville, MD 21536
> www.totalbizfulfillment.com<http://www.totalbizfulfillment.com>
> --
> This is the RPG programming on IBM i (RPG400-L) mailing list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/rpg400-l.
>
> Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related
> questions.
>
>
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.