DLMEXP

1. Background and documentation

DLMEXP is a CDS/ISIS Pascal program which exports CDS/ISIS databases to a comma delimited format. The result can be imported in a dBase database. Like DLMIMP, DLMEXP is widespread among CDS/ISIS users, mostly in form of the source code. I know of no manual about it.

It can be used as a separate CDS/ISIS Pascal program or it can be integrated in your system as a menu exit.

2. General evaluation

Plus Minus

3. Preliminary work

DLMEXP requires a FST to operate. This FST can be made by means of CDS/ISIS or of an editor.

This could be a CDS/ISIS record to be exported (in the ALL format):

MFN: 28            
   15:  m          
  100:  ^a0-471-93787-8                 
  300:  ^aTedd^bLucy A.                
  200:  ^aAn introduction to computer-based library systems
  260:  ^a3rd edition                                      
  400:  ^aChichester^bJ. Wiley & Sons                      
  440:  ^b1993                                             
  460:  ^axv, 316 p^bill                 
  620:  ^alibrary automation    
(Of course, this is a simplified version.)

And this could be the structure of the target dBase database:

Structure for database: C:books.dbf             
Number of data records:      105                
Date of last update   : 02/25/96              
Field  Field Name  Type       Width    Dec       
    1  TITLE       Character     60            
    2  AUTHORS     Character     50          
    3  CITY        Character     30        
    4  PUBLISHER   Character     30       
    5  YEAR        Character      4     
    6  PAGES       Character     10      
    7  ILLUSTR     Logical        1       
    8  ISBN        Character     13      
    9  KEYWORD     Character     20       
** Total **                     219       
You can export the CDS/ISIS records to a comma delimited file by the help of this FST:
1 0 v200^a
2 0 (v300^a,|, |v300^b+|; |)
3 0 v400^a
4 0 v400^b
5 0 v440^b
6 0 v460^a
7 0 if p(v460^b) then 'Y' else 'N' fi
8 0 v100^a
9 0 v620^a
Note that you can use here advanced formatting techniques, e.g. adding strings and handling of repeatable fields (see field 2), or if-then-else statements (see field 7).

After the conversion, the result should look like this:

TITLE      An introduction to computer-based library
systems       
AUTHORS     Tedd, Lucy A.            
CITY        Chichester              
PUBLISHER   J. Wiley & Sons            
YEAR        1993                      
PAGES       xv, 316 p                
ILLUSTR     Y                 
ISBN        0-471-93787-8            
KEYWORD     library automation                            
  

4. Executing the program

The program can be run from the CDS/ISIS mean menu by choosing the option:
A - ISISPAS - Advanced programming services
It can also be installed as a menu exit.

DLMEXP will asked you a few questions:

CDS/ISIS to Delimited format conversion

Export FST name? ................ exp
Output file name? ............... c:\isis\work\books.txt
Export last search results (Y/N)? n 
MFN limits? ..................... 27-28                   
                     
Exporting record 28                                       
                     
-->
The questions are not presented all at once, like in the screen print, but one at the time. You can choose between: After this the program will tell you which record is being processed (here number 28). When the conversion is done, you will see the little arrow:
     -->
In the case of the given example the result will look like this:
"An introduction to computer-based library
systems","Tedd, Lucy A.","Chichester","J. Wiley &
Sons","1993","xv, 316 p","Y","0-471-93787-8","library
automation"
This can be imported in you dBase database by this command:
 append from c:\isis\work\books.txt delimited

5. Pitfalls

  1. You can easilly export records with long abstracts by means of a line in you FST like the following one:
    10 0 v600^a
    but some DBMS programs will not be able to inport long texts or to transform imported delimited fields into a memo field.

  2. Repeatable fields may caus problems too. In dBase applications the number of authors will probably be limitted to three. There are not many possibilties to limit the number of occurrences of a repeatable field to be exported by means of the formatting language. You can limit the output to the first occurrence by this command:
    2 0 (if not s|;|+v300):';' then mdl v300 fi)
    This will reduce:
    300: ^aHopkinson^bAlan
    300: ^aBuxton^bAndrew
    
    to:
    "Hopkinson, Alan"
    In other cases you will have to write a format exit, which is a CDS/ISIS Pascal program, or you will have to modify the target database by a dBase program.

  3. DLMEXP automatically puts ".FST" after the name of you FST. If you fill in the extension, the program will prompt you with an error message:

    CDS/ISIS to Delimited format conversion

                      
    Export FST name? ................ exp.fst 
    Cannot find filec:\isis\data\test\exp.fst.FST
    Export FST name? ................                            
                      

  4. If you do not fill in the path for the output file, DLMEXP will write it in your directory C:\ISIS, which is a rather unexpected place.

  5. If you make mistakes in your FST, you will be presented the CDS/ISIS error messages, e.g.
    Error 53 []
    which means that you have used a if-then-else statement without the closing "fi" (see list in the CDS/ISIS manual, p. 74).

6. Recommendations

Although DLMEXP is a good program, you do not need it. The formatting language can do exactly the same job.

Morover, by using the standard CDS/ISIS export facilities you will have the opportunity to sort your records before you export them.


© Piet de Keyser, 1998

Piet de Keyser's Manual Collection