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



Great news!  Love your persistence!

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





Ben_Pforsich@xxxxxxxxxxxx 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/17/2004 02:08 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: Can SQL recognize a nested data structure?











I think I figured it out... I didn't need to create a nested data 
structure
after all.  I simply added the field I needed for RRN at the END of the
external data structure:

d JPP010        e ds                  occurs(10)
d   RRN                         10s 0

Then I just switched the order I selected the fields in SQL:

c/exec SQL
c+ declare C1 cursor for
c+   select A.*, rrn(A)
c+     from JRP010 A
c+    where R1COM = :Company and R1IYR * 100 + R1IWK between
c+                  :FromIYRIWK and :ToIYRIWK
c/end-exec

And it works when fetch into the data structure JPP010 like I wanted it 
to.
SQLER3 returns the # of records actually fetched.  I guess I just assumed 
I
needed something complex...



  
                      CWilt@xxxxxxxxxxxx   
                      Sent by:                  To: rpg400-l@xxxxxxxxxxxx  
 
                      rpg400-l-bounces@m        cc:    
                      idrange.com               Subject:  RE: Can SQL 
recognize a nested data structure? 
  
  
                      08/17/2004 02:51   
                      PM   
                      Please respond to   
                      RPG programming on   
                      the AS400 /   
                      iSeries   
  




Actually,

I take that back.  It was a single row fetch into a DS with a larger 
number
of fields ( I was trying to do some overlaid arrays).

Charles


> -----Original Message-----
> From: Wilt, Charles
> Sent: Tuesday, August 17, 2004 2:45 PM
> To: rpg400-l@xxxxxxxxxxxx
> Subject: RE: Can SQL recognize a nested data structure?
>
>
> Matt,
>
> Do you know for sure that this works?  I've had problems
> trying to return
> data into a MODS when the number of DS subfields didn't match
> what SQL was
> expecting.
>
> Charles
>
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.