|
Regards Vern
At 11:38 AM 7/9/2004, you wrote:
Hi Adam,
> I have a CL program that uses CHKDLO to determine the existence of a folder.
> We are changing things around to use directories. What would the equivalent
> command be to check for the existence of a directory?
The "right" way is to use the access() API. You check for the existence of a directory in the exact same manner that you check for the existence of a stream file -- search the archives, there have been 2 or 3 threads about checking for a stream file.
the stat() API is another way to go. It's a bit slower than access(), but it has the added advantage that you can pick apart the mode to see if the file is actually a directory (as opposed to a stream file) I know that I've posted examples of this in the past as well.
I personally DON'T like using CHKIN or CHKOUT for this. They allocate the resources to your job, and I don't think that's what you want to do.
I also wouldn't use DSPLNK because of the overhead of creating a spooled file -- but it's certainly a lot better than using CHKIN or CHKOUT.
> I assume we can't use wrklnk, because that will actually display the > screen. Also, what would the correct msgid be?
WRKLNK is interactive, it's not really what you're looking for.
As an Amazon Associate we earn from qualifying purchases.
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.