---
title: IBM i journaling
description: Much has already been written about IBM i journaling, Database journaling is as old as IBM i. In the SQL world, the setup of journaling is a no-brainer.
image: https://blog.easi.net/hubfs/API%20documentation%20Swagger%20-%20header%20-%20EN-1.jpg
---

[![Home](https://blog.easi.net/hubfs/easi-logo.svg)](https://easi.net)

 Hit enter to search

- [All](https://blog.easi.net/en)
- [Adfinity](https://blog.easi.net/en/tag/adfinity)
- [Cloud](https://blog.easi.net/en/tag/cloud)
- [Easi](https://blog.easi.net/en/tag/easi)
- [Microsoft](https://blog.easi.net/en/tag/microsoft)
- [Rooftop](https://blog.easi.net/en/tag/rooftop)
- [Security](https://blog.easi.net/en/tag/security)
- [SmartSales](https://blog.easi.net/en/tag/smartsales)
- [Spoom](https://blog.easi.net/en/tag/spoom)

[Go back to the blog](https://blog.easi.net/en?hsLang=en)

# [IBM i journaling](https://blog.easi.net/en/ibm-i-journaling)

[![Author Avatar](https://blog.easi.net/hs-fs/hubfs/RHEL-small.jpg?width=149&quality=low) Rudi van Helvoirt](https://blog.easi.net/en/author/rudi-van-helvoirt)

Much has already been written about IBM i journaling, Database journaling is as old as IBM i. In the SQL world, the setup of journaling is a no-brainer. In the world of Data Description Specifications (DDS), journaling is in many cases put out of play. Not often, it is not even considered or seen as extra performance burden. The question if this is still valid today needs to be asked, after all our IT world is changing, so once in a while a reevaluated of the situation, is good practice if you ask me.

 

When working with SQL we create a Collection, for that we can use the SQL statement below:

 

create collection thewhyofjournaling;

 

SQL names are not limited 10 characters, IBM i names libraries are so when looking at the content of the collection in IBM i Access Client Solutions (ACS) => Database => Schemas we see:

![Picture 1](https://blog.easi.net/hs-fs/hubfs/Picture%201.jpg?width=966&name=Picture%201.jpg)

 

Please be aware that by in order to see additional Schemas, you need to add them yourself.

 

As we can see the name of the IBM i library created for the new collection is “THEWH00001”. When take a look inside this library, we see:

![Picture 2](https://blog.easi.net/hs-fs/hubfs/Picture%202.jpg?width=894&name=Picture%202.jpg)

The objects needed for journaling were created by SQL.

 

When we create a file based on the file QCUSTCDT in the Library QIWS available on every IBM i LPAR, we reverse engineer the table:

![Picture 3](https://blog.easi.net/hs-fs/hubfs/Picture%203.jpg?width=950&name=Picture%203.jpg)

 

After a slight modification of the script, we have the following result:

 ![Picture 4](https://blog.easi.net/hs-fs/hubfs/Picture%204.jpg?width=966&name=Picture%204.jpg)

 

As you may know SQL has the option reuse deleted records switched on by default. DSS has not, so if you create a physical file and if you want to reuse the space of deleted records, you have to overrule the default parameter. This link “[Reusing deleted records](https://www.ibm.com/docs/en/i/7.4?topic=options-reusing-deleted-records)” will give some background information about this subject.

When running this script, we can find the table pop up in the Schema, we created earlier:

 ![Picture 5](https://blog.easi.net/hs-fs/hubfs/Picture%205.jpg?width=966&name=Picture%205.jpg)

 

When the option “journaling” is taken, against this table we see a screen popping up:

 ![Picture 6](https://blog.easi.net/hs-fs/hubfs/Picture%206.jpg?width=724&name=Picture%206.jpg)

 

So by default, without having to specify anything, this file is being journaled with the before and the after images. When looking at the library, you understand how that is being achieved, for this 5250 emulation is coming to the rescue:

![Picture 7](https://blog.easi.net/hs-fs/hubfs/Picture%207.jpg?width=817&name=Picture%207.jpg)

 

This is part of a functionality in IBM i called “[Automatically starting journaling](https://www.ibm.com/docs/en/i/7.4?topic=journaling-automatically-starting)”. If you open that link, you will find the command “[Start Journal Library (STRJRNLIB)](https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/cl/strjrnlib.htm)”. So if you are not ready yet to start defining your database with SQL, but you do want to journal to be automated, this is the command to consider using yourself.

 

Although some may doubt the use of journaling if commit control is not used, there are occasions when journaling has very good use. The best example is to retrieve information about records being changed. We recently were asked to tell which user did change a field in a record, only because journaling was around we could.

For more information about commit control, you best start with the link: “[Commitment control concepts](https://www.ibm.com/docs/en/i/7.4?topic=control-commitment-concepts)”.

 

Another aspect of journaling is the cleanup of the journal receivers. When we look at what was created by the SQL command “Create collection” we need to have a look at the attributes of the journal created:

 ![Picture 8](https://blog.easi.net/hs-fs/hubfs/Picture%208.jpg?width=966&name=Picture%208.jpg)

 

When looking at the those properties, we see:

 ![Picture 9](https://blog.easi.net/hs-fs/hubfs/Picture%209.png?width=966&name=Picture%209.png)

 

The option “Delete receivers when no longer needed” value set to “No”, does look much promising when thinking of disk space.

 

A simple prompt of the command CHGJRN will clear this matter:

 ![Picture 10](https://blog.easi.net/hs-fs/hubfs/Picture%2010.jpg?width=966&name=Picture%2010.jpg)

 

 

When viewing the help text for the “Delete receivers” option:

 ![Picture 11](https://blog.easi.net/hs-fs/hubfs/Picture%2011.jpg?width=966&name=Picture%2011.jpg)

 

When viewing the help text for both the delay time fields:

 ![Picture 12](https://blog.easi.net/hs-fs/hubfs/Picture%2012.jpg?width=966&name=Picture%2012.jpg)

 

The maximum delay time possible is 1440 minutes, which is 24 hours. As most IBM i shops run a backup every day, we can rest assured that every journal receiver will only be deleted after it has been saved.

 

In case we want to be 100 % sure a journal receiver is never deleted premature, we need to give the help text have a better look. The parameter “DLTRCV” where the Exit Point “[QIBM\_QJO\_DLT\_JRNRCV](https://www.ibm.com/docs/en/i/7.4?topic=ssw_ibm_i_74/apis/XDLTRCV.htm)” is mentioned. For this, we need to write code to tailor our need.

 

IBM i was designed with journaling in mind, so do not think that your performance will degrade drastic. Be aware however of the impact on disk space of the journal receivers. So when starting with journaling, it is something you need to monitor closely.

 

I see journaling, be it auditing of for data changes to an object in a library or Integrated File System, as an insurance. The saying is “it's too late to lock the stable door after the horse has bolted”. So with journaling, you are better prepared to deal with unexpected situations. “Better safe than sorry” is another valid saying spot on for having journaling implemented.

 

Allow me to give me you one last example. Recently we were called by a customer informing us that a developer did execute his delete SQL script against the production file. A whole bunch of records were deleted. With the journal, we were able to recover the situation.

[Infrastructure](https://blog.easi.net/en/topic/infrastructure?hsLang=en) [IBM i](https://blog.easi.net/en/topic/ibm-i?hsLang=en)

## Current job openings

We are constantly looking for new colleagues!

If you share our values and you're looking for a challenging job in Belgium's Best Workplace, visit our website.

[Apply now](https://easi.net/en/jobs)

### Get our top stories in your inbox every month

## Follow us

[![Share on Facebook](https://static.hubspot.com/final/img/common/icons/social/facebook-24x24.png)](http://www.facebook.com/easi.net) [![Share on LinkedIn](https://static.hubspot.com/final/img/common/icons/social/linkedin-24x24.png)](https://www.linkedin.com/company/easi) [![Share on Twitter](https://static.hubspot.com/final/img/common/icons/social/twitter-24x24.png)](https://twitter.com/easi_net)

## Recent posts

![Microsoft 365 Copilot Cowork: From AI Assistant to AI Coworker](https://blog.easi.net/hubfs/Copilot%20Cowork%20is%20now%20available%20-EN%20%286%29-1.png)

### [Microsoft 365 Copilot Cowork: From AI Assistant to AI Coworker](https://blog.easi.net/en/solutions/microsoft/copilot-cowork-is-now-available?hsLang=en)

18/08/2022

![Microsoft 365 Archive goes file-level: how to cut SharePoint storage costs from July 2026](https://blog.easi.net/hubfs/Copilot%20Cowork%20is%20now%20available%20-EN%20%283%29.png)

### [Microsoft 365 Archive goes file-level: how to cut SharePoint storage costs from July 2026](https://blog.easi.net/en/solutions/microsoft/m365-archive-file-level?hsLang=en)

18/08/2022

![GRC in Belgium: Why PROTECT Is Where Insight Becomes Action](https://blog.easi.net/hubfs/GRC%20in%20Belgi%C3%AB%20-%20Protect%20-%20EN%20%281%29.png)

### [GRC in Belgium: Why PROTECT Is Where Insight Becomes Action](https://blog.easi.net/en/solutions/security/grc-in-belgium-why-protect-is-where-insight-becomes-action?hsLang=en)

18/08/2022

## Share this article

[![Share on Facebook](https://static.hubspot.com/final/img/common/icons/social/facebook-24x24.png)](http://www.facebook.com/share.php?u=https%3A%2F%2Fblog.easi.net%2Fen%2Fibm-i-journaling%3Futm_medium%3Dsocial%26utm_source%3Dfacebook) [![Share on LinkedIn](https://static.hubspot.com/final/img/common/icons/social/linkedin-24x24.png)](http://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fblog.easi.net%2Fen%2Fibm-i-journaling%3Futm_medium%3Dsocial%26utm_source%3Dlinkedin) [![Share on Twitter](https://static.hubspot.com/final/img/common/icons/social/twitter-24x24.png)](https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fblog.easi.net%2Fen%2Fibm-i-journaling%3Futm_medium%3Dsocial%26utm_source%3Dtwitter&url=https%3A%2F%2Fblog.easi.net%2Fen%2Fibm-i-journaling%3Futm_medium%3Dsocial%26utm_source%3Dtwitter&source=tweetbutton&text=IBM%20i%20journaling)

### Never miss our stories

## Related articles

[See all blog articles](https://blog.easi.net/en/tag/infrastructure)

![Bridging the Gap Between IT and OT](https://blog.easi.net/hubfs/Bridging%20the%20gap%20between%20and%20IT%20and%20OT.jpg)

### [Bridging the Gap Between IT and OT](https://blog.easi.net/en/bridging-the-gap-between-it-and-ot?hsLang=en)

Operational Technology (OT) and Information Technology (IT) are no longer worlds apart. With the...

[Read more](https://blog.easi.net/en/bridging-the-gap-between-it-and-ot?hsLang=en)

![What is a SOC (Security Operations Center) and why does my company need one?](https://blog.easi.net/hubfs/What%20is%20a%20SOC-1.png)

### [What is a SOC (Security Operations Center) and why does my company need one?](https://blog.easi.net/en/solutions/security/what-is-a-soc-security-operation-centre-and-does-my-company-need-one?hsLang=en)

A SOC, not to be confused with the socks on your feet, is a real security solution that can save...

[Read more](https://blog.easi.net/en/solutions/security/what-is-a-soc-security-operation-centre-and-does-my-company-need-one?hsLang=en)

![Disaster Recovery Plan: a must-have for every company](https://blog.easi.net/hubfs/Disaster%20recovery%20-%20a%20musthave%20for%20every%20company.jpg)

### [Disaster Recovery Plan: a must-have for every company](https://blog.easi.net/en/solutions/managed-cloud/disaster-recovery-a-must-have-for-every-company?hsLang=en)

It is undeniable, available applications at all times are crucial to guarantee the health of any...

[Read more](https://blog.easi.net/en/solutions/managed-cloud/disaster-recovery-a-must-have-for-every-company?hsLang=en)

- [Solutions](https://www.easi.net) 
    - [AAA Financials](https://www.easi.net/en/solutions/aaa-financials)
    - [Adfinity](https://adfinity.easi.net)
    - [Cloud2be](https://www.easi.net/en/solutions/managed-cloud)
    - [Rooftop](https://www.easi.net/en/solutions/rooftop)
    - [Security](https://www.easi.net/en/solutions/security)
    - [SmartSales](https://www.easi.net/en/solutions/smartsales)
    - [SmartDrive](https://smartdrive.easi.net)
    - [SmartShare](https://smartshare.easi.net)
    - [Synchro Production](https://www.easi.net/en/solutions/synchro-production)
- [Services](https://www.easi.net/en/services) 
    - [Mobile Development](https://www.easi.net/en/services/mobile-development)
    - [Software development](https://www.easi.net/en/services/application-development)
    - [Managed Services](https://www.easi.net/en/services/managed-services)
    - [On Premise infrastructure](https://www.easi.net/en/services/it-infrastructure-projects)
    - [Cosourcing](https://www.easi.net/en/services/co-sourcing)
    - [End user support](https://www.easi.net/en/services/end-user-support)
- [Company](https://www.easi.net) 
    - [About EASI](https://www.easi.net/en/about-easi)
    - [Jobs](https://www.easi.net/en/jobs)
    - [Blog](https://blog.easi.net)
    - [Press](https://www.easi.net/en/press)
    - [Customer stories](https://www.easi.net/en/customer-stories-references)
    - [Trainings](https://www.easi.net/en/trainings)
    - [Events](https://www.easi.net/en/events)
    - [Customer support](https://www.easi.net/en/customer-support)
    - [Legal](https://www.easi.net/en/about/legal/website-privacy-policy)
- Useful links 
    - [Microsoft](https://www.easi.net/en/services/microsoft)
    - [IBM Power Systems](https://www.easi.net/en/services/ibm-power-systems)
    - [IBM Notes](https://www.easi.net/en/services/ibm-notes)
    - [EASI Jump](https://www.easi.net/en/easi-jump)

- [Privacy](https://www.easi.net/about/legal/website-privacy-policy)
- [info@easi.net](mailto:info@easi.net)
- [+32 67 28 10 00](tel:+3216313000)
- [Contact](https://www.easi.net/en/contact)

- <https://www.linkedin.com/company/easi>
- <https://twitter.com/easi_net>
- <https://www.facebook.com/easi.net>
- <https://www.instagram.com/easi_net/>
- <https://vimeo.com/easinet>
- <https://www.youtube.com/user/EASIMedias>