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



I've seen that RPG won't allow a data structure for input unless it was specifically defined for the file being read.


To get it to work you can just define a local ds for each file.

Dcl-ds inGogge11 EXTNAME(mugogge01l:*INPUT) QUALIFIED END-DS;

Chain (mugogge01l) inGogge11;
If %found(mugogge01l);
Eval-corr xGogge = inGogge11;
Endif;


--
Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.

From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Marco Facchinetti
Sent: Friday, August 19, 2022 6:42 AM
To: rpg400-l@xxxxxxxxxxxxxxxxxx
Subject: Likerec usage


Hi, probably it's very simple but I don't see where is the problem.



The compiler complaines (RNF7595 The result data structure does not include

a subfield in position 1 for a record format) on the chain (mugogge02l and

mugogge03l). The 3 record formats are exactly the same.





Dcl-f mugogge01l disk keyed usage(*input) usropn rename(gogge:gogge1);

Dcl-f mugogge02l disk keyed usage(*input) usropn rename(gogge:gogge2);

Dcl-f mugogge03l disk keyed usage(*input) usropn rename(gogge:gogge3);





Dcl-Proc v_Gogge;



Dcl-Pi *n ind;

Oggetto like(genclass) const;

xGogge likerec(gogge1:*all);

End-pi;



if %scan(%subst(Oggetto:1:1):'0123456789') > 0;

chain (Oggetto) mugogge01l xGogge;

Else;

chain Oggetto mugogge03l xGogge;

if not %found();

chain (Oggetto) mugogge02l xGogge;

Endif;

EndIf;



return %found();



end-proc;



Best regards

--

Marco Facchinetti

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.