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
 

 

How to make empty a dataset?

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

New User


Joined: 04 Apr 2006
Posts: 86
Location: Pune

PostPosted: Mon Sep 11, 2006 2:27 pm    Post subject: How to make empty a dataset?
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: 2360
Location: Israel

PostPosted: Mon Sep 11, 2006 2:38 pm    Post subject:
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: Pune

PostPosted: Mon Sep 11, 2006 2:56 pm    Post subject:
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    Post subject: Re: How to make empty a dataset?
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: Pune

PostPosted: Mon Sep 11, 2006 3:06 pm    Post subject: Re: How to make empty a dataset?
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    Post subject: Re: How to make empty a dataset?
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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:31 pm    Post subject:
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: Pune

PostPosted: Mon Sep 11, 2006 3:38 pm    Post subject:
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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:40 pm    Post subject:
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    Post subject: Re: How to make empty a dataset?
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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 3:51 pm    Post subject:
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: Pune

PostPosted: Mon Sep 11, 2006 3:58 pm    Post subject:
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    Post subject: Re: How to make empty a dataset?
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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 4:10 pm    Post subject:
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    Post subject: Re: How to make empty a dataset?
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    Post subject: Re: How to make empty a dataset?
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: Pune

PostPosted: Mon Sep 11, 2006 6:20 pm    Post subject: Re: How to make empty a dataset?
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: Pune

PostPosted: Tue Sep 12, 2006 12:01 pm    Post subject:
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    Post subject: Re: How to make empty a dataset?
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    Post subject:
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    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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm


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