![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
since a select list (whether saved or not) looks just like any other item, if there are am or vm in it, it will screw up what you think are the keys. however - if you do a select within a basic program, this actually sequentially reads the keys and returns them one at a time - so bad/funny characters should go thru. jay |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
That might work with D3/Pick. But I think that Universe will perform a standard select and therefore build a corrupted list, just as if it was a separate procedure. Hope I'm wrong, but I do know that a Universe Basic SELECT is much slower then the old Pick Basic select. Because it's busy creating the list. Roger "JPORSHA924" <jporsha924 (AT) aol (DOT) com> wrote in message news:20030625160144.13592.00001789 (AT) mb-m25 (DOT) aol.com... since a select list (whether saved or not) looks just like any other item, if there are am or vm in it, it will screw up what you think are the keys. however - if you do a select within a basic program, this actually sequentially reads the keys and returns them one at a time - so bad/funny characters should go thru. jay |
#5
| |||
| |||
|
|
[This followup was posted to comp.databases.pick and a copy was sent to the cited author.] We have a huge database (over 2,000,000 records) which has some keys which contain bad characters (believed to be @AM [CHAR(254)]. I'm attempting to delete these, but I've been unsuccessful in obtaining any of them that are complete. For instance, if the key is "0-123~254~-56" (where ~254~ is an attribute mark (CHAR(254)), I get "0-123" when I readnext from an active select list. This is true regardless of whether the list is from SELECT or from a saved list (SELECT followed by SAVE- LIST followed by GET-LIST). I tried two things a colleague gave me which were found on the Informix- U2 listserve, but neither one works: 1. Create I-DESCRIPTOR ANYAM: 0001: I 0002: TRANS(filename,@ID,-1,'X'); IF INDEX(@1,@VM,1) THEN 'YES' ELSE 'NO' Note: testing form @VM since TRANS lowers the data Create I-DESCRIPTOR AMID 0001: I 0002: LOWER(@ID) Note: lower the @ID one, so when saved in a select list, the @AM doesn't screw up the list SELECT filename WITH ANYAM = "YES" SAVING UNIQUE AMID SAVE-LIST BADONES In a BASIC program, do READNEXT on select list, RAISE the ID (RAISE (key), and delete it from the file. 2. Identify the bad keys by: SELECT filename WITH @ID NE EVAL "CONVERT(@AM,']',@ID)" SAVING EVAL "LOWER(LOWER(LOWER(@ID)))" SAVE-LIST listname In a BASIC program, do READNEXT on select list, RAISE the ID (RAISE (RAISE(RAISE(key)))), and delete it from the file. A few years ago, when we were on Advanced Pick (we're now on Universe 9.4 on SCO OpenServer 5), the only way to get rid of such records was to create a new file, SELECT the old file, and COPY the old file to the new one. The keys with the bad data wouldn't be found by the COPY, and so the new file would contain all the good records and none of the bad. You would then delete the old file and rename the new file (so it was the same name as the old one just deleted). Thanks Steve |
#6
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |