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




 p  myProcedurefiletoextractinformation...
 p         b export
 p myProcedurefiletoextractinformation...
 p pi N
 
d parm1 like(File1_Template.fld1)
 d parm2 like(File1_Template.fld2)
 d parm3 like(File1_Template.fld3)
 d DS_xml Likeds(xmlds_template) dim(9999)
 d DSoutput likeds(File1:*output) inz
 d qualified
 d errords Likeds(errorinfo_template)
 *;
 
if not %open(File1);
open(e) File1;
if %error;
errorDS.error = *on;
errorDS.file_status = file1infds.fstat;
doError('xxx01':
p_ErrorDS:
file1infds.fname);
return *off;
 endif;
endif;
 
chain(en) (parm1:parm2:parm3) File1;
if %found(File1) and not %error;
eval-corr DSoutput = DS_xml ;
 
return *on;
elseif %error;
errorDS.error = *on;
errorDS.file_status = file1infds.fstat;
return *off;
else;
errorDS.error = *off;
errorDS.file_status = file1infds.fstat;
return *off;
endif;
---------
As per IBM
If you are working with arrays:
If the source operand is an unindexed array data structure, the target data structure must also be an array data structure.
If the target operand is an unindexed array data structure, the operation works on each element of the array data structure, following the same rules as EVAL with an array result. %SUBARR may be used to restrict the number of elements used in either the source or target data structure array.
If one subfield is an array, both subfields must be arrays. If the dimension of one array subfield is smaller than the other, only the smaller number of array elements is assigned. If the target subfield has more elements, the additional elements are unchanged by the EVAL-CORR operation.
-------------
 does DSoutput requires to be declared with dim(9999) to process all 9999 elements? what changes I might need  to process all elements?

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.