Building a selection set on the fly

Don Coleman dcoleman at dgcreact.com
Wed Feb 23 10:31:32 PST 2005


Nancy Palmquist wrote:

> Don Coleman wrote:
>
>> 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 -------   -   -   -   -   -   -   -
>
>
> On a selection table you do not enter quotes.  You just need to put JBP.
>
> If you want quotes, you type  \"JBP\"
>
>    -   -   -   -   -   -   -   -   -
>
>>         If:
>>       Then: 
>> use(10)=":::";use(11)=":::";use(12)=":::";use(13)=":::";use(14)=" 
>>             "
>>  30 -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   
>> -   -
>> finsel   If:
>>       Then: write use;close use
>>
>> Thanks,
>>
>> Don Coleman
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
>>
>
>
Nancy:

I tried it both ways,
w/o the quotes use(5)=":4:eq:"{"JBP"
and with the backslashes & quotes use(5)=":4:eq:"{\"JBP\"

both methods fail the syntax check.  Am I misunderstanding?

Don Coleman


More information about the Filepro-list mailing list