Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Autosys adding global variable in a jil Post 303008679 by dellanicholson on Monday 4th of December 2017 11:58:49 PM
Old 12-05-2017
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 check every five minutes on the completion of the
PJ.jil jobs.

3. How do you setup the watch_file in each jil to check every five minutes?
4. How do you set up the success command for the file dependency?

I am getting this error :

I am only interested in reading in the global variable value 2 in PJ.jil:
sendevent -E SET_GLOBAL -G "DIFF_VALUE=2"

Here is part of my shell script program:

Code:
while read DIFF_VALUE FLAG
do
	
	if [ "${DIFF_VALUE}" -ge "2" -a "${FLAG}" = "Y" ]
	then
		
		sendevent -E SET_GLOBAL -G "DIFF_VALUE=2"
		
	elif [ "${DIFF_VALUE}" -lt "1" -a "${FLAG}" = "N" ]
	then		
	        sendevent -E SET_GLOBAL -G "DIFF_VALUE="
	
	fi
done < ${DIFF_FILE}

Here are my jil progams (AY.jil and PY.jil):

Code:
Insert PJ_job: cmd_job
job_type: CMD
command: /path/to/script/script.sh  DIFF_VALUE=$${DIFF_VALUE=2}
watch_file: /path/to/script/AY.jil
watch_interval: time_in_mins
machine: machine_name
owner: user_name
condition: s(/path/to/AY.jil)

Insert AY_job: cmd_job
job_type: CMD
watch_file: /path/to/script/PJ.jil
watch_interval: time_in_mins
machine: machine_name
owner: user_name
condition: s(/path/to/PJ.jil)

 

10 More Discussions You Might Find Interesting

1. 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

2. Solaris

Adding multiple virtual interfaces on a non global zone.

Hello All, I have a requirement to add multiple virtual interfaces on a non-global zone (Solaris 10). The global zone is a 2 node Veritas Cluster Server. So, my question is do we have to make any modifications to the cluster config (which I think should not be the case)? Can anyone help with me... (11 Replies)
Discussion started by: mahive
11 Replies

3. 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

4. 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

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. 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

7. Solaris

ZFS adding new filesystems to a non-global zone

Hi Guys I have one Global Zone and 2 non-global zones. root@solar109 # zoneadm list -icv ID NAME STATUS PATH BRAND IP 0 global running / native shared 20 solar109b running ... (1 Reply)
Discussion started by: fryzh
1 Replies

8. 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

9. 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

10. UNIX for Beginners Questions & Answers

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... (0 Replies)
Discussion started by: dellanicholson
0 Replies
ATF-SH(1)						    BSD General Commands Manual 						 ATF-SH(1)

NAME
atf-sh [-s shell] -- interpreter for shell-based test programs SYNOPSIS
atf-sh script DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library. atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter- preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not use any non-standard extensions. The following options are available: -s shell Specifies the shell to use instead of the value provided by ATF_SHELL. ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes. ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes. ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. EXAMPLES
Scripts using atf-sh(3) should start with: #! /usr/bin/env atf-sh Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode the path to atf-sh in the script and then use the -s option afterwards as a single parameter: #! /path/to/bin/atf-sh -s/bin/bash ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts. SEE ALSO
atf-sh(3) BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 11:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy