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



Never mind. I figured it out (and yes it was a junior programmer (not
me)
mistake. I just spotted it as soon as I sent it for him. (Null indicator
is set at 20).
Thanks for listening! (ha)

Bill






From: broehmer@xxxxxxxxxxxxxxx
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 05/26/2016 02:28 PM
Subject: DS Date Only Limitation?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



We have an SQL program that appears to only allow selection of a date
for the first 20 fields defined as date within a data structure. Any
attempt
to select/insert a date into the data structure after the 20th definition
results
in a blank or null date unless the field is defined as a character.
Here is a program that does this that we used to prove the issue:

DstrSql S 2000A Inz
DnullInds S 5I 0 Inz Dim(20)
//
DdsDate DS Qualified
D dt1 D
D dt2 D
D dt3 D
D dt4 D
D dt5 D
D dt6 D
D dt7 D
D dt8 D
D dt9 D
D dt10 D
D dt11 D
D dt12 D
D dt13 D
D dt14 D
D dt15 D
D dt16 D
D dt17 D
D dt18 D
D dt19 D
D dt20 D
D dt21 D
D dt22 D
D dt23 D
/Free

Exec SQL SET OPTION DATFMT = *ISO;

StrSql =
'SELECT DISTINCT +
DATE(''01/01/2015''), +
DATE(''01/02/2015''), +
DATE(''01/03/2015''), +
DATE(''01/04/2015''), +
DATE(''01/05/2015''), +
DATE(''01/06/2015''), +
DATE(''01/07/2015''), +
DATE(''01/08/2015''), +
DATE(''01/09/2015''), +
DATE(''01/10/2015''), +
DATE(''01/11/2015''), +
DATE(''01/12/2015''), +
DATE(''01/13/2015''), +
DATE(''01/14/2015''), +
DATE(''01/15/2015''), +
DATE(''01/16/2015''), +
DATE(''01/17/2015''), +
DATE(''01/18/2015''), +
DATE(''01/19/2015''), +
DATE(''01/20/2015''), +
DATE(''01/21/2015''), +
DATE(''01/22/2015''), +
DATE(''01/23/2015'') +
FROM qsys/qacjinfo';
Exec SQL PREPARE selDate FROM :strSql;
Exec SQL DECLARE cursorDate CURSOR FOR selDate;
Exec SQL OPEN cursorDate;
DoU sqlCod = 100;
Clear dsDate;
Exec SQL FETCH cursorDate INTO :dsDate :nullInds;
If sqlCod = 100;
Leave;
EndIf;
EndDo;
Exec SQL Close cursorDate;

*inLR = *On;
Return;

/End-Free

Any Ideas would be most appreciated.



Bill

"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments
accompanying it) contain confidential information belonging to the sender.
The information is intended only for the use of the intended recipient.
If you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution or the taking of any action in reliance
on the contents of the information is strictly prohibited. Any
unauthorized interception of this transmission is illegal under the law.
If you have received this transmission in error, please promptly notify
the sender by reply e-mail, and then destroy all copies of the
transmission."

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.