1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How do i call the procedure section in external program from window application using...

Discussão em 'StackOverflow' iniciado por fdantas, Julho 26, 2019.

  1. fdantas

    fdantas Administrator Moderador

    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...

Compartilhe esta Página