Page 1 of 1

insert file full crash msgw

Posted: Fri Mar 31, 2017 10:30 am
by pkenosky
Hello,

Im adding a record to a file through profoundui, and when the file gets full profoundui crashes because the pgm goes into a msgw status due to a message waiting to be replyed from qsysopr to increase the file size.

How do you handle this so the pgm does not crash?

Thanks,
Paul Kenosky

Re: insert file full crash msgw

Posted: Fri Mar 31, 2017 9:39 pm
by Scott Klement
If you use our "batch session controller" (also called "rich display session controller") the job will always end if it reaches MSGW state. That is the way it works -- so your best bet is to try to prevent it from reaching that state. Write your programs so they don't go to MSGW state using MONITOR in RPG, MONMSG from CL, etc.

If its important that they are allowed to go to MSGW, then you may wish to run them inside Genie, which will allow MSGW status without problems.

Hope that helps

Re: insert file full crash msgw

Posted: Mon Apr 03, 2017 10:35 am
by pkenosky
I am using the BSC "batch session controller"...

If their is a record lock and I monitor it.. I can handle it in the on-error routine of the monitor which is great.

However, If i wrap a 'Write' or 'insert into ' command with a monitor, and the file is full it crashes on the client side and on the server side it NEVER goes into the on-error routine of the monitor, and it will continue until it finishes or it hits a EXFMT command.

Any suggestions on how to prevent this from going to MSGW?

Thanks,
Paul Kenosky

Re: insert file full crash msgw

Posted: Mon Apr 03, 2017 10:43 am
by Scott Klement
You could change your file so that it doesn't run out of space for new records.

Most shops that I know of either set their file sizes large enough that this would only happen very rarely (unless something is wrong) or else they use *NOMAX so that it never happens.

Of course, you could always ask IBM to make a change so that it will send you a monitor-able message when this situation occurs.