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



   <snip>
   I believe you need to include a U in the definition spec to identify
   this as a data area data structure.  Try this:

   DTEST             UDS                  DTAARA(RPGTEST1)
   </snip>

   If you use the UDS, the system will read the data area in at program
   startup
   and write it out at program termination.

   From the ILE RPG Reference V5R2 manual:

   Position 23 (Type of Data Structure)
   This entry is used to identify the type of data structure being defined.
   If a data
   structure is not being defined, this entry must be left blank.

   Entry Explanation
   Blank The data structure being defined is not a program status or
   data-area data
   structure; or a data structure is not being defined on this specification

   S Program status data structure. Only one data structure may be designated
   as the program status data structure.

   U Data-area data structure.
   RPG IV retrieves the data area at initialization and rewrites it at end of
   program.

   If the DTAARA keyword is specified, the parameter to the DTAARA
   keyword is used as the name of the external data area. If the name is a
   variable, the value must be set before the program begins. This can be
   done by:
   a** Passing the variable as a parameter.

   a** Explicitly initializing the variable with the INZ keyword.

   a** Sharing the variable with another module using the IMPORT and
   EXPORT |keywords, and ensuring the value is set prior to the call.

   If the DTAARA keyword is not specified, the name in positions 7-21 is
   used as the name of the external data area.

   If a name is not specified either by the DTAARA keyword, or by
   positions 7-21, *LDA (the local data area) is used as the name of the
   external data area.

   Without the UDS, you need to specifically use the IN and OUT operations.

   Your code doesn't show an IN before the OUT which would seem to account
   for the allocation error you are getting.
   ----------------------

   Scott A. Schollenberger
   Director, R&D
   TENEX Systems, a division of Harris Computer Systems
   2011 Renaissance Blvd., Suite 100
   King of Prussia, PA  19406
   Phone: 610-239-9988  Ext. 305
   Fax: 610-239-9995
   E-mail: saschollenberger@xxxxxxxxxxxx
   Web: www.tenexsys.com

   IBM Certified Specialist - eServer i5 iSeries Technical Solutions
   Implementer V5R3

   CONFIDENTIALITY NOTICE:  This email message, including any attachments, is
   for the sole use of the intended recipient(s) and contains confidential
   and privileged information.  Any unauthorized review, use, disclosure or
   distribution is prohibited.  If you are not the intended recipient, please
   contact the sender by reply email and destroy all copies of the original
   message.

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.