You cannot do the goback from within the input procedure as this leaves the sort before it has actually completed and leave it in an open state. What you should do in the input procedure is set a flag and then exit the input procedure and then in the output procedure test the flag and exit the procedure so that control returns to the next statement following the sort where you could then do your goback. This will cause the sort to function properly.
↧