ie, i would like the gF1Null dcl-s stmt to be :

dcl-s gF1Null int(5) dim(%columns('ORDD30WF1')) ;

instead of hardcoding the column count.

ORDD30WF1 is an externally ddl described work file.

tia,

John
(make sense?)


dcl-ds gF1Ds extname('ORDD30WF1') inz qualified end-ds;
dcl-s gF1Null int(5) dim( 8) ;
dcl-ds gF2Ds extname('ORDD30WF2') inz qualified end-ds;
dcl-s gF2Null int(5) dim(20) ;

select t1.*,t2.*
from ordd30wf1 t1 left outer join ordd30wf2 t2
on t1.ordnbr=t2.ordnbr and t1.ordlinnbr=t2.ordlinnbr

exec sql fetch mycsrF1 into :gF1Ds :gF1Null, :gF2Ds :gF2Null ;

if gF2Null(1) = -1 ;
status( %char(gF1Ds.ordnbr) ) ;
else ;
status( %char(gF1Ds.ordnbr) + ' ' + gF2Ds.FDNAME ) ;
endif ;
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 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].