Computing.Net > Forums > OpenVMS > I Hate Polling

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

I Hate Polling

Reply to Message Icon

Name: Doc
Date: August 5, 2006 at 11:20:00 Pacific
OS: OpenVMS 7.3
CPU/Ram: Alpha
Product: HP
Comment:

To all you wonderfully helpful people out there...

Here's the kind of thing that I'm trying to do... Imagine a DCL procedure that looks roughly like this...

$ ! P1 = explicit filespec
$ SET NOON
$ !
$ LOOP:
$ FIL = F$SEARCH(P1)
$ IF FIL .EQS. ""
$ THEN
$ WAITFORIT 'P1' ! The nice utility
$ ELSE
$ GOSUB PROCESSIT
$ ENDIF
$ GOTO LOOP
$ !
$ PROCESSIT:
$ OPEN/READ FILLOG 'FIL'
$ IF $STATUS
$ THEN
$ CLOSE FILLOG
$ !Do something or other with the 'FIL'
$ DELETE/NOLOG/NOCONFIRM 'FIL';
$ RETURN
$ ENDIF
$ WAIT 00:00:10
$ GOTO PROCESSIT

What I'm after is the "WAITFORIT" utility above...

I found a program (written in C) that used AST's to accomplish this... trouble is... I misplaced the link. Now, I can't seem to track it down.

Does anyone know where I might find it? If not, does anyone have an example (preferably in C) that set's an AST to wait for a file creation... or even to detect some kind of update activity in a given directory?

Thank you!

--Doc

PS... Hmmm... lost my indenting. :-(



Sponsored Link
Ads by Google

Response Number 1
Name: Bob Gezelter
Date: August 8, 2006 at 21:52:21 Pacific
Reply:

Doc,

ASTs would be the correct way to do this, but the question is "An AST on what?".

File creation in and of itself will not trigger an AST. There are various ways of identifying when something has changed, but that is not precisely what you are asking.

Declaring a Timer AST, and then attempting to open the file is precisely what you have in your code example. A session that I presented at a past DECUS symposium, "Introduction to AST Programming" (notes at http://www.rlgsc.com/cets/2000/435.html ), may prove useful.

- Bob Gezelter, http://www.rlgsc.com


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: I Hate Polling

Interrupt I/O In C Program www.computing.net/answers/openvms/interrupt-io-in-c-program/145.html

file size information www.computing.net/answers/openvms/file-size-information/447.html

Where I Find OpenVMS DCL commands www.computing.net/answers/openvms/where-i-find-openvms-dcl-commands/464.html