×
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 2012/5/9 3:24 AM, Amanda Paul wrote:
p myProcedurefiletoextractinformation...
p b export
p myProcedurefiletoextractinformation...
p pi N
... other parms ...
d DS_xml Likeds(xmlds_template) dim(9999)
d DSoutput likeds(File1:*output) inz
d qualified
...
chain(en) (parm1:parm2:parm3) File1;
if %found(File1) and not %error;
eval-corr DSoutput = DS_xml ;
return *on;
...
If you want DSoutput to get all the information from all the elements of
DS_xml, then you could add the DIM keyword to DSoutput and then
eval-corr will assign all the elements from DS_xml to DSoutput.
d DSoutput likeds(File1:*output) inz
eval-corr DSoutput = DS_xml;
Do you always have data for all 9999 elements? If not, then you probably
want to use %subarr so that eval-corr only works with the elements from
DS_xml that actually have data.
eval-corr %subarr(DSoutput:1:num) = %subarr(DS_xml:1:num);
I'm wondering what DSoutput is for. It looks like it's local to the
procedure, and from what you included in your code, it looks like you
return right after the EVAL-CORR. So there doesn't seem to be any point
to the EVAL-CORR.
But assuming there's actually more code that uses DSoutput with a WRITE
opcode, then you'd have to change the WRITE opcode to have an index on
DSoutput.
eval-corr %subarr(DSoutput:1:num) = %subarr(DS_xml:1:num);
for i = 1 to num;
write rec DSoutput(i);
endfor;
But your code might be clearer if you move the EVAL-CORR into the for
loop rather than doing all the elements at once.
for i = 1 to num;
eval-corr DSoutput(i) = DS_xml(i);
write rec DSoutput(i);
endfor;
As an Amazon Associate we earn from qualifying purchases.