|
Charles and Rick,
you have to define as much indicatios as selected fields.
It is neither possible to use a indicator data structure nor single
indicators in combination with a host structure. If you prefer named
indicators, you can define a data structure with named indicators and
overlay the data structure through an array.
D DSHostVar DS
D DelDate D
D OrdTotal 11P 2
D Arr1HostVar S 5I 0 Dim(2)
D Ds2IndHostVar DS
D Ind2DelDate 5I 0
D Ind2OrdTotal 5I 0
D Arr2HostVar 5I 0 Dim(2) overlay(DS2IndHostVar)
***************************************************************************
C/EXEC SQL
C+ Select OrHDly, OrHTot
C+ into :DSHostVar :Arr1HostVar
C+ from OrdHead
C+ where OrHNbr = :OrderNo
C/END-EXEC
C Arr1HostVar(1)Dsply
C Arr1HostVar(2)Dsply
C/EXEC SQL
C+ Select OrHDly, OrHTot
C+ into :DSHostVar :Arr2HostVar
C+ from OrdHead
C+ where OrHNbr = :OrderNo
C/END-EXEC
/Free
select
when Ind2DelDate = -1; //NULL value
DelDate = %Date();
when Ind2DelDate = -2; //Data mapping Error
DelDate = *LoVal;
EndSL;
Birgitta
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.