MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to delete contents of BSAM or QSAM file?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Wed Oct 06, 2004 8:33 am    Post subject: how to delete contents of BSAM or QSAM file? Reply with quote

Hi,

BSAM or QSAM file data i want to delete all rows any command is there please give me reply. i am giving more detail description about my requirement. using 3.4 option we will open in edit mode and in first row dd and last row dd we write after we will press enter it will delete.instead of this any alternative method is there.

Regards,
Pgorthi Rolling Eyes
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Oct 06, 2004 9:03 am    Post subject: Reply with quote

Pgorthi,

Open your Dataset in edit mode and try this TSO command

Code:

   DEL ALL NX


Also if you had searched before posting you would have found this topic which discusses about deleting all records in a file.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2729&highlight=delete

Btw you can run a simple JCL using Sort/iebgener to delete all the records with a dummy dataset as input.

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Wed Oct 06, 2004 9:58 am    Post subject: Reply with quote

Hi Kolusu,

Sorry kolusu i searched using another string that's why i didn't find.
Now i tried DEL ALL NX command but it is saying invalid command. with out using rex is it possible. please suggest me.

Regards,
Pgorthi
Back to top
View user's profile Send private message AIM Address
pgorthi
Beginner


Joined: 13 Sep 2004
Posts: 33
Topics: 16

PostPosted: Wed Oct 06, 2004 10:26 am    Post subject: Reply with quote

Hi Kolusu,

i opened my file in edit mode but it is showing like browse mode in the contents of file and even not possible to edit any character. what is the problem?

regards,
Pgorthi Embarassed Crying or Very sad
Back to top
View user's profile Send private message AIM Address
tauras_kk
Beginner


Joined: 03 Oct 2004
Posts: 4
Topics: 0

PostPosted: Wed Oct 06, 2004 10:43 am    Post subject: Reply with quote

Pgorthi,

You might want to try this JCL (which uses IEBGENER utility)

//*
//Step01 EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,DCB=DCB Parameters of "FILE"
//SYSUT2 DD DSN=FILE,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//*


Regards,
Karthik
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Wed Oct 06, 2004 11:04 am    Post subject: Reply with quote

pgorthi,
The DEL NX ALL command does not work for you because, you are in BROWSE mode and not in EDIT mode. This is because, the file is too large to be opened in EDIT mode.

Method suggested by Karthik above, should work fine.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Oct 06, 2004 11:07 am    Post subject: Reply with quote

Pgorthi,

If your input file is huge then , you will be substituted with browse mode. This is due to Maximum initial storage allowed for Edit and View.

Check this topic for ways of changing that initial sotrage value.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2288&highlight=browse

You can use Karthik's suggested method to delete the contents of the file. But just change the disp=shr to disp=old for sysut2.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tauras_kk
Beginner


Joined: 03 Oct 2004
Posts: 4
Topics: 0

PostPosted: Wed Oct 06, 2004 11:19 am    Post subject: Reply with quote

Kolusu,

disp=shr works fine for me..any specific reason why this needs to be changed.

Cheers
Karthik
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Wed Oct 06, 2004 11:24 am    Post subject: Reply with quote

karthik,

Check this link which explains the difference between using DISP=SHR vs DISP=OLD

http://www.mvsforums.com/helpboards/viewtopic.php?t=1202&highlight=corrupted

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group