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



Embedded SQL doesn't play well with DS subfields...I'm not sure but I
*think* this is addressed in V5R4???


Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Gene Burns
Sent: Thursday, September 21, 2006 11:34 AM
To: RPG programming on the AS400 / iSeries
Subject: SQL unable to bring in data to DS subfield?

Using the following code snippets in an SQLRPGLE program did not work.  
The tmyy96 field is in a file that is also used by the program for input

in addition to being accessed through SQL.
The compile error stated that tmyy96 was undefined or unusable.
The field tmyy96 was being used as a subfield in a data structure.  When

I removed it from the data structure, the program compiled without 
errors.  Strange, but perhaps something to watch out for when using 
embedded SQL.

    c/exec sql
    c+ declare c1 cursor for
    c+ select agnt96, name96, city96, stat96, zip596, zip496, iacd96, 
tmyy96
    c+ from hagents order by name96
    c/end-exec
                                             
    c/exec sql
    c+ fetch c1 into :agnt96, :name96, :city96, :stat96, :zip596,
:zip496,
    c+               :iacd96, :tmyy96
    c/end-exec              


Gene

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.