DB@ Journaling

Posted on 2011-10-18
Last Modified: 2012-05-12
This command:
keeps failing because TBLBUDGETCOLUMNHIST is more than 1o characters. How do I get journaling started for a long table name?
Question by:rmk
    LVL 18

    Accepted Solution

    Every table on the iSeries possesses a short-name (10 characters or less) and a long-name (although the two can be the same). If it's not specified on the CREATE TABLE command, the system will generate a short-name automatically. It's usually the first five characters of the long-name with a five-character numeric appended. When using SQL, you can specify either the short or long name.

    But, when using a “system” command like StrJrnPf, you have to use the “system” name ... which is the short-name.

    There are a few ways to determine the short-name if you have the long-name, but I find that the easiest way is to use the GUI , System i Navigator (a.k.a. Operations Navigator or iSeries Navigator). You find the table in question under the “Database” tab, right-click on it and select “Properties”. Under the “Details” tab, there’s a line for system-name. That’s the one you want to use in the StrJrnPf command.

    Let me know if that works for you. There are other ways to determine the short-name from the long-name, but if the solution above works for you, that should solve your problem.


    Author Closing Comment

    I actually worked around it by using the iSeries Navigator GUI to start journaling. But your suggestion now gives me a much needed way to script the journaling for my tables.
    LVL 26

    Expert Comment

    ...a much needed way to script the journaling for my tables.

    Is this for starting journaling on tables that have been around for a while? Or are you needing to start journaling for new tables as you create them?

    You can set a schema (a 'library') to journal new tables automatically. You can also use tools such as PDM to start journaling for a lot of tables that already exist.

    It's not clear what a "script" is needed for.



    Author Comment

    Because the database is provided by a 3rd party, every time they do an update we lose any objects we created in their schemas. So we put all of our objects in other schemas. Since our objects sometimes have to change with the 3rd party's object names, it makes it a lot easier to simply edit and re-run scripts.
    LVL 26

    Expert Comment

    Scripts (I'd normally assume you mean "a CL program") are certainly valuable. But if this is a program, it shouldn't need to be edited. It might be easy enough to let it adapt automatically. CL can use a lot of system features to adapt to changing sets of objects.

    Can you give a general example that has two or three objects in the 3rd-party schema and also your in-house schema? Maybe an alternative can be provided that would be helpful in the longer term. It might also be helpful to know what the OS version is.


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
    Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now