Hallo,
I am writing an application calling a procedure on an application server asynchronous. This procedure updates a record in the database and writes an entry into the log-file of application server to document this action. The log-entry is very important. We use this entry to show our customers that an action has performed if they are in doubt
For this purpose I have created an application server with operating mode state-free.
In my client program I have connected the application server.
On application server I have executed the procredure using keyword ASYNCHRONOUS and specifying a procedure to call back after execution.
Everything works fine: The record in the database were all updated. The procedure was called back for each call. Unfortunately not all entries in the log-file were written.
Has anyone an idea what could be the reason of my problem?
Kind regards
Kai Siegele
Hallo Peter,
that's the line to fill the log:
LOG-MANAGER:WRITE-MESSAGE(SUBSTITUTE("FindAllTransaction(&1) => &2", STRING(transactionNumber, "999999"), resultMessage)).
Kind regards
Kai
Hallo Brian,
thanks for your reply, but I have not understood your question. The full Statement of invoking procedure on application Server is:
RUN c:\pro11\apl\wuc\findtransaction.p ON hAppSrv ASYNCHRONOUS SET hCallbackProcedure EVENT-PROCEDURE "StoreFindResult" IN this-procedure (INPUT transactionStatus, INPUT counter, OUTPUT result) .
Does it answer your question?
Kind regards
Kai
Kai,
Are you calling the log-manager on the server (it's not clear)? If so, the WRITE-MESSAGE() statement should work, and should write immediately. If it doesn't then you should contact Tech Support.
Also, you don't have to use STRING inside a SUBSTITUTE() statement if you don't want to. The SUBSTITUTE function takes all types (including unknown values) and converts/prints them nicely.
Hallo Peter,
thanks for your answer and the tip with the Substitute method.
Indeed it's the log-Manager on the Server. This one I see when invoking fathom in ie and invoking "Log file Viewer of Server" for the aplication Server.
Kind regards
JKai
[quote user="Peter Judge"]
Also, you don't have to use STRING inside a SUBSTITUTE() statement if you don't want to. The SUBSTITUTE function takes all types (including unknown values) and converts/prints them nicely.
[/quote]The string is being formatted with leading zeroes which substitute will not do by itself.