Where Are You, Little Star?

or: how to look for something specific


This pages describes how someone unfamiliar with the SAP DB sources could find his way around. The example given is the SQL interfaces for Python.

  1. locate an executable, shared object or library in the distribution
    Python
    Unix sapdbmodule.so
    NT/W2K sapdb.pyd


  2. locate the matching vmake description
    Most of the time, the description to build <filename>.<ext> can be found by executing iview.pl sapdbpyd.
    There are a few cases where the target file gets renamed, so you'll have to
    cd SAPDB_ORG/sys/desc
    grep sapdbmodule *
    This should find sapdbpyd.dld
    Don't include file extensions in grep search expressions, as they are often omitted inside vmake descriptions.
  3. locate any supporting vmake descriptions
    Sometimes, a target needs additional files. SAP::DBTech::dbm needs an additional Perl file dbm.pm.
    cd SAPDB_ORG/sys/desc
    grep dbmcperl *.mac
    You could also execute
    imf.pl -c scriptall
    This writes the dependency graph to stdout.
  4. locate the entry point
    Very often, the first real source in the description (after comments and options) is the main entry. For sapdbpyd.dld, this is vin77.c. By
    iview.pl vin77.c
    you'll see the source in your editor.
    For dbmcmodule.dld, this is a bit trickier, as there is no vcn13-c.c. The -c is called a variant, meaning the file vcn13.c gets compiled with different compiler options into different object files. On Windows, the Perl extensions can be built either for ActivePerl (sapdbap.mac => sapdbaperl.dld => vcn13-a.c) or Standard (Core) Perl (sapdbcp.mac => sapdbcperl.dld => vcn13-c.c).
  5. locate any additional files
    You could use the description file or the dependency graph to locate any additional files. Another way is
    imf.pl -m dbmcperl
    This lists the files in a format suitable for xargs (provided you are in the right directory). It may be a good idea to filter the output by excluding '/en/', '/eo/' and '/os/', unless you're suspecting the offending bug to be in the platform dependant parts. '/sp/' is also a candidate for excluding, as this is the equivalent of a clib for SAP DB.


last changed 2002-05-06
Daniel Dittmar