T
Thiru Malai
Guest
I want to use Asynchronous method for my purposes but the problem here is when i write a query like below then program was read up to main block and it's doesn't entered into procedure section. I want to read that too.
DEFINE VARIABLE hAsynCall AS HANDLE NO-UNDO.
ASSIGN cPgmTest = Test.p
RUN VALUE(cPgmTest) ON SERVER gshAstraAppserver ASYNCHRONOUS
SET hAsynCall (INPUT 'Csv') NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
MESSAGE ERROR-STATUS:GET-MESSAGE(1).
END.
DO WHILE NOT hAsynCall :COMPLETE:
PROCESS EVENTS.
IF hAsynCall :COMPLETE THEN
MESSAGE "completed"
VIEW-AS ALERT-BOX INFORMATION.
ELSE /* Async result not ready, so do something else. */
MESSAGE "Not yet ..." VIEW-AS ALERT-BOX INFORMATION.
END.
/* Test.p*/
/* Definition*/
/*Main Block*/
DEFINE INPUT PARAMETER cData AS CHARACTER NO-UNDO.
PAUSE 5.
/*Procedure*/
/*Function*/
As you see above the program was read up to main block but if i cut the query from main block and paste into procedure block then its doesn't not entered.
Continue reading...
DEFINE VARIABLE hAsynCall AS HANDLE NO-UNDO.
ASSIGN cPgmTest = Test.p
RUN VALUE(cPgmTest) ON SERVER gshAstraAppserver ASYNCHRONOUS
SET hAsynCall (INPUT 'Csv') NO-ERROR.
IF ERROR-STATUS:ERROR THEN DO:
MESSAGE ERROR-STATUS:GET-MESSAGE(1).
END.
DO WHILE NOT hAsynCall :COMPLETE:
PROCESS EVENTS.
IF hAsynCall :COMPLETE THEN
MESSAGE "completed"
VIEW-AS ALERT-BOX INFORMATION.
ELSE /* Async result not ready, so do something else. */
MESSAGE "Not yet ..." VIEW-AS ALERT-BOX INFORMATION.
END.
/* Test.p*/
/* Definition*/
/*Main Block*/
DEFINE INPUT PARAMETER cData AS CHARACTER NO-UNDO.
PAUSE 5.
/*Procedure*/
/*Function*/
As you see above the program was read up to main block but if i cut the query from main block and paste into procedure block then its doesn't not entered.
Continue reading...