IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Development with Shell scripts

    Posted 05/09/08 01:39 PM

    Originally posted by: Vana


    Hi,
    I am working on Mercator6.7. I need to work on two scenarios with Unix scripts.
    1. Use a pre script to trigger a map.
    2. Similarly a post-script to be triggered after the execution of a map.
    Can any one explain me with a small example. If they can share their work it will be very helpful.
    Thanks in advance.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Development with Shell scripts

    Posted 05/09/08 04:56 PM

    Originally posted by: SystemAdmin


    I've only done it with Window's batch files/scripts.

    When you say a "pre script" to trigger a map, do you mean an entry in the cron table to kick off the script that in turn kicks off the map? Or a map to kick off the "pre-script" using event server?

    As for the "post script", you could add an output card to the map and have it initiate the script, but set the output card attitbute of "scope" to card, rather then map.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: Development with Shell scripts

    Posted 05/12/08 04:52 PM

    Originally posted by: Vana


    For the Pre-script : After a job is completed, it triggers a script and that in turn should trigger the map.

    Can you please tell me step by step how you have worked on it. I am very much new to Unix shell scripting.

    Thanks for your response.

    Vana.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: Development with Shell scripts

    Posted 05/12/08 05:54 PM

    Originally posted by: SystemAdmin


    Well like I mentioned, I've only done it in the Window's enviroment, but I'm on Unix now and we just hired someone who was a Unix admin, so if the question is more of a Unix question; which is how do you initiate a Unix script from a source event, I'll see if he has any info tomorrow.


    But if you're using event server (?), I can answer that myself, though if you are, you can just use the source event on the msl setting for the map.

    Message was edited by: rep
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 5.  Re: Development with Shell scripts

    Posted 05/13/08 02:51 PM

    Originally posted by: SystemAdmin


    Thinking about it now, and waiting for my co-worker to get back to me, I don't know if it's practical, but maybe have an entry for a script in the CRON table that runs every X minutes and looks for the presence of a/the file, and if it is there, it executes the the actual script you want run.

    For the pre-script;

    Have a script named "runmap.sh" with the logic to run the map.

    Have a Unix script named "LOOKFORFILE" running every minute in the CRON Table. In the script the logic is;

    If runscript.txt is present, exec runmap.sh, else, do nothing. (I don't know how you would code that in Unix).

    Job runs and last step is to create file runscript.txt.

    The script "LOOKFORFILE" kicks off the next minute and sees the runscript.txt file, and executes "runmap.sh", and deletes "runscript.txt".

    Maybe?
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender