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



Joe:

<snip>
This is one of the reasons I would like to have an option to define
prototype variables and data structures. The prototype variable would
only be used by the compiler as a reference for variables defined LIKE
the prototype. The prototype wouldn't be associated with any memory and
would not be allowed to be used outside the D specs. 
</snip>

When I need to use LIKE to define a field, but don't want the field/DS
to take up memory, I define it as...

      *===============================================================
     d lercdds       e ds                  extname(LTREDTA)           
     d                                     based(@)                   
     d                                     qualified                  
      *===============================================================
     d #rtvedta...                                                    
     d                 pr                  like(lercdds.ledata)       
     d  company                            like(lercdds.lecomp)       
     d                                     const                      
     d  service                            like(lercdds.leserv)       
     d                                     const                      
     d  rectyp                             like(lercdds.lertyp)       
     d                                     const                      

This is stored in a copy member.  I can also use LIKE in the procedure
interface to define the parms in the procedure, as long as I don't use
those fields in an embedded SQL statement (still at V5R2).

As long as I don't assign a value to the basing pointer (I use the
at-sign as a pointer that will NEVER be assigned storage), no memory is
assigned.

One way, anyway.
--Bruce Guetzkow





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.