Page 1 of 1
Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Sat Jul 17, 2021 11:05 am
by Harsh Deol
Hi,
Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
I'm not sure how to do it? Had it been a VSAM dataset I could have used DELETE statement but can we use that with a sequential files also?
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Sat Jul 17, 2021 9:21 pm
by Robert Sample
For a sequential data set, one approach would be to use IEBGENER with DD DUMMY input and output being the data set with DISP=OLD specified.
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Sat Jul 17, 2021 11:04 pm
by Harsh Deol
Hi Robert,
Thanks. Will DISP=SHR made a difference?
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Sun Jul 18, 2021 2:33 am
by Robert Sample
DISP=SHR may make a difference. DISP=OLD requires your job to have exclusive access to the data set. DISP=SHR says that you will share access. With other jobs / TSO users accessing the data set while you're trying to delete all records, you're not likely to delete the records. If no other jobs / TSO users are accessing the data set while your job is running, then DISP=SHR will work like DISP=OLD.
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Tue Jul 20, 2021 2:26 pm
by Taran Bhatia
What can be the practical use of this knowledge in the actual Job? Can there be a situation where we need to implement a solution like this?
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Wed Jul 21, 2021 6:56 pm
by Robert Sample
This situation does occur in production environments. It is not that common but it does happen.
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Wed Jul 28, 2021 5:02 pm
by Anuj Dhawan
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Posted: Fri Dec 09, 2022 6:03 pm
by Taran Bhatia
Thaks Robert and Anuj.