When a new data dictionary is created via m-Power, we utilize SQL to create a new database schema (sometimes called a data library) and populate it with the necessary tables to make a working data dictionary. If you are using m-Power to connect to an iSeries (AS400) database, most likely you will notice that along with the new physical tables and logical tables we create for you, you will also see journaling files automatically created by your system. You can see if this is the case on your system by running this command: WRKLIB LIB(DATADICTIONARY) and taking Option 5. (Be sure to replace DATADICTIONARY with your actual dictionary name).
Depending on the age and overall usage of your data dictionary, you will most likely see more than a single journal receiver (In our case, QSSQJRN0001) — this is perfectly normal. Throughout the course of normal use, developers and users are interacting with the database and its tables, leading to the iSeries monitoring and journaling each activity. As more activity occurs, more journals are needed. Journals and their receivers were designed and implemented by your operating system to help you track changes that are made to the tables in your data library. Implementing and managing your journals are beyond the scope of this tech blog posting, but you can find more information about them here.
The purpose of this post is to help explain how to remove these journal entries. Some system administrators decide that journaling is not of use to them, and has a major downside: increased hard disk usage. Every time a data table changes in any way, it is logged by the system automatically. Naturally, journal files have the potential to be quite large. Administrators will often chose to delete them as an effort to reclaim hard disk space. If you have decided that journaling is not needed and you would like to free disk space, please follow the steps listed below to turn off and delete your journals.
Please keep in mind the following steps will need to be done for each existing data dictionary/schema and any new dictionary you may create in the future.
(Be sure to replace DICTIONARY with your actual data dictionary name)
Step 1: ENDJRNPF FILE(*ALL) JRN(DICTIONARY/QSQJRN)
This step is needed as you must end journaling on all files within a data library before proceeding
Step 2: DLTJRN JRN(DICTIONARY/QSQJRN)
Once the journal files have been stopped, you are free to delete the library’s journal.
Step 3: DLTJRNRCV JRNRCV(DICTIONARY/QSQJRN*) DLTOPT(*IGNINQMSG)
Now that the journal has been deleted, there will no longer be a lock on the journal receivers that are claiming your hard drive space. By default, all journals begin with QSQJRN so this author has chosen to utilize a wild card to remove all journals. Additionally, the *IGNINQMSG option is used to bypass a warning that the journal receiver was not fully saved. In our case, this is acceptable as we are not interested in using this receiver in the future.
You can verify that the journals and receivers have been deleted by taking another look at the WRKLIB LIB(DATADICTIONARY) command and see that the *JRN and *JRNRCV are now gone.
Pingback: E1 TipsHow To Delete Journal Receivers (*JRN & *JRNRCV) » E1 Tips