Array Question

I have 2 arrays contain data from a DB2 table that I am trying to compare; Array1 has 6 items and Array2 has 5 items. Array1 contains items that are currently stored in the DB2 table; Array2 is what is to replace Array1 in the table.

I’m having a problem getting the rows in the table to update properly – either no row is deleted or the incorrect one is removed or better yet I’m o/o bounds on the smaller array.

Can anyone give me a suggestion as to the easiest way to compare arrays of unequal length?

Thanks.

Subject: Array Question

Take a look at the @Formulas for working with lists. You can create a document and assign your arrays to fields on the document and then use Evaluate to easily use the @Formulas.

Subject: Array Question

There’s a lot of fuzziness in your question which I think comes from some fuzziness in your requirements. What exactly are you trying to do? Maybe it would help to write out an example of the data in DB2 before, the input to your process, and the data in DB2 after, and think about what’s happened between Before and After. Do you have to delete a row? Probably you will have to do that explicitly. Do you have to identify what rows are the same so that you can avoid changing them? Work through the process step by step manually, and note down what you are doing with your brain that the program will have to be able to reproduce.

And, show your source code. Error events and so forth don’t happen in a vacuum – they’re based on what code you’re executing.

  • Andre Guirard, IBM/Lotus Development

Useful blog: Best Practice Makes Perfect

For faster answers, be C R I S P Y