Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
-
- New Member
- Posts: 9
- Joined: Sat Nov 22, 2014 12:32 pm
Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
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?
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?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
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.
-
- New Member
- Posts: 9
- Joined: Sat Nov 22, 2014 12:32 pm
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
Hi Robert,
Thanks. Will DISP=SHR made a difference?
Thanks. Will DISP=SHR made a difference?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
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.
-
- Registered Member
- Posts: 15
- Joined: Wed Oct 22, 2014 8:51 am
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
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?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
This situation does occur in production environments. It is not that common but it does happen.
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: Is there a possibility to delete the ps file records thru JCL and make the ps file a fresh for code availability??
This post might also be of interest: https://zmainframes.com/zlog/delete-con ... mainframe/
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- Registered Member
- Posts: 15
- Joined: Wed Oct 22, 2014 8:51 am
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute