Am 19.06.2022 um 21:47 schrieb Paul Gilmartin:
On Sun, 19 Jun 2022 21:21:28 +0200, Bernd Oppolzer wrote:
See: if I don't use the DD:xxx method the fopen the files,
that is, if I specify DS-names on the fopen, the C runtime even does the
allocation for me
(SVC 99, IIRC), so that I even don't need a JCL allocation for the file.
How does that runtime handle ENQ conflicts?
I didn't think much about it so far; here is what I guess:
The runtime has the data set name, because it is specified instead of
the DDname on the fopen.
It builds an artificial DDName like SYS000xx and does the dynamic
allocation for this,
using some default file attributes (if it does not know otherwise from
the second fopen parameter,
where you can specify recfm and blksize and so on ... which is an IBM C
extension).
IIRC, the defaults are RECFM=VB and LRECL=1024.
The ENQ, AFAIK, is based on the DS-name, so the runtime can do the
normal ENQ processing
as in the other cases.
The C runtime today is called "Language Environment", after all; it
supports a great list
of other things, but it supported this C specific file I/O on OS files
from the beginning
(early 1990s, I guess).
Kind regards
Bernd
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN