Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. How to create SQL script, include in job_list

    How to create SQL script, include in job_list

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    • Article Type: General
    • Product: Aleph
    • Product Version: 20, 21, 22, 23

    Description:
    How can I create an SQL script and include it in the job_list?

    Resolution:
    1. Create a subdirectory in $alephe_root and "vi" the script. For example, here is $alephe_root/jerrys/test.sql which prints a list of yesterday's loans:

    set echo off
    set pause off
    set term off
    set show off
    set verify off
    set heading off
    set feed off

    spool test.lst
    select to_char (sysdate-1,' "Date: "Day, Month dd yyyy') from dual;
    set feed on
    select z36_id, z36_rec_key from z36
    where z36_loan_date = TO_CHAR (SYSDATE-1,'YYYYMMDD')
    order by z36_id, z36_rec_key;
    spool off
    exit


    2. To execute the script:

    > cd $alephe_root/jerrys
    > s+ usm50
    SQL> @test.sql

    The output will be written as test.lst in $alephe_root/jerrys.


    3. To include the script in job_list:

    W2 04:45:00 N testsqljs sqlplus USM50/USM50 @/exlibris/aleph/u20_2/alephe/jerrys/test.sql

    The output will be written in $alephe_scratch.

    For more sophisticated services see How To - Miscellaneous - Custom Services on the Doc Portal.


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • How to create separate Hold Shelf Reports for different sublibraries
      • How to create STA $$aSuppressed for Withdrawn, Missing, etc., items
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 20
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved