comp.sys.ibm.as400.misc - IBM AS/400 miscellaneous topics.
I need to capture everytime a record has been added, changed or deleted in a file and the export a snapshot of that record out to be processed. I tried using a journal but it seems to just clump the snapshot of the record at the end of the journal entry. Am I doing something wrong when I display the journal to the outfile? Is there a cleaner way to accomplish this task? Trigger program maybe? I am just looking for a clean snapshot (easily readable by other programs) of the record after the change, add or delete. I still am going to look at the journal outfile and see if I can extract the file from that but if anyone has a better solution it would be appreciated. Thanks, Thad Rizzi
Hi I was using a query previously, that was efficient select * from table where pred1 and pred2 and pred3; Later I was asked to introduce new ones, but they were not based on table columns but variables declared in SP. select * from table where pred1 and pred2 and pred3 and variable1 ='number1 and variable2 =number2; so in turn this translates to pure mathematical comparison, sometimes simple like 2=2, I;ve added only 2 of them in the ex above, but actually there are 13 (does this influence the path, duh!!). Anyways, what happened was, after they were added, it started doing a table scan, and was very very inefficient. Later, I converted the additional predicates into simple if loops, and executed the original query, and SP was very fast. Is there any database logic connected to doing a table scan? or any registry/variable setting I can do so db2 doesnt do the table scan? Please advise, since my team has done this mistake in many places, and rolling back is going to be a pain in backside.