|
No, SQL reference.
D CustomerDS DS
D CustID 7P 0
D CustName 30A
D CustSales 7P 2
D CustomerInds S 5I 0 Dim(3)
D NullValue C -1
/Free
Exec SQL
Select CustID, CustName, CustSales
Into :CustomerDS :CustomerInds
From Customer
Where CustID = :InputCust;
If SQLState = '00000';
If CustomerInds(3) = NullValue;
PrintSales = 'No Sales';
Else;
PrintSales = ('Sales were $' + %Char(CustSales));
EndIf;
EndIf;
On Wed, Feb 13, 2019 at 1:37 PM Jeff Crosby <jlcrosby@xxxxxxxxxxxxxxxx>
wrote:
The RPG reference? OK, I'll look.
On Wed, Feb 13, 2019 at 4:34 PM Alan Campin <alan0307d@xxxxxxxxx> wrote:
Allow Null and %NullInd are for file I/O, not SQL.the
In SQL you create array of small int, one for each field in the data
structure. If null, array element is set to non-zero. All described in
manuals.both
On Wed, Feb 13, 2019 at 1:24 PM Jeff Crosby <jlcrosby@xxxxxxxxxxxxxxxx>
wrote:
I'm doing an SQL full outer join of 2 files looking for exceptions
hasways. The select is into data structures.
Obviously there will be instances where one or the other of the files
do Inothing so the DS fields will be null. I've got a ALWNULL(*USRCTL)
statement. I've got an If %Nullind (iITNBR) in the code.
The compiler barfs trying to put ALWNULL on the DS definition. How
myspecify ALWNULL on a DS? My googling skills are lacking today.
Thanks.
--
Jeff Crosby
VP Information Systems
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
direct.dilgardfoods.com
The opinions expressed are my own and not necessarily the opinion of
(RPG400-L)company. Unless I say so.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
affiliatemailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our
link: https://amazon.midrange.com--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
--
Jeff Crosby
VP Information Systems
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
direct.dilgardfoods.com
The opinions expressed are my own and not necessarily the opinion of my
company. Unless I say so.
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
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.