If you can access a data area in C than you could just increment a counter.

Albert

----- Original Message -----
From: "James H H Lampert" <jamesl@xxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Subject: Re: Anybody know a quick and easy way to generate a unique IFS       
directory for temporary use?
Date: Fri, 07 Jul 2006 14:58:28 -0700


The Qp0wGetJobID idea worked (but it did require the
getpid(); either the docs, or my understanding of them,
were wrong about being able to just pass a zero).

And the timestamp idea would have been acceptable, given
that this is a maintenance utility where a time collision
is more likely to occur in testing than in production.

And with regard to tmpnam() having separate IFSIO and
NOIFSIO versions, that possibility never occurred to me. I
don't often use fopen(), as I've become accustomed to
using UNIX-type I/O for IFS files, record I/O for QSYS
files, and STDIO only for interactive I/O, or for those
rare cases when I want to use a source PF for initial
tests on something that's eventually going to be reading
from an IFS file.

--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.