I'd go with SEQUEL.
Paul Nelson
Cell 708-670-6978
Office 409-267-4027
nelsonp@xxxxxxxxxxxxx
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Steinmetz, Paul
Sent: Thursday, June 30, 2016 10:29 AM
To: 'Midrange Systems Technical Discussion'
Subject: RE: AS/400 query with date - 6 months
Below is my query select.
ODUDATCYMD LT '1160130'
DSPOBJD to an output file results with ODUDAT Last used date
(MMDDYY)
To compare an object's last use date, the ODUDAT needs to be reformatted
with the century added.
ODUDATCYMD is a result field from century year month day.
ODUDATCYMD ODUCEN || ODUDATY || ODUDATM || ODUDATD Last Used
Date (CYYMMDD)
I would like to replace the hardcoded literal '1160130' with a variable.
Paul
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Darren Strong
Sent: Thursday, June 30, 2016 11:06 AM
To: Midrange Systems Technical Discussion
Subject: Re: AS/400 query with date - 6 months
I'm assuming you're wanting to do some date arithmetic on today's date? If
so, I learned the following from the F1 screen in the Define a column
section of WRKQRY.
char(current(date)- 6 months,iso)
Looks like it works, except that the value isn't numeric, and I couldn't
find a way to make it so.
From: "Steinmetz, Paul" <PSteinmetz@xxxxxxxxxx>
To: "'Midrange Systems Technical Discussion'"
<midrange-l@xxxxxxxxxxxx>
Date: 06/30/2016 10:19 AM
Subject: AS/400 query with date - 6 months
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
I have an AS/400 query with a hardcoded date.
The date is today's date - 6 months.
Example 1160130.
I'd like to make this date a variable.
Can this be done within the query?
Or
Must it be done outside the query and pass the date as a variable to the
query?
Then, instead of calling RUNQRY, I would need to STRQMQRY.
Any thoughts from the group?
Thank You
_____
Paul Steinmetz
IBM i Systems Administrator
Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071
610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home
psteinmetz@xxxxxxxxxx
http://www.pencor.com/
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.