Solved

Unable to delete Find/Delete logical file

Posted on 2004-08-08
5
1,296 Views
Last Modified: 2008-02-01
Dear sir,
I have a problem with while recreating 1 Physical File.
This phisical file having quite many Logical Files, i need to delete all the logical files before rercreating the PF.
The problem here is that some logical file were created during run time, into QTEMP library.
Due to some unknown reason, there's some LF still remain in the QTEMP and even I have signoff the userid, the LF file still remain.
I able to see the LF listing when use DSPDBR command on the PF.

 DSPDBR Command Input                                                  
   File  . . . . . . . . . . . . . . . . . . . : FILE       MP7LPLAN    
     Library . . . . . . . . . . . . . . . . . :            MPPDATAM    
   Member  . . . . . . . . . . . . . . . . . . : MBR        *NONE      
   Record format . . . . . . . . . . . . . . . : RCDFMT     *NONE      
   Output  . . . . . . . . . . . . . . . . . . : OUTPUT     *          
 Specifications                                                        
   Type of file  . . . . . . . . . . . . . . . :            Physical    
   File  . . . . . . . . . . . . . . . . . . . :            MP7LPLAN    
     Library . . . . . . . . . . . . . . . . . :            MPPDATAM    
     Member  . . . . . . . . . . . . . . . . . :            *NONE      
     Record format . . . . . . . . . . . . . . :            *NONE      
     Number of dependent files . . . . . . . . :                2      
 Files Dependent On Specified File                                      
   Dependent File         Library       Dependency   JREF    Constraint
       MP7LPL01           QTEMP         Data                            
       MP7LPL02           QTEMP         Data                            
                                                                       
I have checked and make sure all USERS related to this system to signoff, but still the LF is there.
Can anyone guide me on how to search and delete these 2 LF ?

Please help, urgent as user is waiting for us .
Million thanks.
0
Comment
Question by:chongcs76
5 Comments
 
LVL 3

Expert Comment

by:Mind_nl
Comment Utility
Looks like you still have 2 jobs active in your system that have the LF in their QTEMP library. They don't have to be users loged on, they could also be batch jobs waiting for data to be processed... If you have auditing nabled you might be able to find something in there on which job created the LF. If you can't find it you could always do an IPL and delete your PF then...
0
 
LVL 14

Accepted Solution

by:
daveslater earned 250 total points
Comment Utility
Hi
A litle known feature of the as/400 is the CHGPF.
You can use it along with the source file to change a file - OS/400 then automatically creates the new file, copies all the data (it warns you if any data can not be maped) and re-creates all logicals based on the file.

example

                          Change Physical File (CHGPF)                        
                                                                             
 Type choices, press Enter.                                                  
                                                                             
 Physical file  . . . . . . . . . FILE         > DB1                          
   Library  . . . . . . . . . . .              >   *LIBL                      
 System . . . . . . . . . . . . . SYSTEM         *LCL                        
 Source file  . . . . . . . . . . SRCFILE      > QDDSSRC                      
   Library  . . . . . . . . . . .              >   DSLIBEE                    
                                                                             

Have Fun


Dave
0
 
LVL 14

Expert Comment

by:daveslater
Comment Utility
PS to find out who is using the logicals use
WRKOBJLCK.
on the physical file - the users will have a member lock.

Dave
0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
Perhaps more importantly, WRKOBJLCK will tell you what _job_ holds a lock. This job might be a server job where a program ran and created the QTEMP files.

It might be necessary to take the system to restricted state in order to clean this up without causing other problems. If it's a pre-start job with limited usage, it might just go away on its own. Or it could hang around for months.

It's also possible that these are "orphaned" LFs and might require a RCLSTG.

If everyone has been signed off, I'd start looking for the more unusual possibilities. But WRKOBJLCK is the obvious place to start.

Tom
0
 

Author Comment

by:chongcs76
Comment Utility
Thanks to everyone who provided the answer.
I used CHGPF to recreate the file, and its very useful.

Special thanks to daveslater for providing the tips.

You guys make this forum a wonderful place to be.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now