简体   繁体   中英

How to rename a journaled library in ibm i 6.1?

I am currently busy writing a program that renames libraries. My problem is that when I try to rename a library and it has either a default journal "QDFTJRN" or a user defined journal.

How do I go about renaming libraries containing *JRN, *JRNRCV and QDFTJRN.*DTAARA?

My current thought process is to "ENDJRNPF" and delete *JRN, *JRNRCV and do the rename of the library "RNMOBJ". After this I do a "CRTJRNRCV", "CRTJRN" and "STRJRNPF".

That's a good plan. You'll need to know what files are journaled before ENDJRNPF/STRJRNPF. One way is to DSPFD FILE(yourlib/*ALL) TYPE(*ATR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE (QTEMP/DSPFD) and read through that. select phfile, phjrnl, phjrnm, phjrlb, phjrim, phjrom from dspfd where phjrnl='Y'

There is a potential problem with libraries that are in fact SQL schemas. Schemas are created using the SQL create schema statement. They get an SQL catalogue (all those SYS... files) and the QDFTJRN and associated receiver. It might be easier to SAVLIB to a save file, then RSTLIB to the new library name and create the journal and receiver manually.

All of this is a lot of work, I wish you luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM