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



Tim Kredlo wrote:

I am receiving compile errors that I do not understand.
Running V5R2.
Source code / errors are as follows:
(CIPB0001 is a DDS declared CIpB00Fm screen format with input
fields)


FCIpB00Fm CF E WorkStn

017400 D InPut01 Ds LikeRec(CIPB0001:*Input) 017500 D I1 1 Dim(%Len(InPut01))

======>                  aa

*RNF3703 20 a 017500 The subfield or parameter definition is not
specified within a group.


017600 D                                     Overlay(InPut01:1)

======>                                      aaaaaaa

*RNF3601 20 a      017600  Keyword is not allowed for a field definition;
keyword
                           ignored.

Is it the 'LikeRec' that is causing the problem?
I did not see anything in the ILE RPG reference manual in the 'overlay'
keyword section restricting the use of 'overlay' with data structures
defined with 'likerec'.

I don't know if it's explicitly mentioned in the Reference, but no, you can't add your own subfields to data structures defined using LIKEREC.


If you need to remap some part of a LIKEDS data structure, you could define a BASED field, and set the basing pointer to the address of the LIKEREC DS:

D  I1                            1    Dim(%Len(InPut01)) BASED(P)
D  P                              *   INZ(%ADDR(INPUT01))

Alternatively, rather than remap the DS as a char array, you could just substring the data structure directly.

Cheers! Hans


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.