[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

3537.0. "Determining the highest docnum in each drawer" by LOOKIN::BARHAM (Norbert:) Tue Nov 16 1993 10:46

    ALL-IN-1 3.0
                                                     
    My customer wants to know how to quickly determine the highest docnum
    in each drawer.
    This would then tell him how many documents had not been read since the
    previous time he looked. He does not want to scan the whole drawer each
    time for perfomance reasons. Are we right in assuming CAB_CREATE has an 
    internal counter to know what docnum to use or is there an accessible
    counter that we could use ?
    
    Thanks,
    
    Clive
T.RTitleUserPersonal
Name
DateLines
3537.1One solutionSCOTTC::MARSHALLSpitfire Drivers Do It ToplessTue Nov 16 1993 11:4217
Assuming it isn't a drawer used for mail, then this will do it:

for first cab$ with .fixer geq "000000" do get #x = .docnum

Will put the required docnum into #x

It gets a bit more complicated if it's a drawer used for mail and has an INBOX.
In that case try this:

for first cab$ with .fixer geq "000000" and .folder nes "INBOX" do -
    get #x = .docnum
for cab$ with .folder eqs "INBOX" do get #y = .docnum
.if #y gtr #x then get #x = #y

Again, the docnum you want is in #x.

Scott