DB@ Journaling

This command:
keeps failing because TBLBUDGETCOLUMNHIST is more than 1o characters. How do I get journaling started for a long table name?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave FordSoftware Developer / Database AdministratorCommented:
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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rmkAuthor Commented:
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.
...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.


rmkAuthor Commented:
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.
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.