Hi,
I am working on VAX/VMS with COBOL.
I have a cobol program runs by a command procedure and it creates report name test_report_'p1'.rpt
Here p1 is the current date. This command procedure runs every day with nightly_job. So every day reports created with test_report_'p1'.rpt.
Rigth now there are around 200 reports and i need to purge it and keep 12 reports.
Question : I need purge statement which keeps 12 reports and purge rest of them.
I tried
$ purge/keep=12 test_report_*.rpt but it is not working as p1 always gives different value and if i do a DIR then it looks like
$dir
test_report_08072005.rpt;1
test_report_08082005.rpt;1
test_report_08092005.rpt;1
test_report_08102005.rpt;1
test_report_08112005.rpt;1
test_report_08122005.rpt;1
test_report_08132005.rpt;1
test_report_08142005.rpt;1
In this version of all the files are 1 so it's not purging. I think I have to use DELETE/SINCE=DATE but do not know how to read correct DATE for SINCE.
Please help.
Thank you.
I am working on VAX/VMS with COBOL.
I have a cobol program runs by a command procedure and it creates report name test_report_'p1'.rpt
Here p1 is the current date. This command procedure runs every day with nightly_job. So every day reports created with test_report_'p1'.rpt.
Rigth now there are around 200 reports and i need to purge it and keep 12 reports.
Question : I need purge statement which keeps 12 reports and purge rest of them.
I tried
$ purge/keep=12 test_report_*.rpt but it is not working as p1 always gives different value and if i do a DIR then it looks like
$dir
test_report_08072005.rpt;1
test_report_08082005.rpt;1
test_report_08092005.rpt;1
test_report_08102005.rpt;1
test_report_08112005.rpt;1
test_report_08122005.rpt;1
test_report_08132005.rpt;1
test_report_08142005.rpt;1
In this version of all the files are 1 so it's not purging. I think I have to use DELETE/SINCE=DATE but do not know how to read correct DATE for SINCE.
Please help.
Thank you.