>Date: Thu, 11 Oct 2001 14:51:51 -0600 (MDT)
>From: James Rich <james@eaerich.com>
>
>>
>> P get_data          b
>> D get_data          pi
>> D    ds_parm                  100
>
>What is the '100' in the definition for?

I just made it up.  Using LIKE(globalds) would be better.

>
>> D ds                ds               based(pDs)
>> D   field1                      5p 0
>> D   field2                     10i 0
>
>Can I use the LIKE keyword after the BASED keyword?

Sure.

>I have defined a data structure that contains the fields that I want to
>pass by reference.  Trouble is that my subprocedure acts on those fields
>names as global variables and not as parms per se.

If the data structure is externally-described, just define it again
in your subprocedure, but based.  If it's internally-described, you
could put the subfield definitions in a copy file and /copy them into
both the global definition and the subprocedure one.  Or, if the nature
of the subfields allows, create a file so you can externally-describe it.
Then you could use PREFIX to be able to distinguish the global and
local versions.

Barbara Morris



This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.