× 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.



Rick.Chevalier@xxxxxxxxxxxxxxx wrote:
> 
> Let's see if I understand it now.  If I define an externally defined
> data structure over an existing physical file the compiler will not
> define the numeric subfields the same as the physical file because I
> used a D-spec.   Instead, it will use default data types based on the
> data types of the fields in the physical file.  ...

It's the opposite.  If you define an externally defined data structure,
the compiler _will_ define the numeric subfields the same as the
physical file.  If the field is zoned in the file, the
externally-described subfield will be zoned in the program.

But in your original post, your externally defined data structure was
qualified which meant that the data structure didn't define the
subfields that your file was using.  If you look in your listing, you
would might something like this, where the = signs show the lines that
the compiler generates.

    Fmyfile  if    e     disk
    D myextds     e ds              extname(myfile)
   =D                     1    5S 0 NUM
   =IMYREC
   =I        S   1   5 0  NUM

This program, without QUALIFIED, defines subfield NUM as 5S 0, and
explicitly defines the NUM on the I spec.  If you add QUALIFIED to the
definition of myextds, it would define MYEXTDS.NUM as being 5S 0, but it
would not define the unqualified NUM which appears on the I spec.

If you want to associate a qualified data structure with the fields for
a file, you can use PREFIX('DSNAME.') on the F spec.  That way, the
generated I specs will show the qualified names, which will match the
definitions in the external data structure.

    Fmyfile  if    e     disk       prefix('MYEXTDS.')
    D myextds     e ds              extname(myfile)
    D                               QUALIFIED
   =D                     1    5S 0 NUM
   =IMYREC
   =I        S   1   5 0  MYEXTDS.NUM

The qualified external data structure defines MYEXTDS.NUM as 5S 0, which
fully defines the MYEXTDS.NUM on the I spec.


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.