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



Hi Rob,

You're right -- that works great (and thanks for the quick example!), but
wouldn't it be simpler just to use:

D File          E ds                  extname(iim)
D  FileName       s             10a

C/exec sql
C  Select 'IIM', a.*
C  into :FileName,:File
C  from iim a
C  where iprod='JI'
C/end-exec
 /free
  *inlr=*on;
  return;
 /end-free

-- no need for pointers or 2nd ds. . . . ? (this is what Darren suggested,
and it works great, too).

Either one solves my immediate problem (thanks again!), but it looks as if
there's no way to shorten the SQL "into" clause to only one destination
name? In the example, it's really no big deal, but suppose I wanted to
SELECT A.*, B.* FROM IIM A JOIN FMA B  ON . . . and put the whole thing
into a data structure . . . .?

Just wondering . . .

rpg400-l@midrange.com writes:
>If you were talking about the following:
>D File          E ds                  extname(iim) based(pFile)
>D NewDS           ds
>D  FileName                     10a
>D  FileData                           like(File)
> /free
>  pFile=%addr(FileData);
> /end-free
>
>C/exec sql
>C  Select 'IIM', a.*
>C  into :FileName,:File
>C  from iim a
>C  where iprod='JI'
>C/end-exec
> /free
>  *inlr=*on;
>  return;
> /end-free
>
>That works also.
>
>Rob Berendt


Mike Naughton
Senior Programmer/Analyst
Judd Wire, Inc.
124 Turnpike Road
Turners Falls, MA  01376
413-863-4357 x444
mnaughton@juddwire.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.