× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Can you prompt for date, prompt for confirmation, THEN assign the check number 
and display a transaction summary screen?  The idea here is to avoid delays 
between the time a new tranID is generated and the transaction completes.  

Since check number is always supposed to be sequential, you really need to 
ensure that a check number is not allocated until the transaction is confirmed. 
 Since your algorithm is getting the current max(tranID) from the database, 
it's absolutely critical that the new value be written to the table 
immediately, so that the next requestor will not get the same ckeck number as 
you....  This should eliminate any skipped sequences, as well as eliminating 
duplicate check numbers.

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-297-2863 or ext. 1863



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of steema@xxxxxxxxxxxxx
Sent: Thursday, June 22, 2006 2:38 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Record Lock



There is only one file. A screen present a number and date-entry. First it
chains to the file, gets the number, adds 1, puts this on the screen. Then
it waits for a date. there must be a date entered. Then cmd-1, updates the
file, exits.

 Hi Steve,

There is one program that generates the check number. It is a simple RPG
that chains the file by company only, adds 1 to the existing number and
places this on the screen for the user.

Are there two files (a control file holding the last check number, and
the detail file containing the details including the newly-created check
number) or are you getting the last check number from the detail file
itself?  The point being that if it is a timing issue and the program is
failing between the moment the detail file gets its record and the
control file gets it's, then you have a duplicate situation.

Can you lay out a brief outline of the timing of the events along the
lines of:

1 co   chain control
2      add   1       check
3      update control
4      exfmt
... time passes
5 key  chain  details
6      write  details

I was told that for checks, they don't
 > indicate the division ever, only
company.

If the database keys are co, div, batch, check then that information is
not correct.  It may be what is _desired_ but the database does not
enforce that rule.

I still want to know what happens to
 > the file lock, when a term. freezes.

What does it mean when you say 'term. freezes?'
   --buck
--
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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.