HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

How to handle on SMG$_BATSTIPRO

Go to solution

How to handle on SMG$_BATSTIPRO

I am writing an application with use of SMG routines. For a reasonable update of the sreen I use SMG$BEGIN_PASTEBOARD_UPDATE and when the update is ready I use SMG$END_PASTEBOARD_UPDATE. But now I receive as a return code for the last function SMG$_BATSTIPRO. According to the manual this means the function acted correctly, but batching is still in progress.

I cannot find how to react on this. My application fails because a read function cannot be done while batching is active.

Who has experience with this fenomena ??

Thanks in advance,
Wim Van den Wyngaert
Honored Contributor

Re: How to handle on SMG$_BATSTIPRO

I would say that you nested BEGINS and when the END is not the last END expected, you get this warning.

Idem for BATWASOFF that indicates an END without BEGIN.


Re: How to handle on SMG$_BATSTIPRO

Hi Wim,

No that is not the case. I checked the begin_pasteboard_update and that returned SS$_NORMAL. In case an update is already in progress, it returns SMG$_BATWASON.

So that is not the problem. By the way begin/end_update_pasteboard maintains an internal counter to avoid this problem.

Ian Miller.
Honored Contributor

Re: How to handle on SMG$_BATSTIPRO

looking around using various internet searches a common approach appears to be to loop waiting until this condition is no longer reported.

while (smg$end_pasteboard_update(&pid) == SMG$_BATSTIPRO)

An alternative approach can be seen in newsmenu.c in

Purely Personal Opinion
Wim Van den Wyngaert
Honored Contributor

Re: How to handle on SMG$_BATSTIPRO

BATSTIPRO, batching is still in progress
Facility: SMG, Screen Management Facility
Explanation: A user tried to end batching (updating) with a call to

This action did not terminate batching because there were more calls to begin
batching than to end batching.

User Action: None. An outer level routine may still need batching to be in

Re: How to handle on SMG$_BATSTIPRO

It is a matter of counting inner and outer calls to the function. Your remarks made me do this and finding the solution.