PDISK PRN clears out active select list? (AREV Specific)
At 14 JUN 1999 10:04:45AM Michael Slack wrote:
Here a little puzzler (at least to me). I'm hoping that someone may be able to point me in the right direction.
In createing a simple report program, I ran across a situation where the 'PERFORM "PDISK PRN"' clears out the active select list. Can anyone tell me about this?
The program I've written is a simple and straight forward report program. It selects the rows from a table. While looping thru the select list and reading each of the rows it sends each row to be printed out as a single report. Each row of data is a report unto it self. I'm using 'PRINTER ON' and 'PRINTER OFF', 'PERFORM "PDISK PRN"'. Where the actual PRINT commands to generate the report is between the two PRINTER commands. I use the PDISK command right after the 'PRINTER OFF' statement to get things set-up so that the next report will start fresh at the top of the next page.
In testing the program, all I was getting was a single report printed out. In trqacking down the problem I found it to be the PDISK command. I then modified LOOP right after the SELECT statement to first store all of the ID's from the SELECT statement into and array. Then looped thru the array to create the reports. This worked and is currently doing the job but I'm wondering why do I need to do the extra step.
The style of report I'm doing is a bit out of the ordinary but the process it self is simple and straight forward. The report, instead of accumilating all of the selected rows together to create a single report actually takes a single row and creates a single stand alone report. I'm surprised to find that apparenly the PDISK command clears the select list. Can anyone enlighten me as to why this happend? Or what I may have done wrong in the first place? Can anyone point me in the right direction on where I might find more inforation on this subject.
Thank you for your time.
Michael Slack
At 14 JUN 1999 10:07AM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
I have a feeling EXECUTE PDISK PRN might do the trick. If so, remind me and I'll explain why.
akaplan@sprezzatura.com
At 14 JUN 1999 11:55AM Michael Slack wrote:
Thanks for the info. I put the code back to it's origianl configuration and used the 'EXECUTE "PDISK PRN"' as you suggested. The test worked great. It worked like I expedted the 'PERFORM "PDISK PRN"' to have worked.
Can you point me in the direction where I can find out why the 'PERFORM "PDISK PRN"' acted as it did?
Thanks again,
Michael Slack
At 14 JUN 1999 01:33PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:
I don't have any manuals here, so I can't give page reference numbers, but look at the documentation for the PERFORM statement, the EXECUTE statement and TCL levels.
The short answer is PERFORM keeps you on the same TCL level. EXECUTE moves you up a level. When you perform something, it will exhaust an existing active list. When you execute it creates a new copy, keeping the list as it is.
akaplan@sprezzatura.com
At 15 JUN 1999 09:37AM Michael Slack wrote:
That sounds very resonable. Thanks for the information.
Michael Slack