|Parse the file specification into it's constituents:|
$ devdir = f$parse(file,,,"DEVICE")+f$parse(file,,,"DIRECTORY")
$ fn = f$parse(file,,,"NAME")
$ ft =f$parse(file,,,"TYPE")
$ fv = f$parse(file,,,"VERSION")
Get todays date:
new file name:
complete new filespecification:
$! show symbol filen
$ rename/log 'file' 'filen'
For details on the functions used see HELP LEXICAL .
For scheduling to run a job once a day, do a little search here in this forum,
there are several entries, for example this one:
To get the name of the executing procedure for resubmit:
$ thisproc = f$environment("PROCEDURE")
If You want to be able to edit the procedure and resubmit the newest version, use the parsing technique above, and remove the version (+fv) from the filename to submit.