>> Can anyone help explain this behavior or offer a workaround that saves me >> from handling it with line counters and printing my own >> headings?Cheers,Kebbon >> _______________________________________________ Perry's approach is the correct one. If you want to know what's happening ...
Because you're printing from within your own program, the "Q to quit" code is executing at the same EXECUTE level as your program. And guess what - the "quit" terminates the current EXECUTion level! So Perry's comment about EXECUTing a program to do the list-and-print is the right one. BUT - *a* *couple* *of* gotchas! If you write a program that assumes there's a select list (a sensible approach?) the select list is not always (iirc) passed between execute levels. That's caught plenty of people in the past. And - This is the point where PERFORM and EXECUTE differ. They're almost interchangeable, but not here, and I think it's both product and flavour dependant. Probably EXECUTE always creates a new execution level, but iirc Prime didn't have the concept of execution levels, so PERFORM didn't create a new one :-) Anyways, suck it and see, but at least you now know the what and the why. Cheers, Wol _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
