deleting vsam file
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> CICS and Middleware

#1: deleting vsam file Author: mdisulaiman PostPosted: Mon Dec 08, 2003 10:42 pm
    —
hai all,

is it possible to delete a vsam file through cics

#2:  Author: kolusuLocation: San Jose PostPosted: Tue Dec 09, 2003 5:56 am
    —
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

#3:  Author: mdisulaiman PostPosted: Tue Dec 09, 2003 9:51 pm
    —
hai kolusu,

thanks for your info.


bye

#4: Ability to delete a sequential file from a CICS Map Author: jim haire PostPosted: Wed Jan 15, 2020 2:55 pm
    —
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]

#5:  Author: kolusuLocation: San Jose PostPosted: Thu Jan 16, 2020 10:33 am
    —
jim haire,

You can use EXEC CICS SPOOL to submit a batch job to INTRDR. So simply generate the DELETE JCL and submit it to INTRDR

Here are a few examples

1. https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/applications/designing/dfhp3tz.html

2. Submit JCL to INTRDR from CICS

#6:  Author: jim haire PostPosted: Thu Jan 16, 2020 10:59 am
    —
Thanks, Kolusu. I will give it a try!



MVSFORUMS.com -> CICS and Middleware


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group