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




And what the reason to fetch multiple records at the same time ?


“If you think education is expensive, try ignorance"

(Derek Bok, pres. of Harvard Univ. 1971-1990)




From: Hauser@xxxxxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Subject: AW: AW: SQL null indicators when not all columns are null capable
Date: Wed, 14 Apr 2010 20:18:55 +0200

NULL Values are used if you want to distinguish between Default (for example
*Blanks, *Zeros) and Nothing was inserted. Or if you do not like
'0001-01-01' for a default date.

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 hr@xxxxxxxxxxxx
Gesendet: Wednesday, 14. April 2010 20:32
An: RPG programming on the IBM i / System i
Betreff: Re: AW: SQL null indicators when not all columns are null capable

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.
--
This is the RPG programming on the IBM i / System i (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 IBM i / System i (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 IBM i / System i (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 IBM i / System i (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.