Maintain System Creation Date (GRX)
Bruce Easton
bruce at stn.com
Fri Mar 26 14:54:14 PDT 2010
(top post)
Neat trick - I had not heard of that. And you didn't see any smoke
rising from the server
while all that was going on?
Bruce
Bruce Easton
STN, Inc.
On 3/26/10 5:42 PM, Chris Sellitto wrote:
> 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®
>
> _______________________________________________
>
>
More information about the Filepro-list
mailing list