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



Kirk,

Unless you have other processing that you need to perform between the time
you read the file containing the new value and time you issue the update,
you can do it in a single SQL statement.  I don't think the IBM supplied
tools will let you do exactly as you have described in CL.

Here's a SQL example if you don't need to process between the read and
update.

UPDATE table1 tab1
   SET (oldvalue) = (SELECT newvalue FROM table2 WHERE tab1.oldvalue =
oldvalue)
   WHERE oldvalue in (SELECT oldvalue FROM table2)

Regards,
Stan


-----Original Message-----
From: Kirk Yates [mailto:kirk.yates@usa.net]
Sent: Friday, 05 October, 2001 2:06 PM
To: Midrange-L List
Subject: SQL command?


I have several files that I need to change information in one field from
one value to another.  I have a file that has the old value and the new
value.  Is it possible to read the one file with CL, then pass the 2
variables to a SQL command that will update  a field in another file
when the field in the other file matches to old value that was read from
the file with a CL program?

--
Kirk Yates
Director of Data Processing
Rockwood School District



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.