|
Now, thinking of performance, (isn't that always the last thing we do in sql? :-)), you wish to consider not using a UDF, nor a SQL BIF on every row. Perhaps at first cycle time or some such animal you could determine that library name. For example: D aaakey e ds extname(aaakey) C/EXEC SQL C+ Set Option C+ Naming = *Sys, C+ Commit = *None, C+ UsrPrf = *User, C+ DynUsrPrf = *User, C+ Datfmt = *iso, C+ CloSqlCsr = *EndMod C/END-EXEC C/EXEC SQL C+ Declare C1 cursor for C+ SELECT LOC, COMP C+ FROM aaakey C/END-EXEC C/EXEC SQL C+ Open C1 C/END-EXEC /free LibName=%subst(sqlerm:x:y); /end-free // your fetch loop construct here... C/EXEC SQL C+ Fetch C1 into :loc, :comp C/END-EXEC C/EXEC SQL C+ Close C1 C/END-EXEC /free *inlr=*on; return; /end-free Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com
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.