Solved

Unable to delete Find/Delete logical file

Posted on 2004-08-08
5
1,334 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
ID: 11750477
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
ID: 11750852
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
ID: 11750856
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
ID: 11837193
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
ID: 11837778
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

773 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