Troubleshooting
Problem
How the system handels logical files when duplicating libraries.
Resolving The Problem
Take the following scenario:
PF in library A
LF in library B
Copy library A to library C. Then Copy Library B to library D. The logical files in library D point to the physical file in library A instead of library C (putting library C at the top of my library list does not change behavior). RSTLIB and CRTDUPOBJ have the same results.
Summary: Copying a logical file into a different library will result in it still based on the original Physical file.
Reference:
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/cl/crtdupobj.html
States:
When a logical file is copied into another library, two cases determine the basing for the file:
Copy library A to library C. Then Copy Library B to library D. The logical files in library D point to the physical file in library A instead of library C (putting library C at the top of my library list does not change behavior). RSTLIB and CRTDUPOBJ have the same results.
Summary: Copying a logical file into a different library will result in it still based on the original Physical file.
Reference:
https://www.ibm.com/docs/en/i/7.5?topic=ssw_ibm_i_75/cl/crtdupobj.html
States:
When a logical file is copied into another library, two cases determine the basing for the file:
- If both the logical file and its based-on physical file are originally in the same library, a duplicate of the physical file must be created in the new library before a duplicate of the logical file is created. After these two duplicates are created, the new logical file is based on the new physical file.
- If the logical file and its based-on physical file are originally in different libraries, it is not necessary to duplicate the physical file before duplicating the logical file. In this case, the duplicated logical file will always be based on the same physical file as was the original logical file. Unlike the first case, even if the physical file is copied into the new library before the logical file is copied, the duplicated logical file is based on the original physical file, not on the duplicated physical file.
You need to recreate the logical files to get them directed to the proper physical files.
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000001i6QAAQ","label":"IBM i Db2-\u003EIndex \/ Access Path \/ Logical file"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Historical Number
637331945
Was this topic helpful?
Document Information
Modified date:
05 December 2024
UID
nas8N1010915