Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Passing active library to custom service

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    I'm attempting to implement a custom service, and I would like to know if it is possible to have the active library passed to the service script. Is this passed as an environment variable, rather than a parameter? I know it is passed somehow to standard services, as it is changeable from most services at the bottom of the launch screen.

    Resolution:
    The "active library" is the library to which you are dlib-ed when you are connected to the server with ssh. If you dlib to usm01 and do "echo $active_library" the response is "USM01".

    Daemons and certain servers started via the util menu start the procedure in the $active_library. Examples are the $aleph_proc/util_e_nn daemons and the util w sip2_server, ncip_server, and slnp_server. The latter have the line: "start_p0000 $active_library".

    Other Aleph jobs run the job in a library specified as the first parameter of the submission (csh -f p_manage_01 USM01,...). The $aleph_proc for such jobs has a "start_p_proc", "start_proc00 $1", or "start_p0000 $1" line.

    The GUI Services submission screens (including the p-custom-0n.xml Custom Services screens) have a "Library" dropdown at the bottom. The default value in this dropdown is the library to which the GUI client is connected, but you are able to specify a different library, if desired. The library specified is passed to the $aleph_proc/<job> as the first parameter (and the $active_library).


    • Article last edited: 10/8/2013