Building a selection set on the fly
Don Coleman
dcoleman at dgcreact.com
Wed Feb 23 08:03:05 PST 2005
List:
I use the code posted below to build a small 3 line selection set on the
fly. Now, for one customer, my client needs me to add a fourth
selection criteria. On the line
if 9 eq "MTSP
then goto montana
*report errors out on the write use;close use located on line #30. Can
anyone see what I am doing wrong on lines 27-28 that is causing this
problem? The only difference is when filling in the use(5) field. I
manually set up the selection set and opened it with a text editor and
it looks as I would expect it to look. It passes the syntax check but
errors out at run-time with a memory error on multiple PC's. If field 9
ne "MTSP" the program still functions fine. fPv5.0.13 on Win98SE and XP
Pro clients, Win2000 Advanced Server. The sample code below is from the
-v (select) process.
19 ------- - - - - - - - - - - - - - - - -
noctl If:
Then: RF="E:\QS1\TODO\FILEPRO\QS1\DOUBLE.SEL"{""
20 ------- - - - - - - - - - - - - - - - -
If:
Then: 'RF="C:\RXPRISON\FILEPRO\QS1\DOUBLE.SEL"{""
21 ------- - - - - - - - - - - - - - - - -
If: 9 eq "MTSP"
Then: goto montana
22 ------- - - - - - - - - - - - - - - - -
If:
Then: export ascii use=(RF) f=\n
23 ------- - - - - - - - - - - - - - - - -
If:
Then: use(1)="";use(2)=":9:eq:"{AB;use(3)=":150:eq:"{"Y"
24 ------- - - - - - - - - - - - - - - - -
If:
Then:
use(4)=":66:eq:"{@td;use(5)="";use(6)=":::";use(7)=":::";use(8)="::
:";use(9)=":::"
25 ------- - - - - - - - - - - - - - - - -
If:
Then:
use(10)=":::";use(11)=":::";use(12)=":::";use(13)=":::";use(14)="
";goto finsel
26 ------- - - - - - - - - - - - - - - - -
montana If:
Then: use(1)="";use(2)=":9:eq:"{AB;use(3)=":150:eq:"{"Y"
27 ------- - - - - - - - - - - - - - - - -
If: AC eq "A"
Then:
use(4)=":66:eq:"{@td;use(5)=":4:eq:"{"JBP";use(6)=":::";use(7)=":::
";use(8)=":::";use(9)=":::"
28 ------- - - - - - - - - - - - - - - - -
If: AC eq "D"
Then:
use(4)=":66:eq:"{@td;use(5)=":4:ne:"{"JBP";use(6)=":::";use(7)=":::
";use(8)=":::";use(9)=":::"
29 ------- - - - - - - - - - - - - - - - -
If:
Then:
use(10)=":::";use(11)=":::";use(12)=":::";use(13)=":::";use(14)="
"
30 ------- - - - - - - - - - - - - - - - -
finsel If:
Then: write use;close use
Thanks,
Don Coleman
More information about the Filepro-list
mailing list