list_save

Writes an ascii list to a file.

Syntax

void list_save(list-name,path,file-suffix,file-type)
list    list-name
string  path,file-suffix,file-type

Description

list-name

identifies the name of the list to navigate.

path

file-suffix

file-type

The suffix option facilitates the organization of files into groups for chemical samples, chemical structures, delimited files, text files etc. See list_file for a description of file-types.

Example

list_save() can be used in a list management utility to enable a user to save hit lists of structures or to export a delimited list to a spread sheet. The following example saves a list of structures to a user's directory.

 {
 list distinct_list;

 list_all(athena.wl,@athena.an,0);  /* fetch all records from db */
 distinct_list= distinct_field(win-name.wl,@struct.no); /* delete dups*/
 G.fname= filename("");       /* prompt user for filename */
 if (G.fname)                 /* user entered fname, not 'cancel' */
                                    /* Save list as binary file */
   list_save(distinct_list,"/usr2/trim/user_dir/","no","b");
 distinct_list=NULL;
 }


Updated 19 May 1999. Copyright DataAspects Corp. 1998-1999