| 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 | 
    hi!
    
    ALL-IN-1 3.0-1 	VMS 5.5-2
    
    Customer uses the LF option to get document counts.  this was fine in
    2.4, but in 3.0 LF just lists the folders - no document count.
    
    Has anyone written or known of another way to get a COMPLETE document
    count for ALL DRAWERS?
    
    Does <FOR CAB$ \GET SEL_COUNT  get all documents in 3.0 ?
    
    	thanks - ann
| T.R | Title | User | Personal Name | Date | Lines | 
|---|---|---|---|---|---|
| 2360.1 | A way | IOSG::CARLIN | Dick Carlin IOSG, Reading, England | Thu Mar 04 1993 16:31 | 22 | 
|     Ann
    
    Answers to the last couple.
    
    In 3.0 FOR CAB$ \ GET OA$SEL_COUNT will list all the documents in
    the current drawer.
    
    If you want a count spanning drawers, say for all the drawers in your
    FILECAB, then you could do something like the following:
    
      DECIMAL I
      GET #DCOUNT = 0
      FOR FILECAB DO -
        CABINET SET_DRAWER .NAME\\ -
        .IF OA$STATUS EQ 1 THEN -
            FOR CAB$ \\\\ -
            COMPUTE #DCOUNT = #DCOUNT + OA$SEL_COUNT
      .EXIT
    
    Did 2.4 really count documents for LF, or was this a customisation?
    
    Dick
 | |||||
| 2360.2 | IOSG::MAURICE | Because of the architect the building fell down | Thu Mar 04 1993 16:35 | 24 | |
|     Hi,
    
    To get the count from the folder index use the R or P options. To get
    the total for a drawer use ALL XR.
    
    <FOR CAB$ DO\GET SEL_COUNT will also give you the total count for the
    current drawer.
    
    However this grand total is only per drawer in both cases. So here's a
    little script to give you the total for drawers the user owns. It
    assumes there is a 1-1 correspondence betweeen VMS account name
    ALL-IN-1 name:
    
get #count = 0
decimal i
for partition:owner with .owner eqs oa$profil_vmsusr do -
  cab set_drawer .unique_name\\-
  for cab$ do\\-
  compute #count = #count + oa$sel_count
get oa$display = "Total count = " #count
    
    Cheers
    
    Stuart
 | |||||