To MiggyD:
Thanks for the reply. I used 'Shell' rather than 'Run' for sorting.
This latest application of mine used 6 programs all linked with 'Run'. The application hopped from program to program as needed. Each of these progs generated a 'carry.dat' file on exit which was used to provide the next prog with variables it would require, and instructions on which of its various sections to use - the Print prog, for example, dealt with the printout of two databases and various sorted lists of results. So in effect each program, although self-contained, was working under instruction from its previous program. Included in the 'carry.dat' was the name of the program that the new prog was to return to when it had finished.
The application included a database of club membership, and because the club was growing, the list could be as long as a piece of string! So I used a commercial sort program because of memory limitations when sorting large arrays. I used 'shell' because it provided a means to use the sort prog and then get back in to QB where it had left off. The Print and Database progs both needed to sort.
The 'Run' statement would have ended the app when the sort prog had finished because there was no 'forwarding' information in the sort prog. I suppose I could have used a Batch file but I thought that was a bit 'messy'.
So I was pleased to read the enquiry from BobTheMad - it stirred the grey matter and prompted me to find a solution.
Keep up the good work you programmers - every reply you give to a query is a gem, and with every one I read, I learn something!