Just following this discussion from the sideline, can anybody give me a 
reason to use a *NULL capable field in a commercial database ?
It seems to me that it only makes trouble !
/henrik
"Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
14-04-2010 19:33
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
AW: SQL null indicators when not all columns are null capable
Alan means, instead of specifying an array in the IND_ARRAY data structure
you should specify each indicator.
D IND_ARRAY             D               Occurs(10)
D   IND01                          5I 0
D   IND02                          5I 0
...
Good luck! The last time I tried it, it didn't work either.
(But perhaps meanwhile a PTF was sent out). 
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] 
Im
Auftrag von Rick.Chevalier@xxxxxxxxxxxxxxx
Gesendet: Wednesday, 14. April 2010 19:11
An: rpg400-l@xxxxxxxxxxxx
Betreff: RE: SQL null indicators when not all columns are null capable
Alan,
Would you be more specific please?  Can't do what?  The code was based on 
an
example right out of the SQL Programming link on the V5R4 InfoCenter site.
Specifically, Database-> Programming->Embedded SQL programming->Coding SQL
statements in ILE RPG applications->Using host structure arrays in ILE RPG
applications that use SQL.
From the web site:
The following example uses a host structure array called DEPARTMENT and a
blocked FETCH statement to retrieve 10 rows from the DEPARTMENT table.
DDEPARTMENT               DS                  OCCURS(10)
D DEPTNO                 01     03A
D DEPTNM                 04     32A
D MGRNO                  33     38A
D ADMRD                  39     41A
DIND_ARRAY        DS                  OCCURS(10)
D INDS                           4B 0 DIM(4)
...
C/EXEC SQL
C+ DECLARE C1 CURSOR FOR
C+    SELECT *
C+       FROM  CORPDATA.DEPARTMENT
C/END-EXEC
...
C/EXEC SQL
C+   FETCH C1 FOR 10 ROWS
C+     INTO :DEPARTMENT:IND_ARRAY
C/END-EXEC
Rick
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Alan Campin
Sent: Wednesday, April 14, 2010 11:28 AM
To: RPG programming on the IBM i / System i
Subject: Re: SQL null indicators when not all columns are null capable
The manual specifically states you cannot do this. I talked with IBM and
they pointed this out. What you have in effect is a two-dimensional array
which SQL does not support.
Privileged and Confidential.  This e-mail, and any attachments there to, 
is
intended only for use by the addressee(s) named herein and may contain
privileged or confidential information.  If you have received this e-mail 
in
error, please notify me immediately by a return e-mail and delete this
e-mail.  You are hereby notified that any dissemination, distribution or
copying of this e-mail and/or any attachments thereto, is strictly
prohibited.
As an Amazon Associate we earn from qualifying purchases.