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



Thanks for this, Barbara.   I almost always use EXTPGM (with no parameter) for my prototypes.  Pros and cons, obviously, but I with that syntax, wherever a prototype is used I know exactly which external program I'm calling (of course, in RDi you can get it from the hover, but sometimes you're in the green screen).  EXTPROC is a little harder because of case; I always get confused with that one.  I think there's a way to do it, but I never seem to get it right.

But EXT for data structures is new to me.  And given the fact that I like my internal structures to match my external names, this is a nice feature.

On 2/7/2019 8:07 AM, Barbara Morris wrote:
On 2019-02-06 6:12 PM, Brian Parkins wrote:
PSDS should be OK - Program Status Data Structure. The layout for it is defined externally by the SYSAPGPF file.

However, the EXTNAME is not correct and the keyword should be coded before PSDS -or- EXT coded as the first keyword. (Barbara detailed this in an earlier discussion.)


Brian, I think that what you wrote implies that EXTNAME could be coded before EXT. But actually, if EXT is coded, it must be first.

The rule is that if it's externally-described, either EXT or EXTNAME must be coded first. Usually, if you're going to code EXTNAME, you might as well just code EXTNAME first and not bother with EXT.

But if you don't need to code EXTNAME because the file name is the same as the data structure name, then you can just code EXT first. That saves you having to code the external name twice, once for the DS name and once for the EXTNAME keyword.
    dcl-ds file1 ext extname('FILE1');
    dcl-ds file1 ext;                 // Me, I think this is better ...

Also, if you have some reason for wanting to code the EXTNAME keyword later in the keywords, then you have to also code EXT first.

So here are the three possible ways to use the EXT and/or EXTNAME keywords to define an externally-described data structure to use *LIBL/FILE1 as the external file. (In the third case, presumably there would be more keywords between EXT and EXTNAME.)

dcl-ds file1    ext;
dcl-ds anyname  extname('FILE1');
dcl-ds anyname  ext extname('FILE1');



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.