I am trying to delete the entire records in a KSDS VSAM file using CICS command. But the thing is that the EXEC CICS DELETE will delete just one record. I foundout that there is a GENERIC option that can be paired with NUMREC to delete a specific number of records. But still it doesnnt solve the problem of deleting all records. Is there any way to remove all records in a VSAM file.
1
There are 1 best solutions below
Related Questions in CICS
- How to define AIX(alternate index) in CICS FCT entry?
- WEB CONVERSE to an api returns invalid request error (RC=400)
- Where does a CICS region keep it's transaction definitions
- Why is my commarea's variable changing without reason?
- Preventing multiple tasks updating the same TSQ
- How to resolve Unable to put message to reply queue. MQRC=2110?
- EXEC CICS START TRANSID command
- Suppressing array data element in COBOL JSON GENERATE
- getting 2110 MQRC format error from Mainframe when sending request and getting reply from IBM MQ using JMS
- Calling REST API HTTPS endpoint in JSON format from Cobol 6.3
- xml request & response format when using DFHLS2WS
- soap header processing for cics service provider
- wsdl creation for CICS as a service provider using DFHLS2JS
- run db2 program usin spool write in cicsweb
- How to update vsam file records?
Related Questions in VSAM
- How to define AIX(alternate index) in CICS FCT entry?
- VSAM file read maven dependency
- Effective ways to avoid skipping a record
- How to run a Cobol application on Hercules mainframe emulator (Terminal 3270)
- How to update vsam file records?
- how to solve INVEREQ error in reading a vsam file?
- How to read a vsam file using CICS
- Delete entire content in a VSAM file
- READ from VSAM file using CICS
- Calculating the record size of alternate index for a VSAM ksds file
- VSAM file to be updated outside of mainframe
- Printing records from a VSAM KSDS shows characters with periods
- KSDS file - Duplicate key error in Ditto utility
- File status 39 in VSAM KSDS file
- How to read VSAM files from z/OS using Java?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If its a VSAM RLS file, then you can use the browse for update capability, ie you can browse through the file using READNEXT commands speciying UPDATE and a token. For each record returned you issue a DELETE command using the token returned from the READNEXT command.
If its a non RLS VSAM file, then you'd have to do it using a sequence of READ UPDATE commands specifying a TOKEN and then issuing a DELETE using the token. On the READ UPDATE command if you use the GTEQ option it will retrieve the next record with a key greater than or equal to the key you specify. So start with a null key and using GTEQ will find you the first record. On the next READ UPDATE with GTEQ if you use the previously found key, it will retrieve the next record after that. And so on.