Autosys Help!

I am not sure why my output keeps going to my std_out_file!!

Here's my JIL:

insert_job: test_autosys job_type: c
command: $SCRIPT_DIR/test
machine: abcde
owner: bob@abcde
permission: gx,wx
date_conditions: 1
days_of_week: mo, tu, we, th, fr
start_times: "8:00, 9:00, 10:00, 11:00, 12:00, 13:00, 14:00, 15:00, 16:00, 17:00"
description: "Test Job"
std_out_file: $TEMP_DIR/$AUTO_JOB_NAME.$AUTORUN.OUT.$$
std_err_file: $TEMP_DIR/$AUTO_JOB_NAME.$AUTORUN.ERR.$$
alarm_if_fail: 0
profile: /apps/autosys_profile

Here's my profile

#!/bin/sh
TEMP_DIR=/tmp;
SCRIPT_DIR=/home;
OUTPUT=/home/output_autosys;

Here's my script called "test"

#!/bin/sh
#This is a comment
echo `date` testing Autosys >> $OUTPUT

When i run this job .. I am not getting any echo on my output_autosys file, but I am getting it at my std_out_file under /tmp.

Any idea why??

I think profile variables need to be exported and are not getting to your script. Can you do an

echo "Output=$OUTPUT"

inside your script to check?

Export the variables in your profile:

export OUTPUT=/home/output_autosys

My job fails when I used Export in my profile

#!/bin/sh
TEMP_DIR=/tmp;
SCRIPT_DIR=/home;
export OUTPUT=/home/output_autosys;

...

I tried to manually run my test script and I am getting ./autosys_profile: OUTPUT=/home/output_autosys: is not an identifier

#!/bin/sh
#This is a comment
./autosys_profile
echo `date` testing Autosys >> $OUTPUT

---------- Post updated at 06:35 AM ---------- Previous update was at 06:20 AM ----------

I think i fixed the problem!

OUTPUT=/home/output_autosys;
export OUTPUT

To help,we would have to know platform/OS version... for e.g. on many platforms /home is only writeable by root...

you would have to explain what you call your profile (vs profile: /apps/autosys_profile)