No native way to do it.
Just get the physicals set up, and then use DSPDBR to identify the dependent logicals and CRTDUPOBJ to duplicate them (this works fine as long as all of your physicals and logicals exist inthe same production library - CRTDUPOBJ will maintain the "same library" relationship.) Now if some of your production logicals point to physicals in a DIFFERENT library, you will need to recreate the logicals from DDS, specifying the correct physicals.
Change management packages like Softlanding System's Turnover provide this functionality.
It is trivial to write a little CL that accepts a list of one or more physicals, does a DSPDBR for each into an output file, and then reads through the file performing a CRTDUPOBJ for each dependent logical found.
No matter what you do, use DSPDBR once you are done to make sure all your new test logicals are pointing to the correct physicals to avoid a production data disaster. If there are a lot of files involved, DSPDBR all the physicals into a single outfile, *ADDing records, and then just run a query that shows any physicals with a library <> the test library.
-Gary Patterson
Check out my EE profile: http://www.experts-exchang
Main Topics
Browse All Topics





by: daveslaterPosted on 2009-09-16 at 08:53:44ID: 25346995
Hi
change your current library to you production library where the physical files exist
chgcurlib prodlib
the use the crtdupobj command to create the logic files.
this will craeye the new logical files based on the physical files in the curent library.
dave