On Mon, 26 Aug 2013 09:06:14 -0700, Charles Mills wrote:

>Not COBOL, but ...
>
>I have a rather large STC written in C++. I had done it all POSIX(OFF) for
>no particular reason except "if it ain't broke ..." I needed to support GSK
>which requires POSIX(ON). There were a *lot* of little surprises. Lots of
>little things that stopped working or worked differently. I don't remember
>them all, but one for example was this: With POSIX(OFF),
>fopen("DD:SYSPRINT", ...) does what you would expect. With POSIX on, believe
>or not, that fopen creates a USS file named -- ta-da -- DD:SYSPRINT. To get
>the results you want you have to specify "//DD:SYSPRINT". Documented, but a
>little surprise nonetheless.
> 
Hardly unexpected; merely what POSIX requires.  But I may need
to re-read what POSIX says about the use of the ":", not in the
Portable Filename Character set.  How else would you expect to
create or read a file named "DD:SYSPRINT"?

In fact, POSIX even deprecates the "//" construct two ways: both
implementors and programmers are cautioned against its use.
POSIX requires that "cat //etc/services" operate the same as
"cat /etc/services".  IBM would have done better to reserve a
non-mountpoint such as "/Legacy" and support constructs in forms
such as:  "/Legacy/DD:SYSPRINT" and "/Legacy/'SYS1.MACLIB(SPREL)'"
(The question remains of how stat("/Legacy"); should behave if
that were done.)

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to