AS/400, Diff, Sequences

Trying to do a structural/data diff on an AS/400 before and after an operation.  We’re using the JTOpen AS/400 JDBC driver and Liquibase.  But even when we don’t include sequences on the diffTypes, liquibase tries to grab 'em, and fails:

liquibase.exception.JDBCException: Error executing SQL SELECT SEQNAME AS SEQUENCE_NAME FROM SYSCAT.SEQUENCES WHERE SEQTYPE=‘S’ AND SEQSCHEMA = ‘’
        at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:55)
        at liquibase.database.template.JdbcTemplate.query(JdbcTemplate.java:126)
        at liquibase.database.template.JdbcTemplate.query(JdbcTemplate.java:134)
        at liquibase.database.template.JdbcTemplate.queryForList(JdbcTemplate.java:177)
        at liquibase.database.structure.SqlDatabaseSnapshot.readSequences(SqlDatabaseSnapshot.java:572)
        at liquibase.database.structure.SqlDatabaseSnapshot.(SqlDatabaseSnapshot.java:94)
        at liquibase.database.structure.DB2DatabaseSnapshot.(DB2DatabaseSnapshot.java:26)
        at liquibase.database.DB2Database.createDatabaseSnapshot(DB2Database.java:242)
        at liquibase.diff.Diff.compare(Diff.java:62)
        at liquibase.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:135)
        at liquibase.commandline.Main.doMigration(Main.java:591)
        at liquibase.commandline.Main.main(Main.java:97)
Caused by: java.sql.SQLException: [SQL0204] SEQUENCES in SYSCAT type *FILE not found.
        at com.ibm.as400.access.JDError.throwSQLException(JDError.java:646)
        at com.ibm.as400.access.JDError.throwSQLException(JDError.java:617)
        at com.ibm.as400.access.AS400JDBCStatement.commonPrepare(AS400JDBCStatement.java:1578)
        at com.ibm.as400.access.AS400JDBCStatement.executeQuery(AS400JDBCStatement.java:2138)
        at liquibase.database.template.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:112)
        at liquibase.database.template.JdbcTemplate.execute(JdbcTemplate.java:48)

Suggestions?  Workarounds?

I haven’t used AS/400 db2 before.  Does the “SEQUENCES in SYSCAT type *FILE not found” error mean anything to you?

Nathan

Hello Sir. Are you successful using Liquibase on the AS400? I can’t get beyond… 

 PK_DATABASECHANGE in PMD1 type *N already exists

When trying to do a update 




Any help would be greatly appreciated. :o) 


Gary Eberhart

gary@cmcflex.com