Journaling - Single File?

Ok so I don't know anything about the AS400. Im a .NET progamer. So I was hoping one of you gurus could lend me a hand.

My AS400 Admin swears that if we were to turn journaling on for a single PF called  bah in the  Test.lib, that all files in that lib would be journaled and the performance of our expensive AS400 would go to krap. I have read quite a few articles and they seem to all disagree with this and state that you use a certain command to journal one file at a time and you create a reciever file and all that stuff. I only need 1 out of lets say 1000 files in a libary to be journaled. So , I can use commitment control -  MSDTC on the  as400 and MS-SQL (Linked Server).

So, heres my question. Whos correct- Admin or web sites. And if the web site is correct, do you have a link to some page on IBM that states, like how to turn on journaling for one file, so I have somthing to present.

Thanks so much!

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.

The Start Journal Physical File (STRJRNPF) command allows journalling to be started for a single file:
The omit journal entry parameter prevents the logging of file opens and closes.

You would have to create a journal receiver:
and attach it to a journal:

I have frequently used this technique to trace data problems within a file, usually adding the IMAGES(*BOTH) parameter to include the before and after image of updates. That allows conclusive evidence as to who updated what.

Unless you are journalling a high volume transaction file on a busy system, the performance impact is minimal.

For more evidence, check IBM's information centre at:
where you can search for more details if needed.


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

It is possible, but the conditions would be unlikely and make little sense.

Journalling can have a couple different characteristics depending on system configuration and use of SQL. It is possible to have a library automatically start journalling for the files within it. It also depends on version of OS/400 (the operating system, which also determines the version of DB2).

This behavior is tied to "SQL collections" rather than "libraries" per se, but there are reasons to think of them as equivalent at times.

An SQL collection is a 'library' that was created by using the SQL CREATE COLLECTION statement, plus all of the SQL objects that get created within that library at that time. (A 'library' is one kind of container object under OS/400. It is kind of like a directory, but with important differences.) A collection can sometimes also be thought of as a 'database' though that has implications. One of the objects created in the collection will be a journal named QSQJRN. Tables created within a collection will be journalled through QSQJRN. If a journal named QSQJRN exists in a library, SQL tables created within that library will be journalled through it.

Also, a library may have an object that is of a type called a "data area", type is *DTAARA. If a library has a dtaara named QDFTJRN and the dtaara contains the name of a journal (and a couple other attributes), then tables created in that library will automatically start journalling through the named journal. This is relatively new, starting in recent releases of OS/400, not sure exactly when.

Those are some of the basics involved. I can see a possible sequence of events that _might_ result in the behavior stated by your Admin, but it seems highly unlikely. I can't think of any rational reason for having a system set up that way.

In short, your Admin isn't making sense. If what he says is true, you're connecting to an almost useless system. To be in the condition he claims is to be at some kind of transition point. Almost any change to the database definition (within any schemas on it) is going to trigger a ridiculous sequence of events.

More likely, you have an Admin who doesn't understand journalling. He has read a couple of articles that focused on some very specific behavior and doesn't realize that that's only a tiny aspect of it all.

If done reasonably correctly, journalling can even increase performance. It shouldn't hinder performance more than a few percentage points at any rate.

There should be no problem creating a journal that is both low impact and limited to single (or few) tables. The journal can even manage itself if necessary.

Jojo1771Author Commented:

Thanks so much. This is what I needed to know. Wish I could give you each 500pts.

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
IBM System i

From novice to tech pro — start learning today.