[Isis-users] change the structure of the CDS/ISIS database

Wieslaw Glinski wieslawglinski at op.pl
Tue May 1 21:12:42 CEST 2012


THanks a lot!!!!

You are great

It works 

God bless you

You

 

 

From: spinaker [mailto:spinaker at adinet.com.uy] 
Sent: Tuesday, May 01, 2012 8:03 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Oops!!
sorry, I forgot that part of the procedure!!!!
to delete all the mfns with repeated value of V10, but the last one
this step is before (4)

so you should do  the following command 

mxcp zzz1 create=zzz2 repeat=% clean

then 

mx zzz2 "proc=if ref(mfn+1,v10)=s(v10) then 'd.' fi"  copy=zzz2 now -all tell=100

then

mx zzz2 iso=zzz2.iso now -all tell=100
mx iso=zzz2.iso create=final now -all tell=100

Now it works
The set of commands are:

  _____  

1.	mx agwb   <mailto:proc=@subfields.prc> proc=@subfields.prc   create=zzz1 now -all tell=100
2.	mx zzz1  <mailto:proc=@carryover.prc> proc=@carryover.prc copy=zzz1 now -all tell=100
3.	mxcp zzz1 create=zzz2 repeat=% clean
4.	mx zzz2 "proc=if ref(mfn+1,v10)=s(v10) then 'd.' fi"  copy=zzz2 now -all tell=100
5.	mx zzz2 iso=zzz2.iso now -all tell=100
6.	mx iso=zzz2.iso create=final now -all tell=10

  _____  



El 01/05/2012 14:20, Wieslaw Glinski escribió: 

Thanks a lot. I downloaded the software it looks cool, many opportunities…

So I took another piece of data it worked perfectly very smoothly just as you described me.

 

but how to get rid of the MFNs that are the same like mfn 3 and 4 since all  are in mfn 5

best

regards

 

 

From: spinaker [mailto:spinaker at adinet.com.uy] 
Sent: Tuesday, May 01, 2012 3:06 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Dear Wes

OK, we go with the explanation

  _____  

// You need the CISIS utilties of (c) Bireme in your PC

We have a database named agwb, with the structure

mfn=     1
 10  «´╗┐¯ö»¯êÜab┼éo┼ä»
 20  «39»
 30  «VI»
 40  «3»
..
mfn=     2
 10  «¯ö»¯êÜab┼éo┼ä»
 20  «59»
 30  «VI»
 40  «3»
..
mfn=     3
 10  «¯ö»¯êÜab┼éo┼äa»
 20  «54»
 30  «VI»
 40  «3»

We want to join all records with the same value of v10, into a single records with fields  v10,v30,v40 converted in a single filed v100 with subfields, like

mfn=     3
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
..
mfn=     4
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
..
mfn=     5
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
..


1) first you have to convert a group of fields into a single subfielded field
   the proc is simple because there are no repeatable fields involved, 
   otherwise the strategy would be more complex.

mx agwb  <mailto:proc=@subfields.prc> proc=@subfields.prc create=zzz1 now -all tell=100

File: subfields.prc

'd20d30d40'
'<100>^a',v20,'^b',v30,'^c',v40,'</100>'

Now you have a dbase  zzz1 with contents

mfn=     1
 10  «´╗┐¯ö»¯êÜab┼éo┼ä»
100  «^a39^bVI^c3»
..
mfn=     2
 10  «¯ö»¯êÜab┼éo┼ä»
100  «^a59^bVI^c3»
..
mfn=     3
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»


2) the following step is more tricky
   if field v10 were a common Isis field (char are ascii or ansi, or non graphic Unicode, Utf)
   you could use the parameter  join= of mx, but for this you need a classic Inverted File which fails
   because the non-standard characters
   Therefore we had to circumvent this problem using another strategy
    Also: We have the database ordered by v10, so all the contigous records belong to the same group
    Otherwise we should to order the database using the command   msrt.exe)

    The idea is to browse the database in ascending MFN order and if field v10 or record xx is the same as record xx -1, theN we carry over the data from the previous record and add to the actual record.

mx zzz1  <mailto:proc=@carryover.prc> proc=@carryover.prc copy=zzz1 now -all tell=100

file: carryover.prc

if ref(mfn-1,v10)=s(v10) then
 'd100',
 '<100>',  ref(mfn-1,v100+|%|),  '</100>'
  '<100>', v100, '</100>'
fi,


In the example, v10 of MFN 3 and 4 are the same, then MFN=4 carry the contents of MFN=3 and places it
as the first occ of the field V100. 
(note: the concatenation of strings with % is a trick to preserve the order)

mfn=     3
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
..
mfn=     4
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
..
mfn=     5
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3%^a106^bVI^c3»
100  «^a107^bVI^c3»


