Suppose you copied all the physical file objects -- with data -- from an existing library to a new library.
Sometimes there are some physical files for which data is not copied -- they are empty in the new library. But the same physical files are having data in existing library from which they were copied. The exact causes of the problem can be seen in the joblog, and it may take some time for troubleshooting. You need a fast solution for the time being.
There is a quick way to check the empty files in new library.
Say you copied files from library OLDLIB to library NEWLIB. Once all of the file objects have been copied in NEWLIB, you run the following SBMJOB command.
SBMJOB CMD(DSPFD FILE(NEWLIB/*ALL) TYPE(*MBRLIST) OUTPUT(*OU TFILE) FILEATR(*PF) OUTFILE(MYLIB/FILE_STATS)) JOB(FILE_STATS)
After this SBMJOB is complete, you will have a physical file FILE_STATS in library MYLIB.
To view the physical files whose data was not copied, you can run the following SQL query on the physical file FILE_STATS.
SELECT MLFILE, MLLIB, MLFILA, MLFATR, MLNOMB, MLNAME, MLNRCD, MLMTXT, MLSEU2 FROM MYLIB/FILE_STATS WHERE MLNRCD = 0
The result of this query shows you all of the physical files with no data. It gives the information about the data -- in physical files -- in library NEWLIB at member level, which is of great use.
Now, you can easily identify those culprit physical files, and copy the data manually as a quick solution for the time being. This list of culprit physical files will also help you in troubleshooting as you know the exact location of the problem.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.