IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error while deleting a file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Jul 16, 2008 3:03 am
Reply with quote

I am trying to create a GDG index and then creating a model, my code is as below, i am getting an error while i scan before submitting, please help me
Code:
                                                         
//STEP1  EXEC PGM=IDCAMS                                     
//SYSPRINT DD   SYSOUT=*                                     
//SYSIN   DD *                                               
        DEFINE GDG(NAME(TTY314.BDB.SNDD817N.COMPRESS)      -
             LIMIT(12)                                   -   
             NOEMPTY                                     -   
             SCRATCH)                                       
/*                                                           
//STEP2     EXEC PGM=IEFBR14                                 
//OUTFILE   DD DSN=TTY314.BDB.SNDD817N.COMPRESS,           
//             DISP=(NEW,CATLG,CATLG),                       
//            UNIT=SYSDA,                                   
//            SPACE=(CYL,(200,200),RLSE),                   
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)           
/*     


===== -----------------------------------------------------------------------
====== E1 4 DSS20024W DATA SET 'TTY314.BDB.SNDD817N.COMPRESS' IS ALREADY CAT
====== IN 'CATALOG.DEVXY2'.
000001 //SAGDG325 JOB (TEST),'CCTEL', CLASS=5, MSGCLASS=A,
ENTRY 'TTY314.BDB.SNDD817N.COMPRESS' NOT FOUND+
** ENTRY 'TTY314.BDB.SNDD817N.COMPRESS' NOT DELETED
LASTCC=8
** VSAM CATALOG RETURN CODE IS 8 - REASON CODE IS IGG0CLEG-42
***
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Jul 16, 2008 3:22 am
Reply with quote

When i am keeping just step1 and omitting step2, i am not getting this error but when i am putting both the steps and do a scan the it says that
Data set is already catalogued.

I have also changed the DISp to (New,Keep, Delete).
But nothing works.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jul 16, 2008 3:29 am
Reply with quote

Hello,

To define a gdg, you only need the IDCAMS step. . .

Check with your storage admins - most places to not create "models" any more.

The IEFBR14 jcl is incorrect, but it should not be needed anyway. . .
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Jul 16, 2008 9:26 am
Reply with quote

Could you please let me know where it is incorrect?
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Jul 16, 2008 10:52 am
Reply with quote

You are trying to allocate 2 things by the same name thats where the error lies
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 16, 2008 11:38 am
Reply with quote

Hi,
meenakshi_forum wrote:
I have also changed the DISp to (New,Keep,
Delete).
Well, with this DISP JCL shows no errors in 'scan' for me, what error did you get ?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Jul 16, 2008 12:15 pm
Reply with quote

Meenakshi,

I ran the job that you had posted and it worked fine. No error messages were displayed when scanned (PREPed).
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Jul 16, 2008 12:18 pm
Reply with quote

Hi,
you can't build a GDG base and then try to allocate a dataset without using (+1) for the datset name.


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 16, 2008 12:51 pm
Reply with quote

Hi Gerry,

I think, She is trying to create 'GDG model' instead of first generation, please suggest if I got it wrong. BTW, I've never tried to create a GDG-model ever, not sure when it was used last across shops but Dick's answer gives me little hint..
Back to top
View user's profile Send private message
Apeksha

New User


Joined: 21 May 2008
Posts: 37
Location: Mumbai

PostPosted: Wed Jul 16, 2008 12:55 pm
Reply with quote

Hi Anuj,

What it means by GDG model? Could you please explain?
Back to top
View user's profile Send private message
Gousiya Mulla

New User


Joined: 02 Jun 2008
Posts: 87
Location: Bangalore

PostPosted: Wed Jul 16, 2008 2:35 pm
Reply with quote

Hi ,

Here you are creating base GDG and trying to allocate dataset with the same name .
I have tried to delete dataset with the below .

//STEP2 EXEC PGM=IEFBR14
//FILE01 DD DSN=Your file,DISP=(OLD,DELETE)

It ends in JCL error as
STEP2 FILE01 - DATA SET NOT FOUND
STEP2 - STEP WAS NOT EXECUTED.

So try allocating with (+1)s .
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 16, 2008 2:46 pm
Reply with quote

MODEL GDG - YUK !!!

They are no longer required if DFsms is installed and tailored correctly.
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Jul 16, 2008 3:43 pm
Reply with quote

Can anyone please give me the code to create GDG either through preparing a JOB or through File Aid?
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Jul 16, 2008 3:56 pm
Reply with quote

Use this JCL

//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG(NAME(GDGNAME) -
LIMIT(50) NOEMPTY SCRATCH )
//STEP2 EXEC PGM=IEFBR14
//GENER DD DSN=GDGNAME(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(10,5),RLSE)
//SYSIN DD DUMMY
Back to top
View user's profile Send private message
meenakshi_forum
Warnings : 1

Active User


Joined: 27 May 2008
Posts: 121
Location: India

PostPosted: Wed Jul 16, 2008 3:59 pm
Reply with quote

I have a silly question; Can anyone tell me that the GDG base is treated as a PDS or a PS?

After creating the index when we create the model then it is like a file, so in that case it should be PS, but i just wanted to know more about it, as when i try to get the information about an existing GDG base by typing 'I' against it then i get display as GDG base and i don't get the information about it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jul 16, 2008 4:04 pm
Reply with quote

Maybe you should use LISTCAT ENT(/) ALL

instead of

I
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 16, 2008 5:41 pm
Reply with quote

Hi Apeksha,

Apeksha wrote:
What it means by GDG model? Could you please explain?
Before you can create the files that attach to a GDG base, you need to create a model dataset that contains the DCB information for the files. This model data just needs to be a VTOC entry, it does not need to actually use up disk space. It is possible to create a different model dataset for every possible DCB combination, and some sites actually do that, but this needs a lot of effort to maintain. Many sites use a single model dataset, and then override the DCB information to build the correct type of file. To create a model DCB, use a dummy IEFBR14 job like this

Code:
//STEP2  EXEC PGM=IEFBR14
//MODEL1 DD   DSN=I.AM.GDG.MODEL,
//            DISP=(NEW,KEEP,DELETE),
//            UNIT=SYSDA,
//            SPACE(TRK,0),
//            DCB=(LRECL=80,RECFM=FB)


The SPACE=(TRK,0) parameter means that this file will just be created as a VTOC entry, it will not use up disk space.


But as Dick & Expat has mentioned, just to quote again..
Quote:
They are no longer required if DFsms is installed and tailored correctly.

And as I said earlier I've never tried to create a GDG-model ever at my shop.


Hope this helps..
Back to top
View user's profile Send private message
Apeksha

New User


Joined: 21 May 2008
Posts: 37
Location: Mumbai

PostPosted: Wed Jul 16, 2008 5:47 pm
Reply with quote

Hi Anuj,

Thanks for the infomation, this clears the thing along with the explaination by Dick & Expat. As we do not create GDG models, So I was unaware of it.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jul 16, 2008 5:52 pm
Reply with quote

You are welcome.. icon_smile.gif

Ad
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Aug 29, 2008 1:06 pm
Reply with quote

Hi,
meenakshi_forum wrote:
I have a silly question; Can anyone tell me that the GDG base is treated as a PDS or a PS?
It should not be called either PDS or PS, that's why it's given a different name- GDG Base.


PS. Probably I also want a better explanation here..
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top