|
Does the file MblSesP contain a date or time format field? I think
I've had issues with inserting a date/time field from SQL into a
host variable date/time field. It's pretty rare that I use embedded
SQL to pull an entire file's record into the program so I haven't
really dealt with this scenario specifically.
Michael Ryan on Wednesday, October 30, 2013 12:03 PM wrote:
Still can't get that external data structure to work.
Now I'm trying this:
D WkMblSesP E DS Dim(1000)
D Qualified
D ExtName(MBLSESP)
Exec SQL
Declare C1 Cursor For
Select * From MblSesp
Where Session_End is null;
Exec SQL
Fetch C1 For 1000 Rows
Into :WkMblSesP;
SQL5011: Position 20 Host structure array WKMBLSESP not defined or not usable.
I'm thinking that Fetch and external data structures don't work
together.
On Wed, Oct 30, 2013 at 12:55 PM, Birgitta Hauser wrote:
But even an array data structure cannot be used in composition
with an SELECT INTO!
You need a cursor. Within a cursor you can do a multiple row
fetch:
D MyArrDS DS Dim(100)
D Fld1 10A
D Fld2 10I 0
/Free
Exec SQL Declare CsrC01 Cursor For
SELECT ....;
Exec SQL Open CsrC01;
Exec SQL Fetch From CsrC01For 100 Rows into :MyArrDS;
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.