On Thu, Mar 30, 2017 at 3:20 PM, Alan Young <[email protected]> wrote:
> John McKown wrote: > >> IMO, what they mean is that there is not any syntactical language element >> which encompasses the hiperspace API at a native language level. Example, >> COBOL has a SORT verb which directly implements a language interface to >> the >> "sort" function. As opposed to doing a CALL 'ICEMAIN' in order to >> interface >> to a sort routine. >> >> > > The C library runtime provides an I/O interface to treat hiperspace memory > as a file. The hiperspace is created with the fopen() function and a type > parameter. > > type=memory(hiperspace) > > If you are using MVS/ESA, you can specify the HIPERSPACE suboption to > open a hiperspace memory file. > > Restriction: For AMODE 64 applications, type=memory(hiperspace) is > treated as type=memory. > > fread(), fwrite(), fclose(), clrmemf() etc. support it. And the routines > are callable from COBOL. > > Alan > A very good point, especially about being callable from COBOL. So does that mean that use of a hiperspace is supported by COBOL? Room for discussion there, I think. But (hoping I'm technically correct on this), the fopen() and other I/O functions you mentioned are not what I think of as "language elements"; such as the for() construct is. They are simply standard C language function call(s) to routine(s) which are packaged into a "run time" library which is distributed with the C language (which, on z/OS, usable even if you don't license the C/C++ compiler). What I am thinking is that use of fopen(), et al. does not really require any _special_ coding in the compiler itself because they are just normal C function calls; Unlike the way that the SORT verb _does_ require special coding in the actual compiler in order to parse it correctly to do a CALL to the system sort package (ICEMAIN usually). Or, if you prefer, the EBNF description (or whatever is now used) of the C language does not have any rules which relate to I/O functions such as fopen(). But the COBOL EBNF does have rules to parse OPEN, READ, WRITE, CLOSE, FDs, and so on. This is why I consider those things to be "part of the language" whereas the C I/O routines are not. -- "Irrigation of the land with seawater desalinated by fusion power is ancient. It's called 'rain'." -- Michael McClary, in alt.fusion Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
