Solved

Unable to delete Find/Delete logical file

Posted on 2004-08-08
5
1,324 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Facing problems with you memory card? Cannot access your memory card? All stored data, images, videos are lost? If these are your questions...than this small article might help you out in retrieving your lost or inaccessible data.
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

911 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

22 Experts available now in Live!

Get 1:1 Help Now