View previous topic :: View next topic |
Author |
Message |
mdisulaiman Beginner
Joined: 14 Nov 2003 Posts: 17 Topics: 10
|
Posted: Mon Dec 08, 2003 10:42 pm Post subject: deleting vsam file |
|
|
hai all,
is it possible to delete a vsam file through cics _________________ sulaiman |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Dec 09, 2003 5:56 am Post subject: |
|
|
mdisulaiman,
what exactly do you mean by delete a file? Do you want to delete the file (removing catalog entry) ? or is it just deleting the records in a vsam file?
If you want to delete the cluster entirely ,You can write the following JCL to a spool which will be submitted.
Code: |
//STEPO100 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE VSAM CLUSTER NAME
//*
|
Check this link for a detailed explanation of SPOOL
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFHCAP34/4.6?DT=19990319124947
on the other hand if you want to delete all records in a vsam file , then the simplest yet cumbersome way is to delete the records generically. A more complicated solution would be to issue system programmer's commands thru the pgm.
You can delete all records in a VSAM file with the following command.
Code: |
'CEMT S FILE(VSAME FILE NAME) CLOSED DISABLED EMPTYREQ'
| .
The vsam cluster must have been defined with the REUSE attribute, and must not be using RLS.once you issue that command and enable the file ,the next time the file is opened its data is erased.
check this link which explains in detail
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFHA8P00/2.141?SHELF=DFHPUSH0&DT=20011216184251
In order to use the above mentioned system commands you need to have the 'SP' translator option which accepts the system programmer commands, which are basically EXEC CICS SET, INQUIRE, PERFORM, CREATE..
Hope this helps...
cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
mdisulaiman Beginner
Joined: 14 Nov 2003 Posts: 17 Topics: 10
|
Posted: Tue Dec 09, 2003 9:51 pm Post subject: |
|
|
hai kolusu,
thanks for your info.
bye _________________ sulaiman |
|
Back to top |
|
|
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Wed Jan 15, 2020 2:55 pm Post subject: Ability to delete a sequential file from a CICS Map |
|
|
Only 17 years later, a similar question. here is the scenario:
A customer transmits a file to our mainframe and it gets stored in a sequential dataset (not a PDS). Our transmit process purposely does not allow a file to be sent to overlay what is existing in the sequential datsaset.
A job runs and abends in one of the programs, possibly because the file contained invalid data. We would like to "reset" the environment so that the job can be restarted.
This would entail our support staff choosing an option from a CICS screen which would update a few fields on a database. We would also like the CICS transaction to delete the sequential file so that a new customer file could be sent to replace the one containing the invalid data.
Is it possible to delete a dataset from within CICS? I know I could place a message in an MQ and trigger a job in that way, but didn't want to involve another technology if not needed.
[/u] |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
jim haire Beginner
Joined: 30 Dec 2002 Posts: 140 Topics: 40
|
Posted: Thu Jan 16, 2020 10:59 am Post subject: |
|
|
Thanks, Kolusu. I will give it a try! |
|
Back to top |
|
|
|
|