|
Would you consider one sequence number for the entire file? Your only requirement is that the numbers increase, not that they increase by 1 in each account number. It'd be simpler to have one number to keep track of wouldn't it? --------------------------------- Booth Martin http://www.martinvt.com --------------------------------- -------Original Message------- From: RPG programming on the AS400 / iSeries Date: 01/28/05 17:10:05 To: RPG programming on the AS400 / iSeries Subject: Suggested technique I am writing something to create memo records for accounts, detailing insurance billing denials. The key to the file is account number and sequence number, and it requires unique keys. Basically, my technique for writing is: - Chain using account# - if no matches, sequence=1 - if %Found, SETGT using account#, READP, then add one to the sequnece number. I am building the outpt record, then performing the above and writing immediately. But there still is a chance that somebody is sitting in the account, and might press enter on a new memo while my program is trying to add records, causing my program to error trying to write a duplicate record. I am trying to visualize a soltion using a DOW loop and a Monitor group, but I would want the program to keep determining the next record number and retrying if there was an error. I am not sure if I can just ITER if the error is found, or if I have to use a GOTO. Any suggestions? -- "Enter any 11-digit prime number to continue..." -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. .
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.