[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • Last Modified:

DB@ Journaling

This command:
STRJRNPF FILE(CMSDAL343/TBLBUDGETCOLUMNHIST) JRN(CMSFIL/QSQJRN)
keeps failing because TBLBUDGETCOLUMNHIST is more than 1o characters. How do I get journaling started for a long table name?
0
rmk
Asked:
rmk
  • 2
  • 2
1 Solution
 
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.

HTH,
DaveSlash
0
 
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.
0
 
tliottaCommented:
...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.

Tom


0
 
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.
0
 
tliottaCommented:
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.

Tom
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now