list_saveWrites an ascii list to a file. Syntaxvoid list_save(list-name,path,file-suffix,file-type) list list-name string path,file-suffix,file-type Description
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. Examplelist_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 |