Re: [U2] Indexes have disappeared
I just found out that the original indexes had a virtual path (correct terminology?) (../directory.name), which didn't work with the new version of UniVerse (10.2.7), so our vendor changed them to a physical path (u2/ directory.name), which didn't match our other system. So now we do a SET.INDEX every day after the copy from computer A to computer B. Fun. -- Louie in Seattle http://directory.name --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes have disappeared
What was your old revision? If this was changed then it was changed for the worst. Jerry Banker Senior Programmer Analyst IBM Certified Solutions Expert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Louie Bergsagel Sent: Friday, April 25, 2008 4:12 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Indexes have disappeared I just found out that the original indexes had a virtual path (correct terminology?) (../directory.name), which didn't work with the new version of UniVerse (10.2.7), so our vendor changed them to a physical path (u2/ directory.name), which didn't match our other system. So now we do a SET.INDEX every day after the copy from computer A to computer B. Fun. -- Louie in Seattle http://directory.name --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes have disappeared
As far as I know it's always worked that way. Question, the copies you made before, were they on the same system? If so you were using the same indices for both your live and copied data. Usually this causes some strange results when using the indices. Jerry Banker Senior Programmer Analyst IBM Certified Solutions Expert -Original Message- From: [EMAIL PROTECTED] [mailto:owner-u2- [EMAIL PROTECTED] On Behalf Of Louie Bergsagel Sent: Tuesday, April 22, 2008 7:06 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Indexes have disappeared No, but how could it have worked before? If a SET.INDEX was required, wouldn't it have to be executed after every copy? We've never done that. On Tue, Apr 22, 2008 at 4:32 PM, Wally Terhune [EMAIL PROTECTED] wrote: Identical file system path to the files and indexes? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes have disappeared
Are the file systems truly identical, or are you using symbolic links to make them look the same? Use SET.INDEX filename INFORM to see where your index is really pointing. -Rick On Apr 22, 2008, at 3:12 PM, Louie Bergsagel wrote: We use flashcopy to move data from one computer to another, and recently noticed that UniVerse is no longer recognizing the indexes even though they are copied along with the files. We recently upgraded to UniVerse 10.2.7 (Pick syntax) Has anybody heard of this weirdness? -- Louie in Seattle --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes have disappeared
Otherwise - did you make any changes to the indexes and copy the files while the change was In progress? Regards JayJay --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes have disappeared
Hi Louie, Did you perform a SET.INDEX after moving the data? -- Original message -- From: Louie Bergsagel [EMAIL PROTECTED] We use flashcopy to move data from one computer to another, and recently noticed that UniVerse is no longer recognizing the indexes even though they are copied along with the files. We recently upgraded to UniVerse 10.2.7 (Pick syntax) Has anybody heard of this weirdness? -- Louie in Seattle --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes have disappeared
Identical file system path to the files and indexes? Wally Terhune SWG Client Support - Information Management Software U2 Support Architect b IBM U2 Client Support Team 4700 S. Syracuse St., Denver, CO 80237 Tel: (303) 773-7969 T/L 656-7969 Mobile: (303) 807-6222 [EMAIL PROTECTED] Louie Bergsagel [EMAIL PROTECTED] mail.com To Sent by: U2 u2-users@listserver.u2ug.org [EMAIL PROTECTED] cc stserver.u2ug.org Subject [U2] Indexes have disappeared 04/22/2008 04:12 PM Please respond to [EMAIL PROTECTED] er.u2ug.org We use flashcopy to move data from one computer to another, and recently noticed that UniVerse is no longer recognizing the indexes even though they are copied along with the files. We recently upgraded to UniVerse 10.2.7 (Pick syntax) Has anybody heard of this weirdness? -- Louie in Seattle --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ [demime 1.01d removed an attachment of type image/gif which had a name of 28996336.gif] [demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif] [demime 1.01d removed an attachment of type image/gif which had a name of pic09707.gif] [demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes have disappeared
You probably just need to use SET.INDEX to change the pathname to where the index file is now located. It's been discussed lots of times in this forum is the most common problem with indexes in UV. It's a feature!! :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Louie Bergsagel Sent: Wednesday, 23 April 2008 8:13 AM To: U2 Subject: [U2] Indexes have disappeared We use flashcopy to move data from one computer to another, and recently noticed that UniVerse is no longer recognizing the indexes even though they are copied along with the files. We recently upgraded to UniVerse 10.2.7 (Pick syntax) Has anybody heard of this weirdness? -- Louie in Seattle --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes have disappeared
We've never done a SET.INDEX, but the indexes used to work just fine. I wonder if they have to be set once and they work until the next upgrade? -- Louie --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes have disappeared
No, but how could it have worked before? If a SET.INDEX was required, wouldn't it have to be executed after every copy? We've never done that. On Tue, Apr 22, 2008 at 4:32 PM, Wally Terhune [EMAIL PROTECTED] wrote: Identical file system path to the files and indexes? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes have disappeared
If not an identical pathname now, it would simply mean you had an old index at the same pathname previously. Now it appears you don't. Index broken - 'cause index is not there. Very common problem in UV. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Louie Bergsagel Sent: Wednesday, April 23, 2008 10:06 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Indexes have disappeared No, but how could it have worked before? If a SET.INDEX was required, wouldn't it have to be executed after every copy? We've never done that. On Tue, Apr 22, 2008 at 4:32 PM, Wally Terhune [EMAIL PROTECTED] wrote: Identical file system path to the files and indexes? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes have disappeared
Louie, Within each file 'header' is a pointer to the index file. It is stored as a full path name (unless specified otherwise). If the account is moved and the file paths change, then the link/pointer to the index file will break (no longer point to the index file). The SET.INDEX enables you to reset the pointer/link back to the index file. For more info, see the latest UniVerse User Reference manual, pages 1-488 to 1-490. Cheers, David Murray * Learn and do * Excel and share http://u2blog.org -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Louie Bergsagel Sent: Tuesday, April 22, 2008 7:19 PM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Indexes have disappeared We've never done a SET.INDEX, but the indexes used to work just fine. I wonder if they have to be set once and they work until the next upgrade? -- Louie --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes have disappeared
Wasn't there some talk at one point of using relative pathnames? Is that supported in the newer releases? -- Original message -- From: Wally Terhune [EMAIL PROTECTED] Identical file system path to the files and indexes? Wally Terhune SWG Client Support - Information Management Software U2 Support Architect b IBM U2 Client Support Team 4700 S. Syracuse St., Denver, CO 80237 Tel: (303) 773-7969 T/L 656-7969 Mobile: (303) 807-6222 [EMAIL PROTECTED] Louie Bergsagel mail.com To Sent by: U2 [EMAIL PROTECTED] cc stserver.u2ug.org Subject [U2] Indexes have disappeared 04/22/2008 04:12 PM Please respond to [EMAIL PROTECTED] er.u2ug.org We use flashcopy to move data from one computer to another, and recently noticed that UniVerse is no longer recognizing the indexes even though they are copied along with the files. We recently upgraded to UniVerse 10.2.7 (Pick syntax) Has anybody heard of this weirdness? -- Louie in Seattle --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ [demime 1.01d removed an attachment of type image/gif which had a name of 28996336.gif] [demime 1.01d removed an attachment of type image/gif which had a name of graycol.gif] [demime 1.01d removed an attachment of type image/gif which had a name of pic09707.gif] [demime 1.01d removed an attachment of type image/gif which had a name of ecblank.gif] --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
You can also do the same with the LIST.DIFF, LIST.UNION, LIST.INTER, etc. commands. Eric -Original Message- From: Tom Dodds [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 6:38 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes I recently put together a Tech Tip for a monthly news Letter about the Merge List process. That might help with your situation, take a look. http://www.ashwoodcomputer.com/TechTip.html This is not an ad for Ashwood Computer Company Tom Dodds [EMAIL PROTECTED] 630.235.2975 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Symeon Breen Sent: Friday, March 14, 2008 5:38 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes I would use the SAVING clause on a select of the repairs file to build a list of stock id's then use a merge list command to see what stock ids do not have a repairs record. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 14 March 2008 10:04 To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ LOBEL FINANCIAL PRIVACY NOTICE: This communication may contain confidential company information that is protected by federal law. Federal regulations prohibit the disclosure (or re-disclosure) of confidential information without the written consent of the person(s) to whom it pertains. Additionally, the views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Ya left out LIST.INTER, LIST.UNION and LIST.DIFF commands! These, admittedly, work with saved - rather than active, in-memory - Select Lists. - Original Message - From: Tom Dodds [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes Date: Fri, 14 Mar 2008 08:38:08 -0500 I recently put together a Tech Tip for a monthly news Letter about the Merge List process. That might help with your situation, take a look. http://www.ashwoodcomputer.com/TechTip.html This is not an ad for Ashwood Computer Company Tom Dodds [EMAIL PROTECTED] 630.235.2975 snip --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Got me. Thanks Tom Dodds -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ray Wurlod Sent: Sunday, March 16, 2008 6:59 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes Ya left out LIST.INTER, LIST.UNION and LIST.DIFF commands! These, admittedly, work with saved - rather than active, in-memory - Select Lists. - Original Message - From: Tom Dodds [EMAIL PROTECTED] To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes Date: Fri, 14 Mar 2008 08:38:08 -0500 I recently put together a Tech Tip for a monthly news Letter about the Merge List process. That might help with your situation, take a look. http://www.ashwoodcomputer.com/TechTip.html This is not an ad for Ashwood Computer Company Tom Dodds [EMAIL PROTECTED] 630.235.2975 snip --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Indexes
My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
I would use the SAVING clause on a select of the repairs file to build a list of stock id's then use a merge list command to see what stock ids do not have a repairs record. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 14 March 2008 10:04 To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes
At the universe tcl: SELECT REPAIR SAVING UNIQUE STOCK.ID Providing the the id to the STOCK file is in a field called STOCK.ID. Raul - Original Message - From: Dennis Bartlett [EMAIL PROTECTED] Sent: 03/14/2008 12:03 PM ZE2 To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Dennis Two more ways to do this: 1/ you can use BASIC but it's a slight pig.. The SelectIndex statement selects keys from an index. But it generates a select list, so you need to be careful about segregating these e.g. if calling from a SUBR() in an Idescriptor. 2/ a way I'm clearly not recommending but that happens to work rather well :) The index is actually just a type 25 file with simple inverted records (key = indexed values, fields = key of records under the index). If you can find which of the index.nnn files in the I_filename directory is that index (should match the order they appear in the LIST.INDEX statement), you can just create a file pointer to it. Or, if you want to be safer, use an OpenPath in BASIC and hold the pointer in named common... Brian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 14 March 2008 10:04 To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
I recently put together a Tech Tip for a monthly news Letter about the Merge List process. That might help with your situation, take a look. http://www.ashwoodcomputer.com/TechTip.html This is not an ad for Ashwood Computer Company Tom Dodds [EMAIL PROTECTED] 630.235.2975 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Symeon Breen Sent: Friday, March 14, 2008 5:38 AM To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes I would use the SAVING clause on a select of the repairs file to build a list of stock id's then use a merge list command to see what stock ids do not have a repairs record. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 14 March 2008 10:04 To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Thanks! This is by far the easiest, and it works! -Original Message- [EMAIL PROTECTED] wrote: At the universe tcl: SELECT REPAIR SAVING UNIQUE STOCK.ID --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] Indexes
There is no function like the T correlative to translate to an indexed file from a dict item, so you will need to do in BASIC as an I-type. The command is BSCAN, e,g. BSCAN BVAL,ID.LIST FROM FV,ID USING FIELDNAME ELSE BVAL = ID.LIST contains an AM delimited list of keys to records in file FV than match ID in FIELDNAME. BVAL is the value of the indexed attribute that matches ID. If there was no match, then BVAL will be the next indexed value past ID, so I always test if BVAL = ID. FV is the open file variable to the indexed file. ID is the value you are searching for in the indexed FIELDNAME. FIELDNAME is the name of the indexed fields in FV (e.g. CREATE.INDEX MYFILE FIELDNAME). A BY SEQ clause is optional, SEQ is either A or D for ascending or descending, (ascending is the default). See HELP BASIC BSCAN I usually loop on BSCAN until BVAL NE ID. I am not sure if that is always necessary. I use I-types that incorporate BSCAN to return values from indexed files all the time. It works great. /Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 On Fri, Mar 14, 2008 at 3:03 AM, Dennis Bartlett [EMAIL PROTECTED] wrote: My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Dennis: I would handle it with something like the following... -Bill * equate true to 1, false to 0 open 'STOCK' to F.Stockelse null open 'REPAIRS' to F.Repairs else null clearselect ALL execute SELECT REPAIRS done = false loop readnext Invoice.ID else done = true until done do read R.Repairs from F.Repairs, Repair.ID else R.Repairs = '' Bin.Location.ID = R.Repairs7 read R.Stock from F.Stock, Bin.Location.ID else R.Stock = '' Part.Nbr = R.Stock12 read R.Item from F.Item.Master, Part.Nbr else R.Item = '' Part.Desc = R.Item17 Print.Str = Repair.ID'L#11' Print.Str := Part.Nbr 'L#6' : ' ' Print.Str := Part.Desc'L#22' : ' ' Print.Str := Bin.Location 'L#6' print Print.Str R.This = Repair.ID : VM R.This := Part.Nbr locate R.This in Repair.Array1 by 'AL' setting pos else null insR.This before Repair.Arraypos repeat -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dennis Bartlett Sent: Friday, March 14, 2008 6:04 AM To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Dennis, Create a subr/function routine to open the REPAIRS file, use BSCAN to find the required records (using the passed STOCK code) and then DCOUNT the BSCAN result. You can then return this value. Create an ITYPE dictionary field (in STOCK file) which calls this routine, passing the required STOCK key/code. It would be a good idea to cache the file open using one of the methods which was discussed some months ago in this mail list. Cheers, David Murray -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: Friday, March 14, 2008 6:04 AM To: u2-users@listserver.u2ug.org Subject: [U2] Indexes My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Keep it simple! In a program you can use SELECTINDEX and from a command line use SELECT with the SAVING UNIQUE keywords. Jerry Banker -Original Message- From: Scott Ballinger [mailto:[EMAIL PROTECTED] Sent: Friday, March 14, 2008 9:22 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Indexes There is no function like the T correlative to translate to an indexed file from a dict item, so you will need to do in BASIC as an I-type. The command is BSCAN, e,g. BSCAN BVAL,ID.LIST FROM FV,ID USING FIELDNAME ELSE BVAL = ID.LIST contains an AM delimited list of keys to records in file FV than match ID in FIELDNAME. BVAL is the value of the indexed attribute that matches ID. If there was no match, then BVAL will be the next indexed value past ID, so I always test if BVAL = ID. FV is the open file variable to the indexed file. ID is the value you are searching for in the indexed FIELDNAME. FIELDNAME is the name of the indexed fields in FV (e.g. CREATE.INDEX MYFILE FIELDNAME). A BY SEQ clause is optional, SEQ is either A or D for ascending or descending, (ascending is the default). See HELP BASIC BSCAN I usually loop on BSCAN until BVAL NE ID. I am not sure if that is always necessary. I use I-types that incorporate BSCAN to return values from indexed files all the time. It works great. /Scott Ballinger Pareto Corporation Edmonds WA USA 206 713 6006 On Fri, Mar 14, 2008 at 3:03 AM, Dennis Bartlett [EMAIL PROTECTED] wrote: My dumb question for the day (just cant remember how to... and the manual's example is too simplistic...) How do I programmatically get an index value out, eg I have a STOCK file, and a REPAIRS file. Whoever designed this needs their head read, but the repairs file only has the stock code as a reference in the record. I have indexed the repair file on stock code, and need to create a report on the stock file of how many items are under repair. 1. UniverseBASIC code? 2. is this possible from an Itype? --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes
Ah... If that's what you want, then in BASIC SELECTINDEX STOCK.ID FROM F.REPAIR Should have exactly the same effect (and save the overhead of an EXECUTE). The only difference is the resulting select list may not be sorted (although I think it is). If you then want to find what records are then associated with each stock id SELECTINDEX STOCK.ID, STOCK.ID FROM F.REPAIR Cheers, Wol -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Bartlett Sent: 14 March 2008 13:44 To: u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes Thanks! This is by far the easiest, and it works! -Original Message- [EMAIL PROTECTED] wrote: At the universe tcl: SELECT REPAIR SAVING UNIQUE STOCK.ID --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Indexes on distributed files
Hi, I having the following problem with indexes on a distributed file Scenario - I have a distributed file split by years - 1997 (1) 1998 = 2 1999 = 3 I create an index on the main file, and build the index (this creates index files for each part file on the filesystem) Now i'm trying to do a bscan on the main file, using the USING clause (with the index I just created) and I'm getting a status error 3 - (file is not a type 25, or no secondary indices defined) The platform is Universe 9.6.2 - UNIX Can BSCAN's be done on a main controlling file for a distributed file, if so how ? Thanks Mac -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes on distributed files
Unfortunately, BSCAN is not supported on distributed files in UniVerse. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mac Bhyat Sent: Wednesday, March 22, 2006 5:08 AM To: u2-users@listserver.u2ug.org Subject: [U2] Indexes on distributed files Hi, I having the following problem with indexes on a distributed file Scenario - I have a distributed file split by years - 1997 (1) 1998 = 2 1999 = 3 I create an index on the main file, and build the index (this creates index files for each part file on the filesystem) Now i'm trying to do a bscan on the main file, using the USING clause (with the index I just created) and I'm getting a status error 3 - (file is not a type 25, or no secondary indices defined) The platform is Universe 9.6.2 - UNIX Can BSCAN's be done on a main controlling file for a distributed file, if so how ? Thanks Mac -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. ZirMed, Inc. has strict policies regarding the content of e-mail communications, specifically Protected Health Information, any communications containing such material will be returned to the originating party with such advisement noted. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Indexes on distributed files
Mac, If the index value you are wanting to lookup is the exact value in the record you can use SELECTINDEX. However, you cannot do partial matches this way. For example, let's say you have an index on LAST.NAME in the CUST file, and you are looking for any records with the last name of TAYLOR... OPEN 'CUST' TO F.CUST ELSE STOP 201,'CUST' SELECTINDEX 'LAST.NAME', 'TAYLOR' FROM F.CUST LOOP WHILE READNEXT CUST.ID DO ... REPEAT But if you wanted to get any cust record with LAST.NAME starting with T. You cannot use SELECTINDEX and will have to query instead... OPEN 'CUST' TO F.CUST ELSE STOP 201,'CUST' EXECUTE 'SELECT CUST WITH LAST.NAME T]' CAPTURING OUTPUT LOOP WHILE READNEXT CUST.ID DO ... REPEAT Your only other option is to write logic that will query each individual part file and collate the results... Not a trivial routine. You might contact IBM/U2 Professional Services. Mark Baldridge wrote something that does this very thing and you probably can get it from them. Hope this helps some. Perry -Original Message- From: Mac Bhyat [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 22, 2006 7:21 AM To: Perry Taylor Subject: RE: [U2] Indexes on distributed files Hi, Thanks for the reply - do you know how I can use indexes on distributed files ? Thanks Mac -Original Message- From: Perry Taylor [mailto:[EMAIL PROTECTED] Sent: 22 March 2006 04:06 PM To: Mac Bhyat; u2-users@listserver.u2ug.org Subject: RE: [U2] Indexes on distributed files Unfortunately, BSCAN is not supported on distributed files in UniVerse. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mac Bhyat Sent: Wednesday, March 22, 2006 5:08 AM To: u2-users@listserver.u2ug.org Subject: [U2] Indexes on distributed files Hi, I having the following problem with indexes on a distributed file Scenario - I have a distributed file split by years - 1997 (1) 1998 = 2 1999 = 3 I create an index on the main file, and build the index (this creates index files for each part file on the filesystem) Now i'm trying to do a bscan on the main file, using the USING clause (with the index I just created) and I'm getting a status error 3 - (file is not a type 25, or no secondary indices defined) The platform is Universe 9.6.2 - UNIX Can BSCAN's be done on a main controlling file for a distributed file, if so how ? Thanks Mac -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ -- This message was scanned for spam and viruses by BitDefender. For more information please visit http://linux.bitdefender.com/ CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. ZirMed, Inc. has strict policies regarding the content of e-mail communications, specifically Protected Health Information, any communications containing such material will be returned to the originating party with such advisement noted. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
[U2] Re: U2 Indexes
I've had some recent e-mails asking where the U2-user and U2-community indexes can be found. Here are two good answers: http://news.gmane.org/gmane.comp.db.u2.general/ http://www.indexinfocus.com/ - Charles Barouch, Moderator [demime 1.01d removed an attachment of type text/x-vcard which had a name of u2ug.vcf] --- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/