Skip to main content

Is there any way to display a Dialog screen and have it return to the Visual COBOL program without the user having to click anything on the screen? What I am trying to do is display information regarding what my program is doing on the screen for the user to see but I do not want to stop my program from running ( I do not want to interrupt program's run time). Usually, when a Dialog screen displays, it stops the program and waits for user input (it waits for an event triggered by a button on the screen). I am trying to display a screen and have it return to the program without the user having to click on an object on the screen. I have tried the following:

********************************

SCREENSET-INITIALIZED
MOVE-OBJECT-HANDLE CLNTPROS DSMOVSZ-HANDLE-COUNT(1)
MOVE "mova" DSMOVSZ-FUNCTION(1)
CALLOUT "dsmovsz" 0 DSMOVSZ-PARAMETER-BLOCK


IF= RETC-FLAG 1 DISPLAY-AND-RETURN


DISPLAY-AND-RETURN
      RETC

*********************************

This code executes the 'DISPLAY-AND-RETURN' procedure when I move a 1 to the 'RETC-FLAG' prior to attempting to display the Dialog screen  which successfully prevents my COBOL program from being interrupted but it doesn't display the screen at all. It seems that if I want to display a Dialog screen and return to my program, I have display the screen and then have a user click on an object in order to return to my program.

 

Thanks in advance for your help!

Is there any way to display a Dialog screen and have it return to the Visual COBOL program without the user having to click anything on the screen? What I am trying to do is display information regarding what my program is doing on the screen for the user to see but I do not want to stop my program from running ( I do not want to interrupt program's run time). Usually, when a Dialog screen displays, it stops the program and waits for user input (it waits for an event triggered by a button on the screen). I am trying to display a screen and have it return to the program without the user having to click on an object on the screen. I have tried the following:

********************************

SCREENSET-INITIALIZED
MOVE-OBJECT-HANDLE CLNTPROS DSMOVSZ-HANDLE-COUNT(1)
MOVE "mova" DSMOVSZ-FUNCTION(1)
CALLOUT "dsmovsz" 0 DSMOVSZ-PARAMETER-BLOCK


IF= RETC-FLAG 1 DISPLAY-AND-RETURN


DISPLAY-AND-RETURN
      RETC

*********************************

This code executes the 'DISPLAY-AND-RETURN' procedure when I move a 1 to the 'RETC-FLAG' prior to attempting to display the Dialog screen  which successfully prevents my COBOL program from being interrupted but it doesn't display the screen at all. It seems that if I want to display a Dialog screen and return to my program, I have display the screen and then have a user click on an object in order to return to my program.

 

Thanks in advance for your help!

Try the timeout function. I think you can do e.g. TIMEOUT 500 some-procedure-name

Is there any way to display a Dialog screen and have it return to the Visual COBOL program without the user having to click anything on the screen? What I am trying to do is display information regarding what my program is doing on the screen for the user to see but I do not want to stop my program from running ( I do not want to interrupt program's run time). Usually, when a Dialog screen displays, it stops the program and waits for user input (it waits for an event triggered by a button on the screen). I am trying to display a screen and have it return to the program without the user having to click on an object on the screen. I have tried the following:

********************************

SCREENSET-INITIALIZED
MOVE-OBJECT-HANDLE CLNTPROS DSMOVSZ-HANDLE-COUNT(1)
MOVE "mova" DSMOVSZ-FUNCTION(1)
CALLOUT "dsmovsz" 0 DSMOVSZ-PARAMETER-BLOCK


IF= RETC-FLAG 1 DISPLAY-AND-RETURN


DISPLAY-AND-RETURN
      RETC

*********************************

This code executes the 'DISPLAY-AND-RETURN' procedure when I move a 1 to the 'RETC-FLAG' prior to attempting to display the Dialog screen  which successfully prevents my COBOL program from being interrupted but it doesn't display the screen at all. It seems that if I want to display a Dialog screen and return to my program, I have display the screen and then have a user click on an object in order to return to my program.

 

Thanks in advance for your help!

Try the timeout function. I think you can do e.g. TIMEOUT 500 some-procedure-name

Is there any way to display a Dialog screen and have it return to the Visual COBOL program without the user having to click anything on the screen? What I am trying to do is display information regarding what my program is doing on the screen for the user to see but I do not want to stop my program from running ( I do not want to interrupt program's run time). Usually, when a Dialog screen displays, it stops the program and waits for user input (it waits for an event triggered by a button on the screen). I am trying to display a screen and have it return to the program without the user having to click on an object on the screen. I have tried the following:

********************************

SCREENSET-INITIALIZED
MOVE-OBJECT-HANDLE CLNTPROS DSMOVSZ-HANDLE-COUNT(1)
MOVE "mova" DSMOVSZ-FUNCTION(1)
CALLOUT "dsmovsz" 0 DSMOVSZ-PARAMETER-BLOCK


IF= RETC-FLAG 1 DISPLAY-AND-RETURN


DISPLAY-AND-RETURN
      RETC

*********************************

This code executes the 'DISPLAY-AND-RETURN' procedure when I move a 1 to the 'RETC-FLAG' prior to attempting to display the Dialog screen  which successfully prevents my COBOL program from being interrupted but it doesn't display the screen at all. It seems that if I want to display a Dialog screen and return to my program, I have display the screen and then have a user click on an object in order to return to my program.

 

Thanks in advance for your help!

Linden,

Your suggestion worked! Thank you!