Re: CMS file date

2010-08-18 Thread Berry van Sleeuwen
There is also a setdate on
http://www.vm.ibm.com/download/packages/descript.cgi?SETDATE.

Op 18-08-10 00:56, Ron Schmiedge schreef:
 There is also the SETDATE EXEC which comes with your VM system. It is
 on MAINT 3B2 as SETDATE SAMPEXEC and SETDATE SAMPHELP (the HELPCMS
 file). Been there for a long time.

   


Re: CMS file date

2010-08-18 Thread gclovis

Mark:
Don't answer your question, but to delete old files I use this exec.

/*/
/*  CLEANUP EXEC - Delete old files, based on age (days) */
/*/
   Arg $days
   If  $days =  Then $days = 30
   PIPE Literal date(C) - $days ,
  | DATECONV  1-8 Rexx_Date_C ISOdate ,
  | var date 
   PIPE CMS LISTFILE * * A (NOH BEFORE date,
  '| stem files.'
   If rc  0 Then Return
   Do ct=1 to files.0
   PARSE VALUE files.ct WITH fn ft fm .
If pos(ft,'EXEC.PARMS.CONFIG.UPDATE')  0 Then Iterate ct
Say 'ERASING' fn ft fm
'ERASE' fn ft fm
   End
Return

To test it many times, I copy old files to my disk A using COPY with OLDD
parameter...

Regards, Clovis.


|
| From:  |
|
  
--|
  |Mark Pace pacemainl...@gmail.com   
 |
  
--|
|
| To:|
|
  
--|
  |IBMVM@LISTSERV.UARK.EDU  
 |
  
--|
|
| Date:  |
|
  
--|
  |17/08/2010 16:07 
 |
  
--|
|
| Subject:   |
|
  
--|
  |CMS file date
 |
  
--|
|
| Sent by:   |
|
  
--|
  |The IBM z/VM Operating System IBMVM@LISTSERV.UARK.EDU  
 |
  
--|





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






CMS file date

2010-08-17 Thread Mark Pace
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


Re: CMS file date

2010-08-17 Thread Wakser, David
Here is the TOUCH EXEC I have used in the past. I am certain others also
have such an animal.

 

David Wakser

 

/* */   

address command 

parse upper arg fn ft fm StampIt

if StampIt = '' then do 

   StampIt = date('U') time()   

end 

'PIPE', 

   'COMMAND LISTFILE' fn ft fm '( NOHEADER|',   

   'STATEW|',   

   'SPECS ?DMSPLU? 1 W1-3 NW ?' StampIt '? NW|',

   'COMMAND|',  

   'CONSOLE'

if rc  0 then do  

   say 'Must specify date/time stamp as: mm/dd/yy hh:mm:ss' 

end 

 

From: The IBM z/VM Operating System [mailto:ib...@listserv.uark.edu] On
Behalf Of Mark Pace
Sent: Tuesday, August 17, 2010 3:14 PM
To: IBMVM@LISTSERV.UARK.EDU
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 

 

 

 

 



Confidentiality Note: This e-mail, including any attachment to it, may contain 
material that is confidential, proprietary, privileged and/or Protected Health 
Information, within the meaning of the regulations under the Health Insurance 
Portability  Accountability Act as amended.  If it is not clear that you are 
the intended recipient, you are hereby notified that you have received this 
transmittal in error, and any review, dissemination, distribution or copying of 
this e-mail, including any attachment to it, is strictly prohibited. If you 
have received this e-mail in error, please immediately return it to the sender 
and delete it from your system. Thank you.


Re: CMS file date

2010-08-17 Thread Schuh, Richard
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 'orREDATE fn ft fm mm/dd/ 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:ib...@listserv.uark.edu] On 
Behalf Of Mark Pace
Sent: Tuesday, August 17, 2010 12:14 PM
To: IBMVM@LISTSERV.UARK.EDU
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 


Re: CMS file date

2010-08-17 Thread Fran Hensler
I use DMSPLU which comes with CMS but I don't think it is documented.

DMSPLU fn ft fm mm/dd/yy HH:MM:SS

/Fran Hensler at Slippery Rock University of Pennsylvania USA for 47 years
mailto:f...@zvm.sru.edu  http://zvm.sru.edu/~fjh  +1.724.738.2153
  Yes, Virginia, there is a Slippery Rock
--
On Tue, 17 Aug 2010 15:14:14 -0400 Mark Pace said:
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



Re: CMS file date

2010-08-17 Thread Mark Pace
Thanks everyone.  I was not expecting complete code.  The pointer to DMSPLU
is all I expected.

On Tue, Aug 17, 2010 at 4:20 PM, Fran Hensler f...@zvm.sru.edu wrote:

 I use DMSPLU which comes with CMS but I don't think it is documented.

 DMSPLU fn ft fm mm/dd/yy HH:MM:SS

 /Fran Hensler at Slippery Rock University of Pennsylvania USA for 47 years
mailto:f...@zvm.sru.edu  http://zvm.sru.edu/~fjh  +1.724.738.2153
  Yes, Virginia, there is a Slippery Rock
 --
 On Tue, 17 Aug 2010 15:14:14 -0400 Mark Pace said:
 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
 




