AutoSys Workload Automation

 View Only
  • 1.  Passing the output of the first job to the input of the second

    Posted Apr 02, 2025 03:16 AM

    Hi.

    I 'd like to create a scenario with two jobs:

    1 - SQL job, that returns some string in the output

    2 - Command job, that runs bash script with a parameter, taken from SQL job output

    What is the best way to pass the output of SQL job to the input of the second? I can use "Destination file" attribute in SQL job to store the output, and then read it to take parameter for the script in second job.

    some_param=`tail -n 1 sql_output.txt`;  bash script.sh $some_param

    But, is there another way to do what I need?



  • 2.  RE: Passing the output of the first job to the input of the second

    Broadcom Employee
    Posted Apr 02, 2025 05:52 AM
    Hi,

    Did you try the std_in_file attribute of CMD job_type?

    https://techdocs.broadcom.com/us/en/ca-enterprise-software/intelligent-automation/autosys-workload-automation/24-0-00/reference/ae-job-information-language/jil-job-definitions/std-in-file-attribute-redirect-the-standard-input-file.html

    Regards,
    *Venkat*

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 3.  RE: Passing the output of the first job to the input of the second

    Posted Apr 03, 2025 02:47 AM

    Thank you for the answer!

    But these methods work, if job1 and job2 are running on the same agent. Is it possible to pass output of job1 on server_1 to the input of job2 on server_2?




  • 4.  RE: Passing the output of the first job to the input of the second
    Best Answer

    Broadcom Employee
    Posted Apr 03, 2025 04:55 AM
    If you are dealing with two command jobs, then you can use globs. But
    destination_file attribute does not support globs. If two jobs are command
    type and running on two different machines, you can use globs and achieve
    your requirements.

    Regards,
    *Venkat*

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.