sponsored links



No announcement yet.

DSPF not updating because of break message, how to get around ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • DSPF not updating because of break message, how to get around ?


    I have a program with a subfile DSPF. On CTL1, there's function key F5 that when pressed, will submit a batch job to recalculate the records of the file that the subfile displays. What I do is I submit the job, wait for it to finish (by checking a value in a data area that is updated by the batch job), then I reload the subfile. However, the subfile is never refreshed.

    Afer digging around, it would seem to be because of the break message of the submitted job completion. I would need to do the EXFMT CTL1 once the user has pressed enter on the break message, but I have no way of knowing when this has occured.

    I've tried compiling with RSTDSP *YES but this only shows whatever records were in the subfile BEFORE pressing F5. I would like to avoid leaving the program and forcing the user to go back in.

    Any ideas? Thanks.

  • #2
    There's an option on the SBMJOB command: Message queue . . . . . . . . . MSGQ:

    "Specifies the message queue to which a completion message
    is sent when the submitted job has completed running,
    either normally or abnormally. If an abnormal ending
    occurs, the help information for the completion message
    specifies the possible causes."

    *NONE is "No completion message is sent."




    • #3
      I had thought about deactivating the completion message but couldn't find out how.

      After modification, still doesn't work, so the problem must not come from the break message. If I debug and do step by step from the job submission to the EXFMT CTL1, it works. However, if I jump directly from (after) the submission to the EXFMT, it doesn't work. Not sure what the problem is but I'll keep looking.

      Thanks for the reply.

      EDIT : I was letting the submitted job do the reinitialization of the data area. Turns out the calling program is quicker than the submitted job and so the calling program would read that the calculation had finished before the submitted job had a chance to reinitialize the data area. By reinitializing the data area in the calling program, everything works fine.
      Last edited by JustPassing; 3 weeks ago.