Add global variable to jil autosys


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Add global variable to jil autosys
# 1  
Old 12-02-2017
Add global variable to jil autosys

I am new to autosys. I want to add a global variable to a jil file named PJ.jil.
I also want to add a watch_file command to filename PJ.jil and AY.jil. The watch_file command checks every five minutes if the jobs have completed. For example. AY.jil needs to wait until all the jobs in PJ.jil have completed. PJ.jil needs to wait until all jobs in AY.jil have completed. When I run PJ.jil and AY.jil I get this error :


Code:
AY.jil:
watch_file: /path/to/file/PY.jil
watch_interval: time_in_mins

PJ.jil:
watch_file: /path/to/file/AY.jil
watch_interval: time_in_mins
global variable: (DIFF_VALUE=2)

The code below is a portion of a shell script program that sets a global variable value that is used in the jil box.



Code:
	if [ "${DIFF_VALUE}" -ge "2" -a "${FLAG}" = "Y" ]
	then
		LOG_FILE "Set the DIFF_VALUE as 2"
		sendevent -E SET_GLOBAL -G "DIFF_VALUE=2"

	elif [ "${DIFF_VALUE}" -lt "1" -a "${FLAG}" = "N" ]
	then		
		LOG_FILE "Set the DIFF_VALUE as empty"
		sendevent -E SET_GLOBAL -G "DIFF_VALUE="

When I run the JIL FILES, I am getting this error :

Code:
PJ.jl:

Insert PJ_job: cmd_job
job_type: CMD
command: /path/to/script/script.sh
watch_file: /path/to/file/AY.jil
watch_interval: time_in_mins
watch_file_type: jil
condition: s(DIFF_VALUE=2)& v(DIFF_VALUE=2) 

machine: machine_name
owner: user_name

AY.JIL:

Insert AY_job: cmd_job
job_type: CMD
command: /path/to/script/script.sh
watch_file: /path/to/file/PY.jil
watch_interval: time_in_mins
watch_file_type: jil
machine: machine_name
owner: user_name

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Autosys adding global variable in a jil

I have created two jil files name AY.jil and PY.jil. I have three issues which are as follows: 1. how do you add a global variable value from a shell script program to a jil file? 2. PY.jil needs to check every five minutes on the completion of the AY.jil jobs and AY.jil needs to... (1 Reply)
Discussion started by: dellanicholson
1 Replies

2. Shell Programming and Scripting

Global Variable

Hi, I have created a variable say today at the begin having 123 as its value and inside a for loop it gets resolved to some value say 150 in its first iteration. How can I use this value 150 ( 1st iteration's ) outside the scope of for loop ?. In the same way I wanted to use all iteration's... (1 Reply)
Discussion started by: penqueen
1 Replies

3. Shell Programming and Scripting

awk - Parsing Autosys JIL

I'm trying to modify the script given in post 7 of the following thread: 146564-need-parse-jil-file-into-excel-file.html. (Sorry, can't post the URL as I don't have enough posts.) The original script is as follows: awk -F ' *_]*: *' 'BEGIN ... (9 Replies)
Discussion started by: GnuScripter
9 Replies

4. Shell Programming and Scripting

Global variable value

Hi All, Im new to shell scripting. I am running EgA.sh and setting one global variable XYZ=0 . Also calling another EgB.sh from EgA.sh, changing the value of XYZ=10 but after executing EgB.sh, value of XYZ is still 0. Im expecting it to be 10. Anyone for help. Thanks in Advance. :) (5 Replies)
Discussion started by: paliwal
5 Replies

5. UNIX for Dummies Questions & Answers

Autosys: How to change a machine name in Autosys JIL.

All the autosys jobs are on server-1 and server-1 has been crashed due to some reason, Now I have to run 5 autosys jobs on server-2 (failover server) which are on server 1. How to do with Autosys command (which command needs to fired on JIL) (0 Replies)
Discussion started by: tp2115
0 Replies

6. UNIX for Advanced & Expert Users

Autosys: Check the jil load time

Hi All, I wanted to know what time the box jobs were loaded into a particular Autosys Instance. Is there a autosys command to find out the above? (The timestamp at which a box was loaded) I had loaded my JIL script without outputting it to the log file. (4 Replies)
Discussion started by: grep_me
4 Replies

7. UNIX for Advanced & Expert Users

Autosys JIL script for logging

Hi I'm very new to this Autosys JIL scripts. Now I need to create an Command to copy the file from one folder to another by watching that folder. I have written & create that job but i don't no how to add logging in JIL script. Before moving the file i have to log the file details in a separte... (0 Replies)
Discussion started by: vijayvz
0 Replies

8. Shell Programming and Scripting

Help with Global Variable

Hi Guyz, I have a requirement like, i have to run a script every hour to count the number of errors encountered. At the end of the day, i need to send them the total number of errors, that have ocurred the entire day. For eg. if 10 errors occurred for starting 1 hr, 5 for next 1 hr, so on.... (1 Reply)
Discussion started by: DTechBuddy
1 Replies

9. Shell Programming and Scripting

Global variable

I have written a shell scritp in which i am using a variable which is declared before a while loop and i am updaitng the variable in while loop and want to use its updated value outside the loop. I am not able to do so, b'coz the scope of the variable is limited to the while loop only and when i am... (5 Replies)
Discussion started by: deepanshu
5 Replies

10. UNIX for Advanced & Expert Users

AutoSys (updating global variable)

Hello all, I am very new at both AutoSys and VBScript. I have looked at the manual for hours however I just can't figure it out, the following is the problem: NOTE: AutoSys is being used in all Windows environment. But realizing that this is a UNIX forum, please do provide the answer however... (1 Reply)
Discussion started by: mik357
1 Replies
Login or Register to Ask a Question