Journaling - Single File?

Posted on 2006-04-13
Last Modified: 2012-06-21
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!

Question by:Jojo1771
    LVL 13

    Accepted Solution

    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.

    LVL 26

    Assisted Solution


    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.

    LVL 5

    Author Comment


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


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    731 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