CLEAR.FILE
Moderators: chulett, rschirm, roy
CLEAR.FILE
Hi
I have the recomendation of use CLEAR.FILE &PH& as projects maintenance.
I have 3 questions about this:
1. Has this command the same efect than delete "manually" all files in &PH& directory? or does it make something else?
2. If the answer to 1 is that it does something else, how could I know it finished OK?
3. I found in this foro the following recomendation "regularly clear the contents of the &PH& and &SAVEDLISTS& directories and the directory whose pathname is recorded against the UVTEMP configuration parameter. That's about the only maintenance required at the UNIX level."
Does it apply to Windows environment too? I guess yes, but does it mean I have to include a "CLEAR.FLE &SAVEDLISTS&" and so on?
Thanks in advance, Cecilia
I have the recomendation of use CLEAR.FILE &PH& as projects maintenance.
I have 3 questions about this:
1. Has this command the same efect than delete "manually" all files in &PH& directory? or does it make something else?
2. If the answer to 1 is that it does something else, how could I know it finished OK?
3. I found in this foro the following recomendation "regularly clear the contents of the &PH& and &SAVEDLISTS& directories and the directory whose pathname is recorded against the UVTEMP configuration parameter. That's about the only maintenance required at the UNIX level."
Does it apply to Windows environment too? I guess yes, but does it mean I have to include a "CLEAR.FLE &SAVEDLISTS&" and so on?
Thanks in advance, Cecilia
-
- Participant
- Posts: 53
- Joined: Wed Nov 05, 2003 8:36 am
Hi,
I dont think CLEAR.FILE deletes any thing, it only clears the contents of the file i guess. With my limited knowledge on this topic But i checked the Basic manual here is what it says
Siva.
I dont think CLEAR.FILE deletes any thing, it only clears the contents of the file i guess. With my limited knowledge on this topic But i checked the Basic manual here is what it says
Code: Select all
Use the CLEARFILE statement to delete all records in an open dictionary or data
file. You cannot use this statement to delete the file itself. Each file to be cleared
must be specified in a separate CLEARFILE statement.
Re: CLEAR.FILE
Yescecilia wrote:1. Has this command the same efect than delete "manually" all files in &PH& directory?
Yescecilia wrote: 3. I found in this foro the following recomendation "regularly clear the contents of the &PH& and &SAVEDLISTS& directories and the directory whose pathname is recorded against the UVTEMP configuration parameter. That's about the only maintenance required at the UNIX level."
Does it apply to Windows environment too?
Yescecilia wrote: I guess yes, but does it mean I have to include a "CLEAR.FLE &SAVEDLISTS&" and so on?
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
The &PH& directory is not a hashed file. It is of a type whereby all records in that "file" are really files in a directory. Clearing the &PH& can be just as easily accomplished using a Unix rm statement or a DOS erase/del.sivatallapaneni wrote:Hi,
I dont think CLEAR.FILE deletes any thing, it only clears the contents of the file i guess. With my limited knowledge on this topic But i checked the Basic manual here is what it says
Notice that the rows (really files) are text viewable, not binary files.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Thanks a lot for the reply.
Keneth, I have a doubt yet: when I run CLEAR.FILE &PH& the file .uvnlsmap remains in the directory, in that way it's a bit different from delete all files manually. I guess it doesn't matter if .uvnlsmap exist or not, it will be recreated when a job run again, Am I right?
And taking advantage of your good will, a couple more
:
1. Is it recomended to do this maintance in this directories located in \Ascential\DataStage\Engine too (besides in each project) ?
2. I don't understand "the directory whose pathname is recorded against the UVTEMP configuration parameter". What directory is refered to?
Thanks again, Cecilia
Keneth, I have a doubt yet: when I run CLEAR.FILE &PH& the file .uvnlsmap remains in the directory, in that way it's a bit different from delete all files manually. I guess it doesn't matter if .uvnlsmap exist or not, it will be recreated when a job run again, Am I right?
And taking advantage of your good will, a couple more
![Embarassed :oops:](./images/smilies/icon_redface.gif)
1. Is it recomended to do this maintance in this directories located in \Ascential\DataStage\Engine too (besides in each project) ?
2. I don't understand "the directory whose pathname is recorded against the UVTEMP configuration parameter". What directory is refered to?
Thanks again, Cecilia
-
- Participant
- Posts: 53
- Joined: Wed Nov 05, 2003 8:36 am
Clearing the &PH& directory is about performance. As it fills with junk from aborted jobs over time, running jobs take longer to wrapup because this directory is full of thousands of files. The hidden file doesn't matter, don't worry about removing it.cecilia wrote:Thanks a lot for the reply.
Keneth, I have a doubt yet: when I run CLEAR.FILE &PH& the file .uvnlsmap remains in the directory, in that way it's a bit different from delete all files manually. I guess it doesn't matter if .uvnlsmap exist or not, it will be recreated when a job run again, Am I right?
No, because no DS jobs execute from the hidden "Engine" project.cecilia wrote: 1. Is it recomended to do this maintance in this directories located in \Ascential\DataStage\Engine too (besides in each project) ?
In the DSEngine directory is a file uvconfig. In there you set the directory for the engine to use to swap temporary work files. Take a peak at it, and then search this forum and you can get some background on it.cecilia wrote: 2. I don't understand "the directory whose pathname is recorded against the UVTEMP configuration parameter". What directory is refered to?
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
&PH& and &SAVEDLISTS& are normally type 1 files so there should be another hidden file name .Type1. Removing this file will make it a type 19 file. Type 1 and type 19 are UNIX directories or DOS directories. Type 19 is a longname directory which is better. I recommend resizing these files to type 19. I have explained why before. So when you clear these directories then clear all the directories below them as well. Do not remove the directory itself.
cd \&PH\&
rm -rf *
cd ..
cd \&SAVEDLISTS\&
rm -rf *
Is the equivalent of these TCL commands:
CLEAR.FILE &PH&
CLEAR.FILE &SAVEDLISTS&
The &SAVEDLISTS& directory may not exist. If it does not then do not worry. Universe will treat these as files or like a hash file when there is a VOC entry for them which means you can list them.
LIST &SAVEDLISTS&
It is physically a directory and not a hash file but most of the commands that work on hash files will work on these files. Each record is a complete UNIX file or DOS file. This can be very powerful as to looking for files in BASIC. You can process them without creating a VOC entry with a "openpath" statement in BASIC. Ray has posted some code to show a better way to wait for a file. Do a search if you are interested.
Just a little extra info for those trying to learn Universe.
cd \&PH\&
rm -rf *
cd ..
cd \&SAVEDLISTS\&
rm -rf *
Is the equivalent of these TCL commands:
CLEAR.FILE &PH&
CLEAR.FILE &SAVEDLISTS&
The &SAVEDLISTS& directory may not exist. If it does not then do not worry. Universe will treat these as files or like a hash file when there is a VOC entry for them which means you can list them.
LIST &SAVEDLISTS&
It is physically a directory and not a hash file but most of the commands that work on hash files will work on these files. Each record is a complete UNIX file or DOS file. This can be very powerful as to looking for files in BASIC. You can process them without creating a VOC entry with a "openpath" statement in BASIC. Ray has posted some code to show a better way to wait for a file. Do a search if you are interested.
Just a little extra info for those trying to learn Universe.
Mamu Kim
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The hidden file .uvnlsmap should not be deleted, and is not deleted by CLEAR.FILE.
This records the NLS character map used for this particular directory.
It is only present if NLS is installed.
This records the NLS character map used for this particular directory.
It is only present if NLS is installed.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.