Delete 6th file of existing datasets



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Delete 6th file of existing datasets

Postby szvemana79 » Tue Nov 14, 2017 10:00 pm

mainframe files will be created on daily basis in the format of hlq.slq.tld.m171114( the fourth qualifier is in the format MYYMMDD). These are not gdg versions . These are flat PS files. My requirement is to keep only 6 files at any point of time.so i need to delete the 6th old file whenever a new file is created so that i have only 6 files at any point of time.

is it possible to do using JCL ?

Thanks & Regards
Vemsan
szvemana79
 
Posts: 2
Joined: Tue Nov 14, 2017 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Delete 6th file of existing datasets

 

Re: Delete 6th file of existing datasets

Postby NicC » Tue Nov 14, 2017 10:09 pm

Yes - JCL will run the program you use to do it. Unless you are willing to update the job manually with the data set(s)- not files - to be deleted you will possibly need to write a program to generate the delete request.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: Delete 6th file of existing datasets

Postby szvemana79 » Tue Nov 14, 2017 10:23 pm

Thank you for the quick reply. I want to do using JCL utility but not through program. Is it possible to do
szvemana79
 
Posts: 2
Joined: Tue Nov 14, 2017 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Delete 6th file of existing datasets

Postby Akatsukami » Tue Nov 14, 2017 10:48 pm

"JCL utility" is a meaningless term. Nothing can be done through JCL alone save establish environment and execute programs. If you (or your bosses) insist on this foolishness of using a non-Y2K-compliant date as the LLQ, instead of creating a proper GDG, then write a Rexx programette to identify and delete the oldest data set(s).
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1052
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post