I call the following section of a program to generate a list of employees for an OIPI report. Note: I removed some case statement stuff to simplify the example. Over the past few months there have been 3 to 4 incidences where ONE employee is missing on the report. I nailed it down to an issue where the employee key is actually missing from the list generated and stored in SYSLISTS. Am I doing something wrong here or is there a problem with the RLIST command when saving a list.
List.Name = 'PHONE.':Get_Station()List.Found = xlate('SYSLISTS',List.Name,'','X')if List.Found thenDelete_Save_Select(List.Name)endSelStmt = 'SELECT PHONEROOM_DATA BY DEPARTMENT BY LAST_NAME BY FIRST_NAME'RList(SelStmt ,4 , List.Name, "", "")Activate_Save_Select(List.Name)Last month I added a command before calling this section to update all indexes, too.
Thanks,
Harold King
If you do the following piece of code, is the missing employee key in KeyList.
SelStmt = 'SELECT PHONEROOM_DATA BY DEPARTMENT BY LAST_NAME BY FIRST_NAME'
RList(SelStmt ,5 , "", "", "")
Eof=0
KeyList=""
loop
readnext key else eof=1until Eof
KeyList:=Key:@fmrepeat
debug
I have several other programs where RLIST is used to generate an active select list and then I loop through each record (like in your example). Maybe I'll change this program to work that way, too. The program was written 5 years ago and has worked flawlessly until missing ONE employee 2 or 3 times over the past few months. I'm just wondering if anyone else has ever had a problem where records are missing when you do it the way I demonstrated. The employee missing has a dash in her last name. Could that be a problem?
It's hard to test because the data is moved to history and cleared every 2 weeks. When I looked at the live system the other day the data had already been cleared. The only thing left was the SYSLISTS record (and the employee key was missing). The missing employee was in the CSV file that had been imported and in the History file (phoneroom records merged).
Note: I copied the CSV files to my dev system, ran the import process, ran the report and the missing employee does show up (and is in the SYSLISTS record).
Thanks,
Harold
Is it the same employee each time.?
The past 2 occurances it was the same employee (with the dash in last name), but I don't think it was before that (although that was a few months ago). I went ahead and changed the program to use RLIST to generate an active list (no save/retrieve). I added a call to the following code (before RLIST stmt) just for kicks, too:
ClearList:
ensure that all Cursors are availablefor i = 0 To 8ClearSelect inext ireturn
Thanks,
Harold