|
Hi,
I really could need some help figuring out the actual problem. The problem
is that one user (so far) cannot execute the following commands on his
system:
CALL QSYS.QCMDEXC('OVRDBF FILE(WOPHDRS14C) TOFILE(RADDATZ/WOPHDRS14C)
MBR(*FIRST) OVRSCOPE(*JOB)', 0000000077.00000);
CALL QSYS.QCMDEXC('DLTOVR FILE(WOPHDRS14C) LVL(*JOB)', 0000000033.00000);
The error returned is: SQLCODE -443, Command too long (CPD0005).
Using QSYS2.QCMDEXC works to our surprise.
Please find all the details in the following iSphere discussion at
SourceForge:
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fisphere%2Fdiscussion%2Fgeneral%2Fthread%2F88326bf6%2F&data=02%7C01%7C%7C7b2256dc45434d83302b08d5753cc3c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636543826192038029&sdata=DvTksOYtns2uThzsv%2Bkk9xz8CkrxpkT%2FE%2Fa64J3Uq9Y%3D&reserved=0
The Java code in question is:
/**
* Executes a OVRDBF statement likes this:
*
* <pre>
* OVRDBF FILE(OVRFILE) TOFILE(LIBRARY/FILE) MBR(MEMBER) OVRSCOPE(*JOB)
* </pre>
*
* @param statement - SQL statement for executing the CL command
* @param toFile - file that is overwritten
* @param library - library the contains the file that is actually used
* @param file - file that is actually used
* @param member - member that is actually used
* @throws Exception
*/
private void overwriteDatabaseFile(Statement statement, String
toFile, String library, String file, String member) throws Exception {
String command = String.format("OVRDBF FILE(%s) TOFILE(%s/%s)
MBR(%s) OVRSCOPE(*JOB)", outputFile.getOutFileName(),
outputFile.getOutFileLibrary(), outputFile.getOutFileName(),
outputFile.getOutMemberName());
command = "CALL QSYS.QCMDEXC('" + command + "', " +
decimalFormatter.format(command.length()) + ")";
statement = createStatement();
statement.execute(command);
}
/**
* Executes a DLTOVR statement likes this:
*
* <pre>
* DLTOVR FILE(OVRFILE) LVL(*JOB)
* </pre>
*
* @param statement - SQL statement for executing the CL command
* @param toFile - file, whose overwrite is removed
*/
private void deleteDatabaseOverwrite(Statement statement, String
toFile) {
String command = null;
try {
command = String.format("DLTOVR FILE(%s) LVL(*JOB)", toFile);
statement.execute("CALL QSYS.QCMDEXC('" + command + "', " +
decimalFormatter.format(command.length()) + ")");
} catch (Exception e) {
if (!loggedCommand.contains(command)) {
loggedCommand.add(command);
ISpherePlugin.logError(String.format("*** Could not
delete database overwrite %s ***", command), e);
}
}
}
"Statement" is a java.sql.Statement create like this:
private Connection produceJDBCConnection(IBMiConnection
ibmiConnection, Properties properties) {
Connection jdbcConnection = null;
AS400JDBCDriver as400JDBCDriver = null;
try {
try {
as400JDBCDriver = (AS400JDBCDriver)
DriverManager.getDriver("jdbc:as400");
} catch (SQLException e) {
as400JDBCDriver = new AS400JDBCDriver();
DriverManager.registerDriver(as400JDBCDriver);
}
AS400 system = ibmiConnection.getAS400ToolboxObject();
jdbcConnection = as400JDBCDriver.connect(system, properties,
null);
addConnectionToCache(ibmiConnection, properties,
jdbcConnection);
} catch (Throwable e) {
}
return jdbcConnection;
}
Any ideas will be greatly appreciated.
Thanks,
Thomas.
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and email confirmation to the
sender.
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fwdsci-l&data=02%7C01%7C%7C7b2256dc45434d83302b08d5753cc3c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636543826192038029&sdata=OvfWipl7rg4%2FJZHr6P2FaShtxQxtYfNwnUfGjikhlOY%3D&reserved=0
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fwdsci-l&data=02%7C01%7C%7C7b2256dc45434d83302b08d5753cc3c1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636543826192038029&sdata=gf%2FLa2M%2BG3uSMqa6Xewsgt3qypUl%2BWYlmfb3b059CZE%3D&reserved=0.
As an Amazon Associate we earn from qualifying purchases.
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.