Maintain System Creation Date (GRX)

Rkreiss@verizon.net] rkreiss at verizon.net
Fri Mar 26 18:35:50 PDT 2010


Top post from phone

Chris,

What I would do in this situation to maintain system security is to add a field to my records which hold the crewstion date of the record.

Since I also work only in the Windows world, I automatically add a few fields missing from the windos version that are present in the *nix versions.  These are the created by, modified by and modified date.  When a record is entered I get the user name and the creation date.  When the  record is modified, I record who modified it and when.

Although John has suggested modifing the header, my solution to your problem is to add a created by fieldm post in @cd to this field and lock the field from modification.

This field not be changed and will transferred no matter whre the record goes. 

A non programmers solution to the problem, but it works without messiing with a computerd date.

Richsrd Kreiss
GCC Consulting


-----Original Message-----
From: Chris Sellitto <sellich at guaranteedreturns.com>
Sent: Friday, March 26, 2010 5:42 PM
To: filepro-list at lists.celestial.com
Subject: Maintain System Creation Date (GRX)

All,

A while back I had posted about retaining the @cd date when doing an archive, and suggested that filePro® have some sort of switch on the copy command that would retain this value.  Well fast forward to today.  We had a need to retain this date again, and I came up with a way that worked for us  Maybe someone has already done this in filePro®, but I have not seen it yet.

I have only tried this in a Windows environment.

What we did is in our code we set up a counter to increment by 1 every time we get a new record.  Only when the counter equals 1 do we save the current date in a dummy variable.  Then for every record we save the @cd date of the current record in a dummy variable.  We then immediately issue the filePro® system command issuing a "DATE" command concatenated with the @cd dummy variable.  This will change the system date of the machine to that @cd date.  Then we do a free record lookup, and copy the current record to the new file, which now has the old @cd date attached to it.  When the process is complete, just do an @done, and set the date back to the original date from when you started, and everything is back to normal.

This actually worked.  And it seemed almost too easy.

Of course this process would be run off hours as to not affect anyone on the system.  But that is when we do our archives anyway.

It may not be the best way of achieving this task, but it does work.  Hope it works for somebody else.

Just a sample.......


     LABEL             D E F I N E   P R O C E S S I N G               5.0.14RN
───────────────────────────────────────────────────────────────────────────────
  1  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: ct(8,.0,g)=ct+"1"
  2  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If: ct eq "1"
       Then: sd(8,mdy/,g)=@td
  3  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: ds(8,mdy/)=@cd
  4  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: system "date"<ds
  5  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: lookup temp = gr_vend at temp  r=free  -e
  6  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: copy temp
  7  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: end
  8  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
@done  ◄ If:
       Then:
  9  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: system "date"<sd
10  -------   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -
       ◄ If:
       Then: end


Christopher Sellitto
VP Computer Operations
Guaranteed Returns®

_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list