Selection set question
Bruce Easton
bruce at stn.com
Wed Nov 14 08:18:20 PST 2007
Bruce Easton wrote Wednesday, November 14, 2007 10:56 AM:
> Don Coleman wrote Wednesday, November 14, 2007 10:24 AM:
> >
> > I have a select table which builds a selection set in a file
> via an ascii
> > export and then runs system to generate a report using the exported
> > selection set. My problem is one of the selection set's criteria is
> > facility code (field #9). As this customer adds on new customers
> > they have
> > begun to use facility codes which have the first several
> > characters the same
> > (ex: IY, IYCC, IYCS, IYCJ). The application is making a match
> on what it
> > can and is selecting more than the one I really want, in this
> > case facility
> > code IY. I don't have much control over the facility code, as it enters
> > filePro via import and socket connections from two alien
> > applications. The
> > relevant portion of the select table is below. Is there a way
> to have the
> > selection set make only exact matches?
> >
> > Nov 14, 2007 10:14 File Name: QS1
> > Page 1
> > Processing: Selrecon
> >
> > 23 ------- - - - - - - - - - - - - -
> > - - -
> > noctl If:
> > Then: RF="E:\QS1\TODO\FILEPRO\QS1\DOUBLE.SEL"{""
> > 24 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then: export ascii use=(RF) f=\n
> > 25 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then: use(1)="";use(2)=":9:eq:"{AB;use(3)=":150:eq:"{"Y"
> > 26 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then: use(4)=":66:eq:"{@td
> > 27 ------- - - - - - - - - - - - - -
> > - - -
> > If: 9 eq "MTSP" and AC eq "A"
> > Then: use(5)=":4:eq:LRL";goto montana
> > 28 ------- - - - - - - - - - - - - -
> > - - -
> > If: 9 eq "MTSP" and AC eq "D"
> > Then: use(5)=":4:ne:LRL";goto montana
> > 29 ------- - - - - - - - - - - - - -
> > - - -
> > If: 9 eq "MTWP" and AC eq "A"
> > Then: use(5)=":4:eq:LRL";goto montana
> > 30 ------- - - - - - - - - - - - - -
> > - - -
> > If: 9 eq "MTWP" and AC eq "D"
> > Then: use(5)=":4:ne:LRL";goto montana
> > 31 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then: use(5)=""
> > 32 ------- - - - - - - - - - - - - -
> > - - -
> > montana If:
> > Then: use(6)=":::";use(7)=":::";use(8)=":::";use(9)=":::"
> > 33 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then:
> > use(10)=":::";use(11)=":::";use(12)=":::";use(13)=":::";use(14)="
> > ";goto finsel
> > 34 ------- - - - - - - - - - - - - -
> > - - -
> > finsel If:
> > Then: write use;close use
> > 35 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then: RE(70,*)="E:\FP_SETUP_FILES\FP5.0.13\FP\RREPORT QS1
> > -F DOUBLECK
> > -S
> > DOUBLE -U"
> > 36 ------- - - - - - - - - - - - - -
> > - - -
> > If:
> > Then: system RE
> >
> >
> > Don Coleman
>
> Don, try building your selection set with two lines for
> the facility code (they should be "and'ed", not "or'ed")
> as follows:
>
> 9 lt AB{"@"
> 9 ge AB
>
> Use a non-blank printable ascii char (that doesn't have
> special use by filepro) lower than the lowest ascii char
> that's legal in your facility code in place of the "@"
> above. (For instance, if the facility code allows numerals
> and chars only, you should be able to use a period.)
>
> Bruce
>
I tested my method above more, and it works fine, but only
if you always will have an extra byte at the end of the
facility code to put the "@" or whatever character
you would use. To enforce fully, that would require
a reserved byte that people cannot get to - expanding
your field, always capturing input for the field from
users in a dummy field - ugg.
I see others chiming in about building the selection
set as a "cumbersome" method for doing the selection
and I agree - now is the perfect time for you to
get all of the selection under the control of
a selection processing table.
Bruce
Bruce Easton
STN, Inc.
More information about the Filepro-list
mailing list