Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Difference btwn uncatalog & deleting a file & COPY s

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
pranta

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Fri Mar 16, 2007 3:12 pm    Post subject: Difference btwn uncatalog & deleting a file & COPY s
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 3:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 3:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Mar 16, 2007 3:28 pm    Post subject:
Reply with quote

Expat,

Quote:
you can delete a file without deleting the catalog entry


Could you please share more information on this?
Back to top
View user's profile Send private message
pranta

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Fri Mar 16, 2007 3:29 pm    Post subject:
Reply with quote

Tkanks a lot for your quick response.
Back to top
View user's profile Send private message
pranta

New User


Joined: 23 Feb 2006
Posts: 16

PostPosted: Fri Mar 16, 2007 3:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Mar 16, 2007 3:47 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 3:56 pm    Post subject:
Reply with quote

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
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Fri Mar 16, 2007 3:57 pm    Post subject: Re: Difference btwn uncatalog & deleting a file & CO
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 4:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 4:31 pm    Post subject:
Reply with quote

Oooooooooooops, forgot to mention,

if you use DELETE NOSCRATCH the catalog entry is untouched.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 16, 2007 4:33 pm    Post subject:
Reply with quote

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. icon_redface.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 16, 2007 7:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
padma_prakasam

New User


Joined: 06 Oct 2005
Posts: 31

PostPosted: Fri Mar 30, 2007 2:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 30, 2007 2:38 pm    Post subject:
Reply with quote

Then I suggest that there is a catalog'd version of said dataset in existence along with the uncatalog'd version.
Back to top
View user's profile Send private message
padma_prakasam

New User


Joined: 06 Oct 2005
Posts: 31

PostPosted: Fri Mar 30, 2007 2:46 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Mar 30, 2007 3:00 pm    Post subject:
Reply with quote

Depends, SMS can override KEEP to CATLG for DASD datasets. Usually is.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 30, 2007 10:07 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 3 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us