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



I'm trying to write an SQL routine to fetch the FFD for a file from
QSYS2/SYSCOLUMNs.  I need a MODS for the multiple row FETCH, but I also
need a dual-dimensioned MODS for the NULL indicator table to go with it.
(One OCCURS level for each record to be returned, with a sub-OCCURS for
each field being returned.)  Can this be done?  I don't know if a DIM as
the second level will work.  As I read it, the SQL for Host Languages
manual says it has to be a MODS.

This is basically what I need. . .

INDTBL   DS     OCCURS RECCNT
  FLDIND DS     OCCURS FLDCNT   
    IND 4B 0DIM(4)

FLDTBL          OCCURS RECCNT
  FLD1       XX
  FLD2       XX
   .
   .
   .
  FLDn       XX

So I can do something like FETCH FOR :RECCNT INTO :FLDTBL:INDTBL  

I've tried it with 1 one level indicator table, but I only get one
record back.  (I know there are 18 records there)  I'm thinking it is
because the indicator table is only 1 record deep. 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.