Pro*fortran structures

From: flyershistory <flyershistory_at_hockeymail.com>
Date: 17 Feb 2003 07:54:48 -0800
Message-ID: <d7bdcf6c.0302170754.4fecc42f_at_posting.google.com>



Is it possible to fetch into "host structures" with Pro*fortran ?

I'd like the end result of a fetch to have a structure populated with results from an Oracle table (in some, but not all cases, the structure matches ths table structure).

So what I would like to have is code that would look something like:

            
EXEC SQL FETCH MY_CURS INTO     
1  :structure.var1 ,

1 :structure.var2 ,
1 :structure.var3

(I have seen that with pro*C you could have something like: EXEC SQL FETCH MY_CURS INTO :structure )

I'm suspecting I might need to do the following:

EXEC SQL FETCH MY_CURS INTO

1  :var1 ,
1  :var2 ,
1  :var3

structure.var1 = var1

structure.var2 = var2
structure.var3 = var3

This would be lots of extra work - the example I gave was simple. The structures I'm dealing with would contain dozens of variables. If it is possible to fetch directly into a record structure, what do I declare in the "EXEC SQL BEGIN DECLARE SECTION" ?

Thanks In Advance,
Peter Received on Mon Feb 17 2003 - 16:54:48 CET

Original text of this message