×
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.
On 2024-08-03 8:21 a.m., myibmi via RPG400-L wrote:
I recommend to work whenever possible with templates.
Example with your data:
dcl-ds xmldata;
file_in like t_file-in dim(100);
cnt_file-in int(5);
end-ds;
dcl-ds t_file_in template;
dcl-ds header;
dcl-subf file_number int(5);
end-ds;
service like tsf_service;
end-ds;
...
I think you meant to use LIKEDS, not LIKE.
With LIKE, file_in would be a CHAR subfield, not a sub-data-structure.
But aside from that, it's interesting that you prefer templates. One of
the reasons we added nested data structures to RPG was because it could
be difficult to understand complicated data structures for XML-INTO when
the final data structure definition was spread out over several small
data structures.
So, for me, the only time I would use a template for one of the nested
data structures would be when I actually wanted the smaller data
structure for something else, like a parameter for a procedure that only
handled some small part of the data.
As an Amazon Associate we earn from qualifying purchases.
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.