-- 
Mark D Pace
Senior Systems Engineer
Mainline Information Systems


Re: CMS file date

2010-08-17 Thread Les Koehler
In my pre-retirement days, the documentation for DMSPLU was in some exec on the 
S or T disk.


Les

Mark Pace wrote:

Thanks everyone.  I was not expecting complete code.  The pointer to DMSPLU
is all I expected.

On Tue, Aug 17, 2010 at 4:20 PM, Fran Hensler f...@zvm.sru.edu wrote:


I use DMSPLU which comes with CMS but I don't think it is documented.

DMSPLU fn ft fm mm/dd/yy HH:MM:SS

/Fran Hensler at Slippery Rock University of Pennsylvania USA for 47 years
   mailto:f...@zvm.sru.edu  http://zvm.sru.edu/~fjh  +1.724.738.2153
 Yes, Virginia, there is a Slippery Rock
--
On Tue, 17 Aug 2010 15:14:14 -0400 Mark Pace said:

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







Re: CMS file date

2010-08-17 Thread Les Koehler

Watch out! The date of a file is the date it was last written, *not* accessed!

There's an old, old, story of the MHV IBM manager that wanted to save (then) 
expensive disk space, so he ordered that all CMS systems with files older than 
some dd/mm/yy be erased from *all* disks by Operations Staff. In less than four 
hours almost everyone on the internal network had a copy of Martie's FIXDATE and 
it's default operation was to use today's date!


Rumor had it that some beginner Sysprog wiped out irrecoverable documentation of 
an important corporate project that was 5 years old and had been set aside due 
to other priorities.


Les

Mark Pace wrote:

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.



Re: CMS file date

2010-08-17 Thread Mark Pace
Understood.
Thanks.

On Tue, Aug 17, 2010 at 4:57 PM, Les Koehler vmr...@tampabay.rr.com wrote:

 Watch out! The date of a file is the date it was last written, *not*
 accessed!

 There's an old, old, story of the MHV IBM manager that wanted to save
 (then) expensive disk space, so he ordered that all CMS systems with files
 older than some dd/mm/yy be erased from *all* disks by Operations Staff. In
 less than four hours almost everyone on the internal network had a copy of
 Martie's FIXDATE and it's default operation was to use today's date!

 Rumor had it that some beginner Sysprog wiped out irrecoverable
 documentation of an important corporate project that was 5 years old and had
 been set aside due to other priorities.

 Les


 Mark Pace wrote:

 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


Re: CMS file date

2010-08-17 Thread Rich Greenberg
On: Tue, Aug 17, 2010 at 04:46:24PM -0400,Les Koehler Wrote:

 In my pre-retirement days, the documentation for DMSPLU was in some exec 
 on the S or T disk.
What more do you need besides
1) What Fran posted:

 DMSPLU fn ft fm mm/dd/yy HH:MM:SS

And 2) my PS that the date and time MUST be 8 characters each with
leading zeros added as needed to all 6 operands.

-- 
Rich Greenberg  Sarasota, FL, USA richgr atsign panix.com  + 1 941 378 2097
Eastern time.  N6LRT  I speak for myself  my dogs only.VM'er since CP-67
Canines: Val, Red, Shasta, Zero  Casey (At the bridge)Owner:Chinook-L
Canines: Red  Cinnar (Siberians)  Retired at the beach  Asst Owner:Sibernet-L


Re: CMS file date

2010-08-17 Thread Ron Schmiedge
There is also the SETDATE EXEC which comes with your VM system. It is
on MAINT 3B2 as SETDATE SAMPEXEC and SETDATE SAMPHELP (the HELPCMS
file). Been there for a long time.


Re: CMS file date

2010-08-17 Thread Mike Walter

Dunno if it's in an exec on the S or Y-disks, but it's always been in the 
DMSPLU source code on MAINT's CMS source disks.  Viva la source!!

I.e. VMFSETUP ZVM CMS (LINK
FILELIST DMSPLU * 4

Mike Walter
Hewitt Associates



(Sent from the wee keyboard of a Blackberry.)


- Original Message -
From: Les Koehler [vmr...@tampabay.rr.com]
Sent: 08/17/2010 04:46 PM AST
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: CMS file date



In my pre-retirement days, the documentation for DMSPLU was in some exec on the
S or T disk.

Les

Mark Pace wrote:

Thanks everyone.  I was not expecting complete code.  The pointer to DMSPLU
is all I expected.

On Tue, Aug 17, 2010 at 4:20 PM, Fran Hensler f...@zvm.sru.edu wrote:


I use DMSPLU which comes with CMS but I don't think it is documented.

DMSPLU fn ft fm mm/dd/yy HH:MM:SS

/Fran Hensler at Slippery Rock University of Pennsylvania USA for 47 years
   mailto:f...@zvm.sru.edu  http://zvm.sru.edu/~fjh  +1.724.738.2153
 Yes, Virginia, there is a Slippery Rock
--
On Tue, 17 Aug 2010 15:14:14 -0400 Mark Pace said:

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










The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. All messages sent to and from this e-mail address may be monitored as permitted by applicable law and regulations to ensure compliance with our internal policies and to protect our business. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, lost or destroyed, or contain viruses. You are deemed to have accepted these risks if you communicate with us by e-mail.