Thanks Rich, that's a good suggestion.  Unfortunately, I am switching to the same screen, just to a different field, and switchto doesn't look like it has a field parameter.  I don't know any way other than a screen command to reposition the cursor in a particular field.
<br><br>I'm curious - how do you know it resets the counter?&nbsp; The documentation in the manual is quite sparse on switchto.&nbsp; And why does switchto but not screen result in the counter reset if you call it from a wef/wlf?&nbsp; I still think that the reset is implied in &quot;
<font style="font-size: 10pt;">@WLF and @WEF processing are not considered Input processing.  These routines run independently from Input processing&quot;.&nbsp; <br><br>Tyler<br></font><br><br><br><div><span class="gmail_quote">
On 2/17/06, <b class="gmail_sendername">GCC Consulting</b> &lt;<a href="mailto:gccconsulting@comcast.net">gccconsulting@comcast.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">





<div dir="ltr" align="left"><font color="#0000ff" face="Arial" size="2"></font>&nbsp;</div><br>
<blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
  <div dir="ltr" align="left" lang="en-us">
  <hr>
  <font face="Tahoma" size="2"><b>From:</b> 
  filepro-list-bounces+gccconsulting=<a href="mailto:comcast.net@lists.celestial.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">comcast.net@lists.celestial.com</a> 
  [mailto:<a href="mailto:filepro-list-bounces+gccconsulting=comcast.net@lists.celestial.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">filepro-list-bounces+gccconsulting=comcast.net@lists.celestial.com
</a>] 
  <b>On Behalf Of </b>Tyler<br><b>Sent:</b> Friday, February 17, 2006 3:22 
  PM<br><b>To:</b> <a href="mailto:filepro-list@lists.celestial.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">filepro-list@lists.celestial.com</a><br><b>Subject:</b> GOSUB and 
  SCREEN<br></font><br></div><div><span class="e" id="q_10979de444b7970a_1">
  <div></div>
  <div>This is a question more out of curiousity than anything else; I've 
  already coded around it, though it's an ugly kludge using a flag.<br><br>I 
  have a driver program built into a dummy file's input processing that is used 
  to mediate between various files and makes system calls to allow editing of 
  these related files.&nbsp; I was getting errors &quot;Too many gosubs&quot; after users 
  had used it for processing a lot of data,&nbsp; I couldn't imagine why, as I 
  impose pretty strict structure on all new processing.&nbsp; Since it was 
  structured code, it was easy if somewhat tedious to record each gosub call and 
  return - basically building a stack tracer, since the debugger doesn't seem to 
  have one (which would be REALLY handy for tracing spaghetti logic GOTOs). 
  <br><br>The non-returning culprit was a subroutine that had a SCREEN command 
  before the return.&nbsp; This sub was called from input processing wef/wlf 
  routines.&nbsp; This caused a slow build up of non-returned gosubs in 
  filePro's gosub counter.&nbsp; Does the screen command not clear out the gosub 
  counter/stack when the gosubs are called in the wef/wlf processing and wef/wlf 
  processing ends?&nbsp; I would think it should:&nbsp;<br><span><font color="#0000ff" face="Arial" size="2">&nbsp;</font></span></div>
  <div><span></span>&nbsp;</div><font color="#0000ff" face="Arial" size="2"></font>
  <div><br>&quot;<font style="font-size: 10pt;">When a SCREEN command is encountered 
  during @WLF or @WEF processing, the user is put into update mode on the 
  designated screen. When the user presses &lt;ESC&gt; to record the input on 
  this screen, processing ends. @WLF and @WEF processing are not considered 
  Input processing. These routines run independently from Input processing, and 
  do not affect the position of the Input processing's execution pointer. Each 
  @WLF and @WEF routine has its own pointer, and processing ends for these 
  special routines only when one of the specific @WLF, @WEF &quot;closing&quot; commands 
  is encountered. SCREEN is one of these commands.&quot;</font><br><br>Tyler 
  Style<br><span><font color="#0000ff" face="Arial" size="2"></font></span></div>
  <div><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div></span></div>
  <div><span><font color="#0000ff" face="Arial" size="2">Use 
  switchto&nbsp;&quot;screen_name&quot; &nbsp;instead of screen.&nbsp; Screen ends 
  processing and will leave the counter as is.&nbsp;</font></span></div>
  <div><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
  <div><span><font color="#0000ff" face="Arial" size="2">See 
  description below.</font></span></div>
  <div><span><font color="#0000ff" face="Arial" size="2"></font></span>&nbsp;</div>
  <div><span>
  <p><font size="2">Richard Kreiss<br>GCC Consulting<br>&nbsp;</font> 
  </p></span></div>
  <div><span></span>&nbsp;</div>
  <div><span>
  <h1>SWITCHTO</h1>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p style="margin-bottom: 2.5pt;"><font style="font-weight: bold; color: rgb(1, 1, 0);">Syntax:</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p><font style="color: rgb(1, 1, 0);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: 
  SWITCHTO name</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p><font style="color: rgb(1, 1, 0);">&quot;name&quot; is the 
  name of screen to switch to.</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p style="margin-bottom: 2.5pt; text-indent: 6pt;"><font style="font-weight: bold; color: rgb(1, 1, 0);">Version 
  Ref:</font><font style="color: rgb(1, 1, 0);">&nbsp;4.5</font><font style="font-weight: bold; color: rgb(1, 1, 0);"> 
  </font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p style="margin-bottom: 2.5pt;"><font style="font-weight: bold; color: rgb(1, 1, 0);">Description:</font></p>
  <p><font style="color: rgb(1, 1, 0);">Switch to a 
  different screen, without returning to the original screen upon ending 
  processing (which is the default operation of the SCREEN command which also 
  switches screens). Normally, when INPUT processing ends you are returned to 
  the SCREEN you were on when processing started. The SWITCHTO displays a 
  specific screen, and sets it to be the screen to be returned to, instead of 
  the original screen.</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p style="margin-bottom: 2.5pt;"><font style="font-weight: bold; color: rgb(1, 1, 0);">Examples:</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p><font style="color: rgb(1, 1, 0);">@keyP&nbsp;&nbsp;&nbsp;&nbsp;If:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: 
  switchto &quot;pay&quot;;end</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p><font style="color: rgb(1, 1, 0);">Allow only 
  certain users access to screen 9.</font></p>
  <p style="margin-top: 0px; margin-bottom: 0px;">&nbsp;</p>
  <p><font style="color: rgb(1, 1, 0);">@key9&nbsp;&nbsp;&nbsp;&nbsp;If: 
  &quot;*root*kenb*ronk*lauraw*&quot; co (&quot;*&quot; &amp; @id &amp; 
  &quot;*&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: switchto &quot;9&quot; ; 
  end<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Then: 
  errorbox &quot;You are not authorized for screen 9.&quot; ; end<br></font></p>
  
  &nbsp;</span></div></blockquote>

</blockquote></div><br>