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



not sure if you tried but what about using the RUNSQL command.
you could whip up a little CL

Bryan



Paul Bailey wrote on 11/29/2016 10:56 AM:
I'm messing about with some new files, building a small set with the Run
SQL Scripts plugin for IBM's ACS.

I've built a fairly standard set of SQL statements for dealing with a file,
starting with a CREATE, going through some LABELs, a few INSERTs and a
SELECT or two. I decided that the size of one field was too big so I ran
the following statement:
ALTER TABLE Employee_Details ALTER COLUMN Surname SET DATA TYPE CHAR(50);

I'm expecting that to change the length of Surname from 80 to 50. (This
example is a little contrived, for the sake of example, but this happens
for any ALTER TABLE or CREATE OR REPLACE statement where loss of data might
occur.)

If I run this in Run SQL Scripts, I get SQL State 57014, and "[SQL0952]
Processing of the SQL statement ended. Reason code 10." Looking at the job
log I find that I had message CPD32CC (Change to field ... may result in
data loss) followed by CPD32CC (Change of file ... cancelled). The second
level text for message CPD32CC says "The reply to inquiry message CPA32B2
specified that the change request be cancelled".

If I run the ALTER statement using STRSQL then the CPA32B2 inquiry message
pops up and I can type I to ignore the warning and complete the file change.

Is there a way to get the Run SQL Script tool to allow me to supply an
answer to the CPA32B2 message somehow? I don't really want to change the
default message reply for the whole machine.


-Paul.


P.S. I'm using ACS v1.1.6.1 and IBM i v7r1.


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.