<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">We have a database of about 20 million records, where each record is just over 2200 characters.  As part of our processing, we run an output process table on the entire database, and this process calls another output process table.  The
 calling process is about 1500 lines, and the called process is about 300 lines.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Up until a recent change, this all worked fine.  The change was to add a subroutine to the called process, and this subroutine included a few more variables (declared with sizes, as were the previous variables) as well as two arrays.  One
 of the arrays is 700 elements consisting of 4 digit integers, and the other array is 700 elements consisting of 20 character strings.  The arrays are not mapped to any existing fields.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The puzzling thing is that if the called program, with the new subroutine, is run by itself as a standalone program against the entire database, it works fine.  But when being called from within the calling program, it aborts about  85%
 of the way through the database.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Since the calling program/called program arrangement worked fine before the new subroutine was added, and the called program works fine on its own, our suspicion is that there is some limit on the memory allocated for called program variables
 and arrays, and we exceeded that.  Or those arrays are not being treated as dummy variables and instead, as each record is processed, a new version of each array is created and all prior ones are still hanging around.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do you think it is a memory issue?  Is there a way to specify more memory for the called program (we have PFFORMTOKSIZE set to 200000 on the assumption it might be relevant since the documentation for CALL says “the
<span style="color:#010100">called processing table uses the token area reserved for printing a form from Inquire, Update, Add</span>”)?  Is there a way to remove the arrays as processing finishes one record and moves to the next record? (We are using “clear”
 on the arrays but that probably does not change the space already allocated.)    Are there other things we should be looking at?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Our environment is FilePro 5.7.00D9 on a standalone Windows 7 PC with a 64-bit OS and 16 GB of RAM.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for any suggestions.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Rich<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</body>
</html>