× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 11/28/2011 11:12 AM, Barbara Morris wrote:
On 2011/11/25 7:02 PM, Joe Pluta wrote:
Barbara, has anybody put in a request for extname( a: *both) for data
structures? It could throw a compile time error if the input and output
formats were different. That one simple addition could remove a whole
lot of unnecessary code.

Hi Joe, yes, that's a well-known requirement.

extname(a:*all) is already supported for defining data structures, but
most I/O operations don't allow a *ALL ds.

EXFMT allows a *ALL DS starting in 6.1, and there is a PTF for *ALL to
be supported for subfile I/O.
https://www.ibm.com/developerworks/mydeveloperworks/blogs/b542d3ac-0785-4b6f-8e53-f72051460822/entry/ptfs_to_make_it_easier_to_use_data_structures_for_subfile_i_o19.

As usual, you're providing the complete solution rather than my somewhat limited quick hit :). I was just thinking that you could add a type *BOTH (as opposed to *ALL) that would only compile if the *INPUT and *OUTPUT buffers were the same. There would be almost no other changes to the compiler; it would allow a data structure named *BOTH to be used in all the places where either *INPUT or *OUTPUT data structures could be used before.

But now that I think of it, that's making the assumption that for a given record format where all fields are input/output a data structure type *INPUT is exactly the same as a data structure type *OUTPUT. And in any case, *ALL support will eventually be a superset of that functionality.

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.