Transaction Warnings

CarlingKirk

New Member
Hi! I'm new to Progress, but learning fast and well for some months now. I love lurking on this forum. :blush:

My question is a little rhetorical, but I still can't get a grip on some of the ways Progress handles transactions.

If I code:
Code:
do transaction:                
   find first customer.        
   do transaction:             
      find first order.        
      do transaction:          
         find first order-item.
      end.                     
   end.                        
end.
I get the warning "** WARNING--TRANSACTION keyword given within actual transaction level. (214)".

If I take away the transaction, obviously, the warning goes away. What is the big difference between "do" and "do transaction"?

And if I want each of those transactions to complete in its own block, what should I do besides "do transaction" and not get that error?
 
Hi CarlingKirk,
I got this information from a tutorial couple of months back. Please have a look at the below quotes and try to figure out something from the stuffs provided below; Correct me if i am wrong at any point.

Reason:
-------
Connecting to a sixth database in single user mode, the user will get the PROGRESS error 43 or 609, with the BTOS error code 214.

The BTOS/CTOS status codes manual says the following regarding the 214 error code (which is TOTALLY misleading in this circumstance):

File Management: No free file number.

Problem:
--------
The problem has NOTHING TO DO WITH FCB's OR UCB's! Currently there is a limit imposed by the BTOS C language as to the number of files which
can be opened using the C language "open()" function. This limit is hard coded at 20.

PROGRESS uses this function to open the database files: .db, .lg, and .bi. It is also used to open the .cfg file, the .env file, and the promsgs file.

The BTOS C functions maintain a fixed length array of file descriptors, and connect to six databases simultaneouly exceeds the capacity of this array.

Fix:
---
To fix the problem, the user will have to have the BTOS C source installed on his machine. The offending array, and hard-coded limit is in the file "<BTOSCLIB>ctosio.c". This file will have to be altered, recompiled, and then PROBUILD used to recreate the run-files.

In the file ctosio.c the definition of the constant NFDS must be changed on line #19:

#define NFDS 20

to a number large enough for the number of databases that the user expects to connect to, i.e.:

#define NFDS 50

Next, the array must be initialized for the correct number of file descriptors. The array definition and initialization begins on line #25:

static struct filedesc {
long fd_loc;
long fd_eof;
int fd_xfd;
} _fdesc_[NFDS] = {
{ 0, 0, -1 }, /* 0 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 5 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 10 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 15 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 19 */
};

This array should simply be extended so that all array elements are initialized.

static struct filedesc {
long fd_loc;
long fd_eof;
int fd_xfd;
} _fdesc_[NFDS] = {
{ 0, 0, -1 }, /* 0 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 5 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 10 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 15 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 20 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 25 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 30 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 35 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 40 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 45 */
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 },
{ 0, 0, -1 }, /* 49 */
};


The user will have to create a link submit file using PROBUILD for whatever runfiles he wants to increase this limit to.

The modified file ctosio.c will have to be compiled, and the object file manually added to the link submit. Use the BTOS editor for this. The link submit contains a list of object files to be linked into the runfile. Add the new ctosio.obj anyplace after the file "[sys]<BTOSC>c0l.obj".

I hope the above stuff would have helped you to figure out the issue. To my knowledge i have provide you with the stuffs. If i get to know more information on this i will provide you with the stuffs.

Will keep you posted. :jump:
 
When you start an transaction (either implicit or explicit) you get a warning when you try to start another tranaction. This is to warn you that your transaction scope is bigger then you probably suspect. If you really want to do a subtransaction without getting the warning when compiling then put the transaction in another procedure and run that from within the main transaction.

Code:
do transaction:                
   find first customer EXCLUSIVE-LOCK.        
   RUN subtrans.
end.
 
PROCEDURE subtrans:
  do transaction:             
     find first order EXCLUSIVE-LOCK.
     RUN subsubtrans.
  end.                        
END PROCEDURE.
PROCEDURE subsubtrans:
  do transaction:          
      find first orderline EXCLUSIVE-LOCK.
  end.                     
END PROCEDURE.

also look at kb P8448 for some explanation on blocks with transaction properties: http://progress.atgnow.com/esprogress/Group.jsp?bgroup=progress&id=P8448


HTH,

Casper.

Hi! I'm new to Progress, but learning fast and well for some months now. I love lurking on this forum. :blush:

My question is a little rhetorical, but I still can't get a grip on some of the ways Progress handles transactions.

If I code:
Code:
do transaction:                
   find first customer.        
   do transaction:             
      find first order.        
      do transaction:          
         find first order-item.
      end.                     
   end.                        
end.
I get the warning "** WARNING--TRANSACTION keyword given within actual transaction level. (214)".

If I take away the transaction, obviously, the warning goes away. What is the big difference between "do" and "do transaction"?

And if I want each of those transactions to complete in its own block, what should I do besides "do transaction" and not get that error?
 
Back
Top