[Isis-users] Logically deleted records
Bridgette Heron
nlj_bmheron at hotmail.com
Wed Sep 26 21:55:01 CEST 2012
I agree with your suggestion. It is necessary to add examples like the one we did. It should also include daily operational tips and tricks to solve issues relating to our CDS/ISIS databases.
Well, I'm not finished with the challenge, but I created 3 folders using the command. Super cool
From: spinaker
Sent: Wednesday, September 26, 2012 5:55 AM
To: isis-users at iccisis.org
Subject: Re: [Isis-users] Logically deleted records
El 26/09/2012 7:09, spinaker escribió:
Dear Piet
Thanks for your comments
Concerning CISIS there are updates with only few modifications, so the manual is up to date
maybe it is necessary to add examples like this one, and tricks to solve daily problems of administration even commands
Take this one only for fun
I use to do daily backups of my system, with .bat files with using cisis
therefore the first thing I'd need is to create 31 folders, one for each day, for example
c:\backup\01 .... \31
so, instead of doing c:\> md 01 02 03 04, etc you can do
mx tmp "sys='md ',mfn(2) '" to=31 now
Now the challenge
How do you save your data every day in the corresponding folder using MX ?
Enjoy it
Regards
Ernesto Spinak
El 25/09/2012 17:35, Piet De Keyser escribió:
Dear Ernesto,
You are a true magician with CISIS and you keep amazing me with your skills. I took the trouble of studying (most of) MX and had great benifit from it while maintaining my databases. I can recomend it to everyone who is acting as system manager of ISIS based library applications.
Is there any change the kind of advanced applications and examples you showed here can find their way into maybe a new version of the CISIS manual?
Piet de Keyser
Belgium
----------------------------------------------------------------------------
Van: isis-users-bounces at iccisis.org [isis-users-bounces at iccisis.org] namens spinaker [spinaker at adinet.com.uy]
Verzonden: dinsdag 25 september 2012 22:12
Aan: Bridgette Heron
CC: isis-users at iccisis.org
Onderwerp: Re: [Isis-users] Logically deleted records
Dear Bridgette
OK, I guess your main problem was solved, which was to detect the deleted records, using the utility SWK
Let`s go to the challenge
To get the most out of CISIS utilities, it is important to know well the structure of the ISIS records
A very interesting and simple manual as introduction is posted on the Download Site of Bireme.
Basic Concepts of CDS/ISIS databases: Start using CISIS
http://bvsmodelo.bvsalud.org/download/cisis/CISIS-ConceitosBasicos-en.pdf
The MST structure (the master file, or data records) has three parts:
a) Leader
b) directory
c) data
To run the following example, open a DOS window and we will use as an example the CDS database
You must have access to the program MX.EXE
as I explained in an earlier message, put the whole package in a directory, for example c:\cisis and make a path to that directory
If not, you only have to do the following
c:\> set path=%PATH%;c:\cisis
Go to the directory where you have CDS database
To avoid damaging the original base, make a copy on which we will operate the example
As you probably know, the master file, consists of two physical files with extensions. mst and. xrf
c:\> copy cds.mst cdsnew.mst
c:\> copy cds.xrf cdsnew.xrf
Then let's delete a few records on purpose, one of everty tenth
c:\> mx cdsnew copy=cdsnew proc='d.' loop=10 now -all tell=10,
You can verify that records were deleted
c:\>mx cdsnew
y verá mfn= 1 [DELETED]
44 «Methodology of plant eco-physiology: proceedings of the Montpellier Sympoium»
50 «Incl. bibl.»
69 «plant physiology»
....
..
mfn= 2
44 «Methodology of plant eco-physiology: proceedings of the Montpellier Symposium»
50 «Incl. bibl.»
69 «plant evapotranspiration»
OK, now comes the trick (silence please, playing drums)
Records have some structural components
control | leader | xref | dir | fields
The status of records are registered in the leader part
status = 1 (borrado) | 0 (activo)
c:\> mx cdsnew -all +leader count=12 now (shows the first 12 records)
mfn= 1|mfrl= 378|mfbwb= 0|mfbwp= 0|base= 84|nvf= 11|status= 1| 1
mfn= 2|mfrl= 318|mfbwb= 0|mfbwp= 0|base= 66|nvf= 8|status= 0| 0
mfn= 3|mfrl= 472|mfbwb= 0|mfbwp= 0|base= 96|nvf= 13|status= 0| 0
mfn= 4|mfrl= 374|mfbwb= 0|mfbwp= 0|base= 90|nvf= 12|status= 0| 0
mfn= 5|mfrl= 438|mfbwb= 0|mfbwp= 0|base= 96|nvf= 13|status= 0| 0
mfn= 6|mfrl= 360|mfbwb= 0|mfbwp= 0|base= 72|nvf= 9|status= 0| 0
mfn= 7|mfrl= 358|mfbwb= 0|mfbwp= 0|base= 90|nvf= 12|status= 0| 0
mfn= 8|mfrl= 340|mfbwb= 0|mfbwp= 0|base= 78|nvf= 10|status= 0| 0
mfn= 9|mfrl= 296|mfbwb= 0|mfbwp= 0|base= 66|nvf= 8|status= 0| 0
mfn= 10|mfrl= 426|mfbwb= 0|mfbwp= 0|base= 96|nvf= 13|status= 0| 0
mfn= 11|mfrl= 352|mfbwb= 0|mfbwp= 0|base= 102|nvf= 14|status= 1| 1
mfn= 12|mfrl= 372|mfbwb= 0|mfbwp= 0|base= 96|nvf= 13|status= 0| 0
So, what I do is what I stated as a hint in my previous message
that is, we dump all the leader of all records to a sequential .txt file
c:\> mx cds -all +leader now > deleted.txt
If we read tis file with seq= data is considered as fields separated by pipes
c:\> mx seq=deleted.txt
mfn= 1
1 «mfn= 1»
2 «mfrl= 378»
3 «mfbwb= 0»
4 «mfbwp= 0»
5 «base= 84»
6 «nvf= 11»
7 «status= 1»
8 « 1 »
So, to get the list of deleted mfns, we give the followin order
c:\> mx seq=deleted.txt "pft=if v7:'1' then mfn,x2 fi " now
000001 000011 000021 000031 000041 000051 000061 000071 000081 000091
000101 000111 000121 000131 000141
Quod erat demonstrandum
fanfare and cannon fire is heard
the show is over
thanks
Regards
Ernesto Spinak
--
.^. .^.
( ) ( )
=== ===
=[=]================================[=]=
| | Ernesto Spinak | |
| | spinaker at adinet.com.uy | |
| | Montevideo, Uruguay | |
| | tel/fax (598) 2622-3352 | |
| | celular (598) 99612238 | |
=[=]================================[=]=
=== ===
( ) ( )
V V
--
.^. .^.
( ) ( )
=== ===
=[=]================================[=]=
| | Ernesto Spinak | |
| | spinaker at adinet.com.uy | |
| | Montevideo, Uruguay | |
| | tel/fax (598) 2622-3352 | |
| | celular (598) 99612238 | |
=[=]================================[=]=
=== ===
( ) ( )
V V
--------------------------------------------------------------------------------
_______________________________________________
isis-users mailing list
isis-users at iccisis.org
To manage your own subscription options go to: http://lists.iccisis.org/listinfo/isis-users
Or contact Henk Rutten: hlrutten at xs4all.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20120926/a4681d55/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Emoticon1.gif
Type: image/gif
Size: 257 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20120926/a4681d55/attachment.gif>
More information about the isis-users
mailing list