Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    1

    Talking Unanswered: 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

  2. #2
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    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/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •