Automic Workload Automation

  • 1.  Redirecting the output to a external file like csv file or txt file

    Posted Dec 09, 2015 11:00 PM
    Is it possible to redirect the output contents or a contents stored in a variable to a external file like CSV file or txt file? Basically I am using the object VAR->SQL to get the contents from a SQL query. I want to store the contents of the query i.e. the output to a csv file. Is there a way to that? Also is it possible to redirect the Win job contents i.e under  Report -> activation tab of a job to a external file. Thanks and Regards, Avinash


  • 2.  Redirecting the output to a external file like csv file or txt file

    Posted Dec 10, 2015 10:33 AM
    You may want to search the Forums for "pipe echo" to see previous discussions such as UC4 scripting and flat files (V9) regarding this.

    For Windows you might review the Exporting Job Logs out of the UC4 server discussion for a technique that might satisfy your requirements.


  • 3.  Redirecting the output to a external file like csv file or txt file

    Posted Dec 17, 2015 10:48 PM
    Thanks for the imputs...I achieved this by a mix of Automic, Batch and powershell


  • 4.  Redirecting the output to a external file like csv file or txt file

    Posted Sep 27, 2016 08:47 AM
    In the workflow following the SQL job add a script job with the following code.  The variables I have set on the object allow me to select which host I want to pipe it to, which is useful if you have the SQL on your server and the target csv on another. You can probably add this to the post process tab of your SQL job too.

    :SET &REPORT_TYPE# ='REP'
    !Get the previous run in the workflow
    :SET &RUNNR# = SYS_ACT_PREV_NR()
    :SET &HND# = PREP_PROCESS_REPORT(,&RUNNR#,&REPORT_TYPE#)
    :SET &RET# = WRITE_PROCESS(&HND#,&FILENAME#,&HOST# ,&LOGIN#,OVERWRITE)
    :CLOSE_PROCESS &HND#


  • 5.  Redirecting the output to a external file like csv file or txt file

    Posted Sep 27, 2016 01:00 PM
    I just ran some tests of the :WRITE_PROCESS function because I had never used it before.  It worked as desired from the post-process of a WIN job, but when I tried it from a post-process of a SQL job, it returned the following message;

    U00000007 This function has not yet been implemented.

    I suspect this limitation could be worked around though by launching a WIN job from the SQL job.