3) Explode of chains with % as repeatable field and clean file from spaces, etc

mxcp zzz1 create=final repeat=% clean

mfn=     3
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
..
mfn=     4
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
..
mfn=     5
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»


4) export the file to an ISO standard

mx final iso=nwagb.iso now -all tell=100

ready!!!

If you find this excercise interesting, I'd appreciate you communicate it to the ISIS list
in order to give some feedback to the list and show colleagues that this List works

Regards from Montevideo
Ernesto Spinak






El 01/05/2012 9:28, Wieslaw Glinski escribió: 

Thanks a lot

Yes that’s it.

Now how did you do this?

If it’s not the secret please tell me. I am asking because  there are and will be more data to convert. 

 

I am trying to make something in PASCAL, but I am afraid it may take a long time… 

Best regards

 

From: spinaker [ <mailto:spinaker at adinet.com.uy> mailto:spinaker at adinet.com.uy] 
Sent: Tuesday, May 01, 2012 2:05 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Wes

I sent you by error the wrong file, sorry
find attached the real one
there you will find the repeatable grous as field v100

mfn=     4
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
..
mfn=     5
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
..
mfn=     6
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
100  «^a110^bVI^c3»
..
mfn=     7
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
100  «^a110^bVI^c3»
100  «^a111^bVI^c3»


Ernesto




El 30/04/2012 19:45, Wieslaw Glinski escribió: 

I made small mistake in AGWB2, so sending you corrected data once again

wes

 

From: spinaker [ <mailto:spinaker at adinet.com.uy> mailto:spinaker at adinet.com.uy] 
Sent: Monday, April 30, 2012 10:35 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Dear wes

We don't have AlphaIsis, this has not been release, so I don't have access
Anyway, I used somo non-orthodox application and I got the file attached
Let me know if this is what you need

Ernesto Spinak



El           V 








-- 
  .^.                                .^.
  ( )                                ( )
  ===                                ===
 =[=]================================[=]=
  | |  Ernesto Spinak                | |
  | |   <mailto:spinaker at adinet.com.uy> 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 

 

 

 

From: spinaker [mailto:spinaker at adinet.com.uy] 
Sent: Tuesday, May 01, 2012 3:19 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Dear Wes

now you have the procedure, so use it with a clean database

Regards
Ernesto


El 01/05/2012 10:12, Wieslaw Glinski escribió: 

I check once again. 

Sorry changing the structure of the data should cause the loss of some records (or even most of them) but it did not happened in your database. There are many repetitions of records 3-9 and 13 to 75 . So for example instead of records 13 to 75 there should be only record 75 (since it contains all the instances of the field 100 in records 13 to 74), etc 

 

It is because the field 10 repeats as I made in the example of the AGWB  and AGWB2. The AGWB has as much as 70records (in most of the the content of the field 10 was repeated many times) when I changed the structure the number of records decreases since the field 10 appears only once and there is a repeatable group of subfields 11^a^b^c. (The content of the fields 20 30 and 40 became the subfields of repeatable group 11.)

Look at the database AGWB and AGWB2

Best regards

wes

 

From: spinaker [mailto:spinaker at adinet.com.uy] 
Sent: Tuesday, May 01, 2012 2:05 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Wes

I sent you by error the wrong file, sorry
find attached the real one
there you will find the repeatable grous as field v100

mfn=     4
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
..
mfn=     5
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
..
mfn=     6
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
100  «^a110^bVI^c3»
..
mfn=     7
 10  «¯ö»¯êÜab┼éo┼äa»
100  «^a54^bVI^c3»
100  «^a106^bVI^c3»
100  «^a107^bVI^c3»
100  «^a110^bVI^c3»
100  «^a111^bVI^c3»


Ernesto




El 30/04/2012 19:45, Wieslaw Glinski escribió: 

I made small mistake in AGWB2, so sending you corrected data once again

wes

 

From: spinaker [mailto:spinaker at adinet.com.uy] 
Sent: Monday, April 30, 2012 10:35 PM
To: Wieslaw Glinski
Subject: Re: [Isis-users] change the structure of the CDS/ISIS database

 

Dear wes

We don't have AlphaIsis, this has not been release, so I don't have access
Anyway, I used somo non-orthodox application and I got the file attached
Let me know if this is what you need

Ernesto Spinak



El           V 








-- 
  .^.                                .^.
  ( )                                ( )
  ===                                ===
 =[=]================================[=]=
  | |  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 






-- 
  .^.                                .^.
  ( )                                ( )
  ===                                ===
 =[=]================================[=]=
  | |  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/20120501/ad31adaa/attachment.html>


More information about the isis-users mailing list