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

How to make empty a dataset?


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

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 2:27 pm
Reply with quote

hi

I just want to delete the data from the dataset through JCL.

Thanks in advance

mahi
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Sep 11, 2006 2:38 pm
Reply with quote

JCL does not handle data, it is a control language only.

O.
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 2:56 pm
Reply with quote

Is there any method through which we can empty the dataset.?

I heard that we can empty the datasets through JCL.

If any one knows plz help me.


thank you
Back to top
View user's profile Send private message
shyam_shagam

New User


Joined: 07 Sep 2006
Posts: 15
Location: india

PostPosted: Mon Sep 11, 2006 2:57 pm
Reply with quote

You can do it by using IEBGENER Util.
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY
//SYSUT2 DD DSN=Give your dataset Name,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFLDS=1
/*

Thanks,
Shyamsunder Reddy S icon_razz.gif
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 3:06 pm
Reply with quote

hi shyamsundar

thanks for your prompt response, what is 'generate maxfields=1'. I will try and let u know the results.

Thanks
Mahi
Back to top
View user's profile Send private message
shyam_shagam

New User


Joined: 07 Sep 2006
Posts: 15
Location: india

PostPosted: Mon Sep 11, 2006 3:24 pm
Reply with quote

Mahi,

I am sending attachment to clarify your doubts about IEBGERNR.

Find the attachment.

Thanks,
Shyamsunder Reddy S
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:31 pm
Reply with quote

Hi Mahi ,

U can use syncsort for this

//STEP010 EXEC PGM=SORT
//SORTIN DD DSN=filename,DISP=SHR
//SORTOUT DD DSN=filename,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OMIT COND=ALL
/*

Give same filename for sortin & sortout from which u want to delete the data
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 3:38 pm
Reply with quote

Thank you very much shyamsundar and ektha..

mahi
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:40 pm
Reply with quote

Mahi,
It's Ekta not ektha
Back to top
View user's profile Send private message
shyam_shagam

New User


Joined: 07 Sep 2006
Posts: 15
Location: india

PostPosted: Mon Sep 11, 2006 3:48 pm
Reply with quote

Ekta,

Its not working.....
I Submitted as below...........
I gave same file as input and output file...........

//STEP010 EXEC PGM=SORT
//SORTIN DD DSN=TST.M53.SRS.DCLGEN.EX1,DISP=SHR
//SORTOUT DD DSN=TST.M53.SRS.DCLGEN.EX1,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OMIT COND=ALL
/*

But the job is abended with return code is U0016
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:51 pm
Reply with quote

Hi Shyamsunder,

Do u have syncsort in ur shop
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 3:58 pm
Reply with quote

Hi Syamsunder & Ekta,

If I try to make empty a empty dataset...what will happend?

If it gives problem...then how to test the dataset to know whether it is empty or not? so that we can divert the empty step...if it is already empty.

Looking for your kind response...

Thanks
Mahi
Back to top
View user's profile Send private message
shyam_shagam

New User


Joined: 07 Sep 2006
Posts: 15
Location: india

PostPosted: Mon Sep 11, 2006 3:58 pm
Reply with quote

guptae,

Ihave Syncsort in my shop........

Is it working with your shop or not....... Could you please check it and let me know whether its working or not............

Shyamsunder S
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 4:10 pm
Reply with quote

Shyamsunder,

Its wrkg fine in my shop
Back to top
View user's profile Send private message
jruiza

New User


Joined: 31 Aug 2005
Posts: 23

PostPosted: Mon Sep 11, 2006 4:50 pm
Reply with quote

Hi,

I would like to make empty a dataset.

Which of the options described below is working?

Thanks in advance,
Jordi
Back to top
View user's profile Send private message
shyam_shagam

New User


Joined: 07 Sep 2006
Posts: 15
Location: india

PostPosted: Mon Sep 11, 2006 5:56 pm
Reply with quote

Hi Jordi,

You can use any one,depending upon your environment......
If you dont have Syncsor in your shop, then you can use IEBGENER

use the better one in better way.....

Thanks,
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 6:20 pm
Reply with quote

shyamsundar,

the solution u have given is not working fine with me.

Do I need to specify any other parametrs after the Generate maxflds=1 ?

Ekta,
urs is working fine with me.


thank you
mahi
Back to top
View user's profile Send private message
mahi

New User


Joined: 04 Apr 2006
Posts: 86
Location: Hyderabad

PostPosted: Tue Sep 12, 2006 12:01 pm
Reply with quote

Hi Ekta,

Your code is working good to empty a dataset.

Thanks a lot for sharing your knowledge!!

Regards,
Indra Sagar Reddy G
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Wed Sep 13, 2006 1:35 am
Reply with quote

You can also use IEBDG and here is example:

//STP0100 EXEC PGM=IEBDG
//********************************************************************
//*** IEBDG - GENERATE EMPTY LOW VALUE RECORD ***
//********************************************************************
//OUTDD DD DSN=XXXX.XXXXXXX.LOWVALUE.FILE(+1),
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(5,5),RLSE),
// DCB=(MODEL.DSCB1,BLKSIZE=0,LRECL=80,RECFM=FB)
//SYSIN DD *
DSD OUTPUT=(OUTDD)
FD NAME=DATA,
LENGTH=80,
FILL=X'00'
CREATE NAME=(DATA)
/*
Back to top
View user's profile Send private message
jaisai

New User


Joined: 13 Sep 2006
Posts: 2

PostPosted: Wed Sep 13, 2006 3:09 pm
Reply with quote

Hi ,

Try NAILDUMP utility.This should work.

Code:
//STEP01   EXEC PGM=NAILDUMP                               
//FILE     DD DSN=your filename,DISP=SHR               
.
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 FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts trying to make sense of keylists TSO/ISPF 11
Search our Forums:

Back to Top