If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > CREATE ALIAS on iSeries gives SQL901 and SQL601

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-28-05, 16:39
mburdette mburdette is offline
Registered User
 
Join Date: Oct 2005
Posts: 1
Talking CREATE ALIAS on iSeries gives SQL901 and SQL601

Hi: I am trying to CREATE ALIAS on a PF with a MBR through a Java application but get these errors when I run it:

java.sql.SQLException: [SQL0901] SQL system error.
at com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:594)
at com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:565)
at com.ibm.as400.access.AS400JDBCStatement.commonExec ute(AS400JDBCStatement.java:742)
at com.ibm.as400.access.AS400JDBCPreparedStatement.ex ecuteUpdate(AS400JDBCPreparedStatement.java:1102)
at com.comporiumdata.ebpp.PrintBillPDF.TestPDF.main(T estPDF.java:62)
error dropping BLRTC.MKB4
java.sql.SQLException: [SQL0204] MKB4 in LIB type *FILE not found.
at com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:594)
at com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:565)
at com.ibm.as400.access.AS400JDBCStatement.commonExec ute(AS400JDBCStatement.java:742)
at com.ibm.as400.access.AS400JDBCPreparedStatement.ex ecuteUpdate(AS400JDBCPreparedStatement.java:1102)
at com.comporiumdata.ebpp.PrintBillPDF.TestPDF.main(T estPDF.java:91)

Then when I run the command again I get:

java.sql.SQLException: [SQL0601] MKB4 in LIB type *FILE already exists.
at com.comporiumdata.ebpp.PrintBillPDF.TestPDF.main(T estPDF.java:98)
at com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:566)
at com.comporiumdata.ebpp.PrintBillPDF.TestPDF.main(T estPDF.java:98)
error dropping BLRTC.MKB4
java.sql.SQLException: [SQL0204] MKB4 in LIB type *FILE not found.
at com.comporiumdata.ebpp.PrintBillPDF.TestPDF.main(T estPDF.java:98)
at com.ibm.as400.access.JDError.throwSQLException(JDE rror.java:566)
at com.comporiumdata.ebpp.PrintBillPDF.TestPDF.main(T estPDF.java:98)

As you can see, I am told that the file already exists and then immeidiatly afterwards that it could not be found.

Here is the SQL statement:

CREATE ALIAS LIB.MKB4 FOR LIB.THISFILE (THISMBR)

I can see the files (aliases) in the qsys2/SYSTABLES file.

Any idea what is going on? I suspect this is an authority issue since I got it to work in development on another iSeries.

tia
Reply With Quote
  #2 (permalink)  
Old 10-30-05, 05:15
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
Would "CREATE SYNONYM" be an alternative? That certainly avoids authorization problems, but on the other hand will be available for the current connection only.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On