In your subroutine change the "dynamic" option to "subprogram" in your $control line.... Brian Donaldson. On Thu, 7 Oct 2004 06:24:11 -0700, Jack Nickels <[log in to unmask]> wrote: >Hi All, > >I have two programs. A called program (program b) and >the calling program (program a). > >The way i call is as below > >Progam A >-------- > >Setup Arguement & Key >DBFIND datasetc >IF DB-OK AND CHAIN LENGTH > 0 > DBGET Mode 5 > PERFORM UNTIL End of Chain > Call 'program b' using Common Area > Parameter1 > DBGET Mode 5 > > END PERFORM >END-IF > > >Program B >--------- > >$control dynamic > >Performs DBFIND >DBGET MOde 5 >DBUPD datasetc >Goback > >Ideally, the DBGET Mode 5 in program A inside the >Perform Until chain should have been successful. But >everytime, the Perform >Until chain is exited. I am assuming that the Common >area between the called and the calling program is >causing the issue. > >Is there any way for the calling program (program a) >to retain its values in the common area that may have >got affected by the called program (Program B) > >One way of doing it is to store the pointer before >call in a local variable in program a. But is there a >cleaner solution to this. Am i missing something in >the $CONTROL parameters. > >We will not be able to keep the common area out of the >linkage section for some reasons >Thanks for your help >-Jack > > > >_______________________________ >Do you Yahoo!? >Declare Yourself - Register online to vote today! >http://vote.yahoo.com > >* To join/leave the list, search archives, change list settings, * >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html * * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *