|
Hi all,
I'm attempting to write to the joblog usng API Qp0zUprintf. I'm on V7 on
the IBM i.
My code follows:
* Procedure for writing to the joblog
D WriteToJobLog...
D PR 10I 0 ExtProc('Qp0zUprintf')
D szOutputStg * Value OPTIONS(*STRING)
D * Value OPTIONS(*STRING:*NOPASS)
d rc s 10i 0
d sqlString s 100a inz('CREATE PROCEDURE')
d COMPILEERROR c 'Compile error.'
/free
// Attempt to create the statement
Exec SQL
EXECUTE IMMEDIATE :sqlString;
// Check if it was created successfully
If sqlState = SQLSUCCESS;
// Do something
dsply 'Success' ' ';
Else;
errmsg = COMPILEERROR;
rc = WriteToJobLog('CREATE OR REPLACE PROCEDURE FAILED...' +
'\n' + X'25');
dsply 'BooHoo' ' ';
Endif;
/End-free
When I execute the WriteToJobLog procedure rc = 40 therefore 40 characters
were written. But when I display the joblog I can not see the message but
I
do see the dspmsg BooBoo.
Can anyone see what I'm doing wrong?
Thanks,
Robert Rogerson
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.