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

    Script for transferring plif data from sftp server for input to file-20

     

    • Product: Aleph
    • Product Version: 20, 21, 22, 23
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local

     

    Description

    Is there a way to transfer plif data from sftp server as input to the file-20 Service?

    Resolution

    Overview:

    1) connect to your server using sftp move into a directory where there is a file with the records to uplaod using p_file_20 service 
    2) copy the file into the xxx50 $data_scratch directory 
    3) delete the remote file 
    4) execute p_file_20 

    Details:

    Script name: 
    ----------- 
    borrower_upload 

    Where located: 
    --------- 
    $aleph_proc directory 

    How to run it (online): 
    ----------------------- 
    ./borrower_upload 

    Configuration: 
    -------------- 
    1) The variabile "prefix" contains the common part of the file name in the source directory (now it's pliff) 
    set prefix = "pliff" 

    2)The variable "email_add" contains the email address to send the messages about the procedure status 
    Now it's defined like: set email_add = "xxxxx@yyyy.edu
    Replace the email address with yours 


    How it works 
    ------------ 
    The script is connecting via sftp to the remote server with ip "111.2.3333.44" and is checking: 
    1) if on the remote directory there isn't any file 
    2) if there is more than one file. 

    In this case it sends a mail to the email address contained in the "email_add" and exits. 

    If the two tests are successful, it downloads the file and deletes it on the remote server. 

    After this, it launches a p_file_20 with the downloaded file as the input file. 

    At the end it sends a mail asking to check the p_file_20 log. 
     

    Contact Ex Libris Aleph Support to get the script itself.

     


    • Article last edited: 1-Nov-2017