Faulty Autosys job runs properly

There has been an instance, where to my surprise, an autosys jil script in which the LOGPATH directory was wrongly specified worked all fine.

It was actually a set of jobs with a box having two command jobs and a filewatcher. The filewatcher job had the wrong path used, i.e., other than what was given in the profile file and used by the other jobs. But still, the job ran as expected.

Can anyone come up with any kind of explanations for this behaviour?

Could u post the jil code of the jobs& fw?

Here I give you the jil script for the jobs..

/* ----------------- DWOPS_envoy_pull_acct_C ----------------- */

insert_job: DWOPS_envoy_pull_acct_C job_type: c
command: $SCRIPT_DIR/envoy_pull_acct.ksh
machine: gjsgjfjfsk
#owner: proddts
permission: gx
date_conditions: 1
days_of_week: mo,tu,we,th,fr
start_times: "05:30"
std_out_file: $LOGPATH/envoy_acct.log
std_err_file: $LOGPATH/envoy_acct.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh

/* ----------------- DWOPS_envoy_NDM_file_C ----------------- */

insert_job: DWOPS_envoy_NDM_file_C job_type: c
machine: hfhagfjg
#owner: cmlprod
permission: gx
command: /data/ge_prod/NDM/OPSDW/ndm_acct.ksh

std_out_file: /data/ge_prod/NDM/OPSDW/logs/envoy_watch.log
std_err_file: /data/ge_prod/NDM/OPSDW/logs/envoy_watch.err

alarm_if_fail: 1
profile: /commercial/abinitio/GE/prod_user/sand/CML_CORE/config/prod.profile

/* ----------------- DWOPS_envoy_box_B ----------------- */

insert_job: DWOPS_envoy_box_B job_type: b
#owner: bzcvnzc
permission: gx
condition: success(DWOPS_envoy_pull_acct_C)
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh

/* ----------------- DWOPS_envoy_move_file_C ----------------- */

insert_job: DWOPS_envoy_move_file_C job_type: c
box_name: DWOPS_envoy_box_B
command: $SCRIPT_DIR/ftp_fdr_file.ksh
machine: vnxmzmn
#owner: proddts
permission: gx
std_out_file: $LOGPATH/envoy_move.log
std_err_file: $LOGPATH/envoy_move.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh

/* ----------------- DWOPS_envoy_watch_file_F ----------------- */

insert_job: DWOPS_envoy_watch_file_F job_type: f
box_name: DWOPS_envoy_box_B
machine: vmzxbmxm
#owner: cmzmzv
permission: gx
condition: success(DWOPS_envoy_move_file_C)
std_out_file: $LOG_PATH/envoy_watch.log
std_err_file: $LOG_PATH/envoy_watch.err
watch_file: /home/proddts/feeds/daily/envoy/data/fdr_envoy.dat.done
watch_interval: 60
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh

/* ----------------- DWOPS_envoy_final_extract_C ----------------- */

insert_job: DWOPS_envoy_final_extract_C job_type: c
box_name: DWOPS_envoy_box_B
command: $SCRIPT_DIR/envoy_run_extract.ksh
machine: scmzbgm
#owner: procmm
permission: gx
condition: success(DWOPS_envoy_watch_file_F)
std_out_file: $LOGPATH/envoy_extract.log
std_err_file: $LOGPATH/envoy_extract.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh
Do note the wrong use of LOG_PATH instead of LOGPATH

AND THE PROFILE FILE HAS:-

#!/bin/ksh

SCRIPT_DIR=/home/proddts/feeds/daily/envoy/scripts; export SCRIPT_DIR
FEED_NAME='envoy'; export FEED_NAME
LOGPATH=/home/proddts/feeds/daily/envoy/logs; export LOG_PATH

. /etc/profile

Now??
Any takers?:smiley:

Ok , my theory here ( i can't access to an autosys system right now and you didn't post the /etc/profile ) .

The autosys profile scripts loads in the same shell that the jobs , for example :

profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh
insert_job: DWOPS_envoy_final_extract_C job_type: c

Executes the same way that:

. /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh
DWOPS_envoy_final_extract_C

So it is not always necesary to export the variables inside the profile.

To check this just echo the vars inside a test script an redirect the output to an external file.

Example:

Test.ksh:
echo "SCRIPT_DIR=${SCRIPT_DIR}" >> /tmp/var_echoes
echo "LOGPATH=${LOGPATH}" >> /tmp/var_echoes

/* ----------------- TEST_VARS ----------------- */

insert_job: TEST_VARS job_type: c
command: $SCRIPT_DIR/Test.ksh
machine: vmzxbmxm
#owner: cmzmzv
permission: gx
std_out_file: $LOG_PATH/test.log
std_err_file: $LOG_PATH/test.err
alarm_if_fail: 1
profile: /home/proddts/feeds/daily/envoy/scripts/envoy_profile.ksh