View previous topic :: View next topic
|
Author |
Message |
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
Hi Freiends,
I have some doubt regarding the following.Please have a look in it.
1.If we delete a file does that mean that we have uncataloged the file also?How can we access an uncataloged file..please provide sample JCLs if possible.
2.What is the difference between COPY and INC(include) a copyboob in a cobol program?In which case should we use what? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
1.If we delete a file does that mean that we have uncataloged the file also?How can we access an uncataloged file..please provide sample JCLs if possible. |
No, you can delete a file without deleting the catalog entry, as you can also delete a catalog entry without deleting the file.
How do you access an uncatalog'd dataset. You need to know the volser and the unit type on which the dataset resides and specify it in the JCL, so the answer to your JCL question is site specific. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
I should have added that it is normal to uncatalog the file when it is deleted, IDCAMS does this by default, but depending on which utility you use you can delete the file and retain the catalog entry. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Expat,
Quote: |
you can delete a file without deleting the catalog entry |
Could you please share more information on this? |
|
Back to top |
|
|
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
Tkanks a lot for your quick response. |
|
Back to top |
|
|
pranta
New User
Joined: 23 Feb 2006 Posts: 16
|
|
|
|
well few new questions has arised in my mind..
suppose i have deleted a file but retained it's catalog...shall i be able to restore back the file by cataloging it again or the contents of the file is lost? I think we can't....please correct me if i am wrong.
and please have a look in my 2nd question also...my friend faced that question in an interview. |
|
Back to top |
|
|
raak
Active User
Joined: 23 May 2006 Posts: 166 Location: chennai
|
|
|
|
What is the point in ( or advantage of ) deleting the file without Uncataloging it ??
Expat,
U told IDCAMS does this uncatalog by default. Can u explain a bit more on this?
Any example of a utility which ONLY DELETES the file without uncataloging?? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Quote: |
suppose i have deleted a file but retained it's catalog...shall i be able to restore back the file by cataloging it again or the contents of the file is lost? I think we can't....please correct me if i am wrong. |
All the catalog entry does is to point to which volume a dataset should reside on.
If it is DASD then the F1 DSCB needs to be present in the VTOC for the data to be accessible. So if you delete the F1 DSCB, i.e. delete the dataset, then to all intents and purposes the data is technically lost.
Quote: |
you can delete a file without deleting the catalog entry
Could you please share more information on this? |
Why would you wish to delete a dataset and leave the catalog entry intact ? |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Quote: |
What is the difference between COPY and INC(include) a copyboob in a cobol program?In which case should we use what? |
INCLUDE is a DB2 command and COPY is a COBOL command.
The INCLUDE statement inserts application code, including declarations and statements, into a source program.
The COPY statement is a library statement that places prewritten text in a COBOL program. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Raak,
When you use DELETE 'dataset name' with IDCAMS it will automatically
Remove the F1 DSCB from the VTOC
Remove the NVR or VVR from the VVDS - If SMS manged
Remove the catalog entry from the correct catalog
The utility in question is IEHPROGM which can be used to scratch a dataset without uncatalog. The only concievable use is to delete NON SMS managed datasets from NON SMS managed volumes.
If you use it on SMS managed volumes it may not remove the NVR or VVR from the VVDS and will need you to process a DELETE NVR or VVR. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Oooooooooooops, forgot to mention,
if you use DELETE NOSCRATCH the catalog entry is untouched. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Ooooooooooops, correction to that
DELETE NOSCRATCH will delete the catalog entry and not the dataset.
That will teach me to reply to posts whilst on the phone. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
This is one of the "features" that should not be used. The catalog and the physical dasd should be in sync.
When allowed, this causes problems more than 99% of the time.
Many centers will not allow this - uncataloged dasd files are automatically deleted nightly or weekly.
There is no good business reason to have an application file on dasd that is not in the catalog. If multiple copies of the file are needed, they may be copied and saved for future use (preferably to removable media and with a different dataset name). |
|
Back to top |
|
|
padma_prakasam
New User
Joined: 06 Oct 2005 Posts: 31
|
|
|
|
Hi,
Few more questions on UNCATLG...
To access an UNCATLG data set, is it mandatory to give its VOLSER number. Beacuse i have tried to copy an UNCATLG dataset to another and i didn't code VOLSER. It went fine.
Thanks,
Padma |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Then I suggest that there is a catalog'd version of said dataset in existence along with the uncatalog'd version. |
|
Back to top |
|
|
padma_prakasam
New User
Joined: 06 Oct 2005 Posts: 31
|
|
|
|
How does it exists like that? And if i'm not wrong dataset with disposition KEEP on normal termination will not be catalogued. So in that case too, we need VOLSER right? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Depends, SMS can override KEEP to CATLG for DASD datasets. Usually is. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
And you may not have copied the data you intended.
It would be a good thing to find out how many copies of this dsn are on various volumes. At one site, i was asked to look into an allocation problem and found 1 entry in the system catalog and 30 others spread across their dasd (one on each volume of that group). |
|
Back to top |
|
|
|