Instead, I typically have to slog through a whole raft of records, testing each case and processing only those that meet certain criteria.Since that selection process often involves multiple files and a lot of conditional logic, it's not very well suited to SQL's version of conditional logic, the adequate but somewhat verbose statement. In RPG's embedded SQL, you can declare a cursor (if you've written an SQLRPGLE program you've almost certainly been down this path). Well, that only requires one little extra clause on the DECLARE statement and then suddenly you can now update the data as well. Here I've defined a cursor named Orders, and all that cursor does is retrieve the order number from the extension file.For instance, I might have the following psuedo code: Excuse my psuedo code off the top of my head.
Based on that value, I update another table's column.
There can be a situation where you have to use a cursor, even though the experts say not to use cursors or to avoid them as much as possible.
Its very name—Structured Query Language—sort of leans you in that direction.
It's also an excellent tool for set-based updates, as its many proponents will tell you.
This is a package with thousands of programs, many of which share several major master files. Yes, there are a few other more-involved options, such as converting all existing code to SQL access.
Those sorts of architectural overhauls might make sense in a software development shop, but in most production environments, those approaches aren't easy to get approved by the folks who pay the bills.
You can't change the file during normal business operations because every program that has the file open has a lock on it.
And it's bad enough in a simple 9-to-5 environment; the complexity simply increases as you throw in multiple shifts and international locations.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.