|
Moved this to RPG list.. hopefully someone finds it helpful.
I looked into trying to mimic IBM's HTML example to modify the DATA-GEN program CSVGEN so that it would write a CSV header row based on the DS passed in.
I can't seem to get my arms around the calls and the parameters.
My DS looks like this:
dcl-ds csv qualified;
num_Customers int(10) inz;
dcl-ds Customers dim(50) inz;
id varchar(8) inz('');
name varchar(40) inz('');
addr1 varchar(40) inz('');
etc... many more fields
end-ds;
end-ds;
The initial call to the CSVGEN program when parm.event = QrnDgEvent_05_StartStruct, the number of subfields is only 1 and the subfield name is "csv".
The next call to CSVGEN under the condition, the subfields go to 49 (number of fields in csv.customers) and the subfield name is now "customers".
The example I copied from IBM (genHTMLtab) does not allow "nested" data structures.
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.