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



Thanks Rob. I am running V7R1 and do have the sql option. Thanks for the
feedback.
On Nov 5, 2014 1:13 PM, <rob@xxxxxxxxx> wrote:

Rick,

What version of the OS are you running? Newer versions of the OS have a
command called RUNSQL. With that command you can easily run
UPDATE MYFILE SET THATDATE=THATDATE + 1 YEAR
If its a numeric or character pretending to be a date field then there's a
few more considerations that you have to handle manually, like adding a
year to 20120229.

If you have an older version of the OS and do not have this command it's
not too hard to find a 'roll your own' version on the internet. The
appearance of this command is not dependent on having 57##ST1 loaded.

There is a command called STRSQL. It does require that you have 57##ST1
loaded. If you have that command and aren't using it, well, you're about
to embark on a fun new path and you're not in Kansas anymore.

I know that some people look at graphical user interfaces like they're the
tool of the devil but there is something called "System i Navigator".
Buried within it is something called "Run SQL Scripts" and you can easily
run that sql command from within that. This doesn't matter if you have
57##ST1 loaded or not.

You can also bury that command into a source member and use the command
RUNSQLSTM.

For a tutorial on SQL I used "SQL/400 Developer's Guide" by Paul Conte and
Mike Cravitz. It's rather dated but still a good training start.


Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From: Rick Mason <rmason62@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 11/05/2014 12:42 PM
Subject: Re: Updating records in a file
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



All i know at this point is that it appears to be a date field...wrong
year
in about 15,000 records.
Thanks
On Nov 5, 2014 12:33 PM, "Rick Mason" <rmason62@xxxxxxxxx> wrote:

Hi all,
I just found out a tax file will need be updated to correct an incorrect
date field.
I have not used DFU that much..i know i can change specific records in a
file via the record number but how can DFU change a date field in 15,000
records uni this file.
Thanks

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


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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.