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



I should also point out that this question is not appropriate for this
list if you're writing a stored procedure in SQL.

If you're using SQL embedded in an RPG program, then this list is ok.

Charles

On Tue, May 12, 2009 at 9:59 AM, <DLee@xxxxxxxx> wrote:
Hi

I'm new working with SQL, and looking thru various manuals, it seems hard
to gleen out how to get the system date into a variable.
I specifically need to get it into a numeric (8,0) variable for later
comparison to a numeric (8,0) loan expiration date existing in our loan
file.
I need to check the expiration date against the current date to determine
if the loan has expired.

The only expamples I find are like: "select year(curdate()) from
sysibm/sysdummy1"  or "select current date from sysibm/sysdummy1"
And I definetely don't understand the concept of the "sysibm/sysdummy1" to
get the date.
And how can I get this stored in a variable?

I know I sound like a novice wit;h these questions,  I have done a lot of
embedded sql, but now I'm working with a sql stored procedure, and it
seems like a different world.

I'm hoping somebody can help me understand how to get what I'm looking
for.

Appreciate your help.

Darrell Lee
Information Technology
Extension 17127
--
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.