View previous topic :: View next topic
|
Author |
Message |
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
hi
I just want to delete the data from the dataset through JCL.
Thanks in advance
mahi |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
JCL does not handle data, it is a control language only.
O. |
|
Back to top |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
shyam_shagam
New User
Joined: 07 Sep 2006 Posts: 15 Location: india
|
|
|
|
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 |
|
Back to top |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
shyam_shagam
New User
Joined: 07 Sep 2006 Posts: 15 Location: india
|
|
|
|
Mahi,
I am sending attachment to clarify your doubts about IEBGERNR.
Find the attachment.
Thanks,
Shyamsunder Reddy S |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
Thank you very much shyamsundar and ektha..
mahi |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Mahi,
It's Ekta not ektha |
|
Back to top |
|
|
shyam_shagam
New User
Joined: 07 Sep 2006 Posts: 15 Location: india
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Shyamsunder,
Do u have syncsort in ur shop |
|
Back to top |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
shyam_shagam
New User
Joined: 07 Sep 2006 Posts: 15 Location: india
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Shyamsunder,
Its wrkg fine in my shop |
|
Back to top |
|
|
jruiza
New User
Joined: 31 Aug 2005 Posts: 23
|
|
|
|
Hi,
I would like to make empty a dataset.
Which of the options described below is working?
Thanks in advance,
Jordi |
|
Back to top |
|
|
shyam_shagam
New User
Joined: 07 Sep 2006 Posts: 15 Location: india
|
|
|
|
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 |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
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 |
|
|
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
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 |
|
|
jaisai
New User
Joined: 13 Sep 2006 Posts: 2
|
|
|
|
Hi ,
Try NAILDUMP utility.This should work.
Code: |
//STEP01 EXEC PGM=NAILDUMP
//FILE DD DSN=your filename,DISP=SHR
|
. |
|
Back to top |
|
|
|