A temporary file (say TEMP1) is being created in QTEMP  Some data is then populated to TEMP1.  Using that data of TEMP1, another file FILE1 is populated.  After the successful population, TEMP1 in QTEMP is cleared.Sometimes, due to unknown reasons, this batch job fails after step three, when the TEMP1 in QTEMP has already been populated. Is there any way to see the data in this file (QTEMP/TEMP1)? To access the QTEMP of the submitted job?
Library QTEMP is generally only accessible from the job that owns it. There are third-party packages that can be implemented to allow direct access to another jobs QTEMP library, however, I'd just modify the program to monitor for this error message and then either print out the contents of the file. <CPYF FROMFILE(QTEMP/TEMP1) TOFILE(*PRINT)>
...copy it to another library where you can look at it using the DSPPFM command.
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your OS/400 questions -- or help out your peers by answering them -- in our live OS/400 discussion forums.
Ask the Experts yourself: Our OS/400 gurus are waiting to answer your questions.
Check out this Search400.com Featured Topic: 20 ways to ensure a smooth OS upgrade
This was first published in May 2004