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



To expand on your reply, Patrik - I think I see Thomas' example - T1520DDG is a DSPF. Yes, the example given is a display-only example. And a couple pages further on has this sentence -

To read the next changed sub³le record, use the _Rreadnc() function.

Exactly what you suggest, Patrik. There are more samples in the Runtime Library Functions manual, though, that might be helpful. They us _Rreadnc, although I don't see it's use in a loop - one would take again advantage of how RPG examples do this.

I have looked at some of the _R* functions - there are more in C/C++ than we have in RPG. Some could be useful in writing a generic file processor that can handle null-capable fields - I recall such a tool created in the 90s that could not do that, IIRC.

Cheers
Vern

On 7/23/2023 4:53 AM, Patrik Schindler wrote:
Hello Thomas,

Am 23.07.2023 um 08:02 schrieb Thomas Burrows <thomas.burrows.1957@xxxxxxxxx>:

All I can find in V7R4 C++ manual is a LOAD ALL subfile program with no

ADD
Change
Delete

Capacity. Does anyone have a full subfile in C++
Congrats to your decision to try out C!

I struggle to understand the base problem. Adding an OPT column and using _Rreadnc() isn't that hard? Also, branching to functions handling your desired add/change/delete functions aren't particularly hard to implement?

It's all in the _R* functions. Do you have expertise in C++?

I'm not using C++ but plain C, and did not yet take time to convert my subfile templates from positional RPG to C. I have some expertise in C on OS/400. Maybe I can help if you have specific questions. But I won't do your homework. ;-)

In addition, C related questions might better be posted in the C400-List.

:wq! PoC



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.