Easily. I use this REDATE EXEC.
 
/*
   This exec alters the date and time of a cms file.

   Command Format:   >>-- REDATE -- fn -- ft -- fm -- newdate -- newtime -->>

   Where: "fn" is the filename of the target file.
          "ft" is the filetype of the target file.
          "fm" is the filemode of the target file (at least the mode letter 
must be specified).
          "newdate" is the value to which the creation date of the file is to 
be changed. The format
               of newdate is mm/dd/yy (leading zeros are not required in any 
sub-field).
          "newtime" is the value to which the creation time of the file is to 
be changed. The format
               of newtime is hh:mm:ss (leading zeros are not required in any 
sub-field).

   All parameters are required. In addition, the disk or directory must be 
accessed R/W (that is, it
   must appear as R/W in a response to QUERY DISK).

   Written: 07/01/94 by Richard Schuh
*/

address command                                  /* Issue CMS and CP commands 
directly */
signal on novalue                                /* Trap possible use of 
uninitialized variables */
signal on syntax                                 /* Trap possible REXX syntax 
errors */

arg fn ft fm dt tm . 1 args                      /* get the parameters */
'ESTATEW' fn ft fm
if rc ¬= 0 then call exit 16, 'File not found - the file "'fn ft fm'" must 
exist on a R/W disk or directory'
parse var dt m . '/' d . '/' y .
if length(y) < 3 then y = right(y,2,0)
dt = right(m,2,0) || '/' || right(d,2,0) || '/' || y
parse var tm h . ':' m . ':' s .
tm = right(h,2,0) || ':' || right(m,2,0) || ':' || right(s,2,0)
'DMSPLU' fn ft fm dt tm
select;
   when rc = 0 then call exit 0
   when rc = 24 then do
      'VMFCLEAR'
      say 'Parameter validation error - the command format is'
      say ''
      say '      REDATE fn ft fm mm/dd/yy hh:mm:ss'
      say 'or    REDATE fn ft fm mm/dd/yyyy hh:mm:ss'
      say ''
      say 'Both the date and time values must be valid.'
      say ''
      call exit 24
      end
   otherwise call exit rc, 'GET Dynamic Storage failure - enlarge your virtual 
storage and try again.'
   end

exit:                                            /* clean up and get out */
   parse arg myrc, msg
   if msg ¬= '' then say msg
   exit myrc

/* 
=======================================================================================================================
 */
/* 
=======================================================================================================================
 */
/*                                                                              
                                           */
/*                                               Error handling routines        
                                           */

novalue:
   say 'Uninitialized variable in line' sigl
   say sourceline(sigl)
   call exit 13
syntax:
   say 'REXX error detected in line' sigl
   say sourceline(sigl)
   call exit 14
error:
   parse source . . . . . . how .
   if how = '?' then exit rc * (rc ¬= 12)
   say 'CP/CMS error detected at line' sigl
   say sourceline(sigl)
   call exit 15
 

.
 

Regards, 
Richard Schuh 

 

 


________________________________

        From: The IBM z/VM Operating System [mailto:[email protected]] On 
Behalf Of Mark Pace
        Sent: Tuesday, August 17, 2010 12:14 PM
        To: [email protected]
        Subject: CMS file date
        
        
        Can I manipulate the date of a CMS file?  I want to test a program that 
deletes files older than a certain date. In linux I can use touch to set the 
date to whatever I choose.
        
        -- 
        
        Mark D Pace 
        Senior Systems Engineer 
        Mainline Information Systems 

Reply via email to