[Isis-users] Logically deleted records

spinaker spinaker at adinet.com.uy
Tue Sep 25 22:12:14 CEST 2012


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 Sympos**ium»**
** 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











El 25/09/2012 10:59, Bridgette Heron escribió:
> Dear Mr. Spinak,
> It would seem that nobody took on your challenge Smile emoticon I used 
> the first option you suggested (SWK) but I was more interested in the 
> MX approach. I did the exercise and tried to decipher the contents of 
> the deleted.txt file. I learned a little but not enough to go further. 
> Can you do me the honours of explaining further.
> Thanks,
> Bridgette
> *From:* spinaker <mailto:spinaker at adinet.com.uy>
> *Sent:* Wednesday, September 19, 2012 2:23 PM
> *To:* isis-users at iccisis.org <mailto:isis-users at iccisis.org>
> *Subject:* Re: [Isis-users] Logically deleted records
>
> Dear Bridgette
>
> There are two ways to do this,
> the easiest one is to use the application Swiss Knife (SWK)
> you can download the package from Unesco
> http://portal.unesco.org/ci/en/ev.php-URL_ID=17110&URL_DO=DO_TOPIC&URL_SECTION=201.html
>
> there you open SWK, load the database, to go the tab Miscellaneous and 
> ask the procedure  "Deleted"
> then you will get a fast list with MFNs
>
> The other way, to work with complex and very large databases is to use 
> MX   ( again??   yes!!!)
>
> Hi everybody!!!!
> I'll give you a hint and we'll leave 24 hours to see if a colleague 
> eager to take risks get the complete solution
> The winners will get from us the warmest congratulations
>
> Exercise:   let's take CDS database and we'll prepare it deleting 
> every tenth record
>
> mx cds copy=cds  proc='d.'  loop=10 now -all tell=10,
>
> now the hint
>
> *mx cds  -all  +leader  now   > deleted.txt
>
> *Regards and enjoy the challenge
>
> Ernesto Spinak
>
>
>
>
> El 18/09/2012 19:15, Bridgette escribió:
>> Hello everyone,
>> Can the MX utility be used to identify/search for and print to a text 
>> file my logically deleted records; by MFN number and/or by titles? I 
>> am using Winisis, thanks.
>> Bridgette Heron
>> CDS/ISIS Field Programmer
>> NATIONAL LIBRARY OF JAMAICA
>> 12 East Street
>> Kingston
>>
>> Tel: (876) 967-2494, 967-2496
>> Fax: (876) 922-5567
>> Website: http://www.nlj.gov.jm
>>
>>
>> _______________________________________________
>> 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
>
>
> -- 
>    .^.                                .^.
>    ( )                                ( )
>    ===                                ===
>   =[=]================================[=]=
>    | |  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


-- 
   .^.                                .^.
   ( )                                ( )
   ===                                ===
  =[=]================================[=]=
   | |  Ernesto Spinak                | |
   | |  spinaker at adinet.com.uy        | |
   | |  Montevideo, Uruguay           | |
   | |  tel/fax  (598) 2622-3352      | |
   | |  celular  (598) 99612238      | |
  =[=]================================[=]=
   ===                                ===
   ( )                                ( )
    V                                  V

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20120925/4f8d1498/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 257 bytes
Desc: not available
URL: <http://lists.iccisis.org/pipermail/isis-users/attachments/20120925/4f8d1498/attachment.gif>


More information about the isis-users mailing list