Kbase 17155: Overcoming Action Code Segment Limitation (Error 3307)
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Verified
SYMPTOM(s):
Getting error 3307 trying to compile a program
<segment-name> has exceeded its limit of <segment-size> bytes, in <file-name> at line # <line-number>. (3307)
Action Segment has exceeded its limit of 63488 bytes, in <file-name> at line # <line-number>. (3307)
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.x
Progress 8.x
CHANGE:
Modified the program for maintenance or migrating code from an earlier version of Progress to a latest release
CAUSE:
The Error 3307 may come up during ordinary application development (when the program has simply grown too large), but it may occur when migrating code from an earlier version of Progress to the latest release (for example, from Version 8.x to 9.x).
In the case of code migration, the error might occur in cases where you were close to the limit in the earlier version and the added capabilities of the latest release increased the r-code enough to go over the limit.
In Progress 7.2 and before
The expression code segments contain all Progress functions and any type of expression.
In Progress 7.3x and later
There are four (4) expression code segments for each procedure.
Prior to 9.1C
There is only one action code segment for the main procedure and one action code segment for each internal procedure. The action code segment contains the Progress primitives (display, set, for each, open query, get next, find, update, etc...). If the 62K limit on an action code segment is exceeded, you encounter the error 3307.
FIX:
Chose one or more options that follows:
1) Because each internal procedure has its own action segment, you can overcome this limitation by moving the code or part of the code into internal procedures and run the internal procedures; triggers are the best candidates for this migration.
It will add you an additional 62K of action code segment in your procedure for every new internal procedure you create.
2) Reduce the size of your action code segment by combining multiple 4gl statements into one. For example, you can change:
var1 = "a".
var2 = "b".
var3 = "c".
to:
ASSIGN var1 = "a"
var2 = "b"
var3 = "c".
This executes one action instead of three, therefore a-code (the action segment) is decreased.
3) Upgrade to Progress Version 9.1C or later that supports up to four main action code segments for the main procedure (62K in each segment), and continues to support one separate action code segment for each internal procedure.