Feedback
Did this article resolve your question/issue?

   

Article

Compiler doesn't raise error 7376 when parameter is before TRANSACTION-MODE AUTOMATIC.

Information

 
TitleCompiler doesn't raise error 7376 when parameter is before TRANSACTION-MODE AUTOMATIC.
URL NameCompiler-doesn-t-raise-error-7376-when-parameter-is-before-TRANSACTION-MODE-AUTOMATIC
Article Number000186682
EnvironmentProduct: OpenEdge
Version: 11.x
OS: Windows
Question/Problem Description
Compiler doesn't raise error 7376 when parameter is before TRANSACTION-MODE AUTOMATIC.

The application compiler should raise error 7376 with temp table and prodataset parameters in procedures that start automatic transactions.  But if the parameter definition is placed before the TRANSACTION-MODE AUTOMATIC statement then the code will compile without error.  For example the following code raises the error 7376 at compile time:
 

/* This statement makes this procedure a transaction-initiating procedure */
TRANSACTION-MODE AUTOMATIC.
DEFINE INPUT PARAMETER table-handle h1.

PROCEDURE startme: /* This empty internal procedure starts a transaction */
END.

But the following code compiles without error, which is not correct:

DEFINE INPUT PARAMETER table-handle h1.
/* This statement makes this procedure a transaction-initiating procedure */
TRANSACTION-MODE AUTOMATIC.

PROCEDURE startme: /* This empty internal procedure starts a transaction */
END.


 
Steps to Reproduce
Clarifying Information
Error MessageTRANSACTION-MODE AUTOMATIC programs may not have temp-table parameters. (7376)
Defect/Enhancement NumberDefect PSC00342220
Cause
The exact cause is not known at this time.  
Resolution
None at this time.

The error 7376 should be raised by the compiler for temp table and prodataset parameters that are used in procedures that also use the 'TRANSACTION-MODE AUTOMATIC' statement, regardless of where the statements are in relation to each other.  This is because the automatic transaction starts before records are added to temp table and prodataset parameters during parameter passing.  Subsequently the 7376 error is intended to prevent these records becoming part of the transaction.  Although this only applies to temp table and prodataset parameters.  Other parameter types should not raise the 7376 error. 
 
Workaround
Move the 'TRANSACTION-MODE AUTOMATIC' statement so it is the first statement in the procedure.
Notes
References to Other Documentation:

OpenEdge Application server: Developing Appserver Applications, Chapter 2: "Programming the AppServer", "Managing transactions".
Last Modified Date10/15/2015 2:24 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.