>>>I run a .prg to count the occurances of certain field contents on a file with 800000 records.
>>>
>>>another user (next to me) tries to bring up printer properties and gets the hour glass but no properties.
>>>
>>>I escape out of the .prg and his printer properties appear...
>>>
>>>What could cause this?
>>Larry,
>>
>>If your prg is pounding at the server without allowing for anyone else to get a word in edgerwise then that would explain what you see. Why not post the small PRG and see anyone can give you any advice about how to get it to better behave in a network environment.
>
>That's a great idea...
>
>Here it is:
>
>the objective is to count number of (active) people
>in each district / age_group
>
>***********************************************************
>CLOS ALL
>CLEA ALL
>CLEA
>
>SET EXCL OFF
>SET TALK OFF
>SET ESCA ON
>SET SAFE OFF
>SET DELE ON
>
>USE MasterFile
>COPY STRU TO CountFile
>
>SELECT 0
>USE CountFile EXCL
>INDEX ON DISTRICT + AGEGRP TAG DISTRICT
>
>SELECT MasterFile
>nCount = 0
>SCAN
> nCount = nCount + 1
> @ 05,02 SAY nCount
> *
> IF INACTIVE <> 'Y'
> cAgeGrp = AGEGRP
> cDistrict = DISTRICT
> *
> * increment total
> IF ! SEEK(cDistrict + cAgeGrp,"CountFile","District")
> INSERT INTO CountFile (DISTRICT,AGEGRP) VALUES (cDistrict, cAgeGrp)
> ENDIF
> REPLACE TOTAL WITH TOTAL + 1 IN CountFile
> ENDIF
>ENDSCAN
>***********************************************************
Larry- I think what you are trying to do can be accomplished with one statement:
SELECT count(*), distinct *;
FROM masterfile;
INTO CURSOR countfile;
WHERE inactive <> "Y";
GROUP BY agegrp, district
This doesn't directly apply to your question, but could possibly reduce the time it takes to create your countfile table.
HTH
Erik Moore
Clientelligence