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


  • Subject: Re: Help on defining field names using an array
  • From: boldt@xxxxxxxxxx
  • Date: Tue, 22 Feb 2000 07:50:07 -0500



S R wrote:
>========================================================================
>FAB10LF  IF  F      69 15AI     1 DISK
>E                    I          14 17 0
>IDSSRPF      DS                             69
>I                                        1  15 ABKEY
>I                                    P  16  240I,1
>I                                    P  25  330I,2
>I                                    P  34  420I,3
>I                                    P  43  510I,4
>I                                    P  52  600I,5
>I                                    P  61  690I,6
>========================================================================
>I am trying to define the fields in positions 16 to 69 using an array in
the
>above program. But I am getting the following errors.
>
>QRG4072 Severity:  30   Number:   26
>        Message . . . . :   Subfield-Name specified already defined as
>          Subfield-Name. Specification line ignored.
>QRG4085 Severity:  30   Number:    2
>        Message . . . . :   Data Structure subfield name is invalid.
>          Specification line ignored.
>
>Can anyone please help me to fix this problem.

Ah, an RPG III question!  The problem is you can't code indexed
array elements as individual data structure subfields.  You can,
however, code arrays as data structure subfields, but then, it
must be the entire array.  In your example, it looks like you
want to code just the first 6 array elements as subfields.  If
you wanted all 14 array elements in your data structure, you
could code:

========================================================================
FAB10LF  IF  F      69 15AI     1 DISK
E                    I          14 17 0
IDSSRPF      DS
I                                        1  15 ABKEY
I                                    P  16 1410I
========================================================================

BTW, for those who've forgotten how to code RPG III, here is
the same code fragment in RPG IV:

========================================================================
Fab10lf    if   f   69    15aidisk
D dssrpf          ds
D   abkey                       15
D   i                           17p 0 dim(14)
========================================================================

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com


+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.