You know, IMHO IBM blew it when the 31-bit thing came along and they came up
with a bunch of "design patches" to QSAM like the DBCE. They should have
gone the "file handle" route where the control blocks were hidden from the
using programmers. You could continue to use 24-bit DCBs as-is for as long
as you liked, but if you wanted anything new you got a pointer to a control
block whose exact format was DFSMS's business alone and was subject to
change. If you wanted information about the "dataset object" that it pointed
to, you called an API.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of David Crayford
Sent: Wednesday, August 07, 2013 10:01 AM
To: [email protected]
Subject: Re: C issue - 'struct stat'

On 07/08/2013, at 9:34 PM, Paul Gilmartin <[email protected]> wrote:

> On Tue, 6 Aug 2013 12:39:09 +0800, David Crayford wrote:
>> 
>> I've always liked the nice abstraction with the z/OS C/C++ FILE I/O 
>> implementation. fopen() is a factory function which returns a 
>> semi-opaque structure with two function pointers to read/write 
>> routines
>> (methods) which handle all
>> the different access methods (QSAM, BSAM, VSAM, UNIX, Hiperspaces etc).
>> It's a good design and an example of OO done well in C using pointers 
>> in structs ;).
>> 
> In fact, in Assembler the DCB has much this character.  OPEN updates 
> the DCB by adding pointers to the access method entry points.
> 

Shame it doesn't support VSAM. Or maybe ACB should support QSAM, BSAM etc. 

> Alas, IBM developers abandoned this paradigm.  One writes to the 
> operator's console not using QSAM, but WTO;  one writes to the TSO 
> terminal not using QSAM to SYSTSPRT, but TPUT.  And I believe I have 
> evidence that FTP given the DD: construct does not Do the Right Thing 
> of OPENing a DCB on that DDNAME, but chases control blocks to suss out 
> the underlying object and performs its own allocation, probably 
> thwarting any attempt of the caller to override attributes, etc.
> 

I prefer the UNIX philosophy where everything is a file. Programming is
difficult enough without inconsistent interfaces. 

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

Reply via email to