TLMNAME(3)



NAME

     parse_list,  fitsname,  fitsname_nopath,  fitsname_noseries,
     logname,  tlmname,  datasetname  -  functions  to parse data
     names


SYNOPSIS

     #include <soi_names.h>
     #include <soi_key.h>

     int parse_list (KEY  **params, char * root);
     char *fitsname (KEY *params, char *root, int sn);
     char *fitsname_noseries (KEY *params, char *root, int sn);
     char *logname (KEY *params, char *root);
     char *tlmname (KEY *params, char *root);
     char *datasetname (KEY *params, char *root);



DESCRIPTION

     This set of functions parses data names  according  to  Phil
     Scherrer's  93.03.31  memo " Use of DataSet Names" and revi-
     sions to handle data collections and array slices.  The FOR-
     MAL  SYNTAX  and descriptions of the changes can be found in
     the ReadMe file in the source directory for names.c.

     parse_list takes a pointer to a keylist and a rootkey (char-
     acter  string)  as  arguments.   It assumes that there is an
     entry in the given keylist whose  key  is  the  rootkey  and
     whose  value  is  a  datacollection_name  to  be parsed.  It
     parses this datacollection_name and expands the  given  list
     to   include  entries  for  the  parsed  components  of  the
     datacollection_name.  Entries for directories and  basenames
     formed from those components are also added to the list if a
     template can be found in the list or in the environment. The
     keys  for  the  entries  are  of  the form root_partname and
     root_n_partname.  The index n, starting  with  0,  indicates
     the  ordering  of  the components within the datacollection.
     parse_list is the only parsing function which should need to
     be  called by a top-level interface in order to pass a keyl-
     ist to a strategy module.  parse_list calls the other  pars-
     ing  functions  described here.  It returns 0 if the parsing
     is successful.

     fitsname forms a .fits file name from keylist parameters for
     the  given  rootkey and sn and returns a pointer to the mal-
     loced name.

     fitsname_nopath is the same as fitsname except that it  does
     not include the path name.

     fitsname_noseries is the same as  fitsname  except  that  it
     does not use a basename when forming a filename.  This func-
     tion should be phased out.  The same effect can be  achieved
     by  calling  fitsname  with  a  list which includes an empty
     string entry for the basename.

     logname forms a .log filename from  keylist  parameters  for
     the  given  rootkey  and  returns  a pointer to the malloced
     name.

     tlmname forms a .tlm filename from  keylist  parameters  for
     the  given  rootkey  and  returns  a pointer to the malloced
     name.

     datasetname forms a name string from keylist parameters  for
     the  given  root and returns a pointer to the malloced name;
     the  returned  name  is  just  the  normal  full  data  name
     (prog:...) without the possible fmt: field at the end.  Note
     that with the data collection revisions to the  names  pars-
     ing,  datasetname only returns a data set name in a special.
     It exists for backwards compatibility.




EXAMPLES

     see soi strategy modules


SEE ALSO

     module (1), keylists(3)
     Use of DataSet Names, PHS 31 March 93,
     SOI-MDI Technical Note 104 - Naming of Datasets for SOI



DIAGNOSTICS

     Those functions  which  return  pointers  return  NULL  when
     errors  occur.   The  value of soi_errno should indicate the
     kind of error.



BUGS

     Expressions that would evaluate to very large collections of
     dataset  names,  such as those with a large number of series
     number indices in the range, may run up  against  limits  on
     string  lengths.  For example, with the current limits it is
     not possible to declare a range of more  than  3276  4-digit
     series numbers, or 2730 5-digit ones.


HISTORY

     2001.11.13 SOI Version 4.8