AUTOSYS use window box Create update delete jobs

In this tutorial you will see how to Create, Update and Delete jobs using window box. If you are aware of doing this process in Linux boxes then process are same. Only requirement is AUTOSYS client should be installed on window boxes to use.

Steps:

  • First check if AUTOSYS client is installed on window or now. To check login to the window box and search for “AutoSys Job Scheduler” and to check this click start –> All Programs –> You will see in menu “AutoSys Job Scheduler version number”. Other wise go to your C:\ OR D:\ drive and search “AutoSys” if its installed you will find in your search result. In my case, I have installed in D:\ drive and it shows below:

D:\AutoSys 11.x –> 11.x is its version number. Inside this you will see multiple instance of client of different servers.

  • To open new command prompt for any of the AUTOSYS instances click Start –> All programs –> “AutoSys Job Scheduler version name”
    –> Autosys Command Line –> You will many server instances clients click any one of them to open new command prompt to execute AUTOSYS on that server instance. Once you will click that you will see new command prompt will be open as below: (Type autorep command to see if its enabled or not and if it’s enabled you will see details of its commands)
  • D:\AutoSys 11.x>
D:\AutoSys 11.x>autorep
CAUAJM_E_40003 Invalid parameters specified.

Unicenter AutoSys JM Autorep Utility

USAGE: autorep [-J JobName] [-d | -s | -q | -o OverRide # | -a | -w]
               [-B GroupName] [-I ApplicationName] [-t]
               [-X ExternalInstanceName] [-Y JobType]
               [-R Run_num] [-L PrintLevel] [-N Retry] [-x]
               [-z GlobalBlobName] [-f BlobDownloadDirectory]
               [-G GlobalName] [-M MachineName] [-D DataSource] [-?]

WHERE: -J JobName
       -I ApplicationName
       -B GroupName
       -o Overnum
       -X ExternalInstance
       -Y JobType
       -z GlobalBlobName
       -G GlobalName
       -M MachineName
       -d                       Generates a detail report
       -s                       Generates a summary report
       -q                       Generates a query report (Jil format)
       -w                       Reports untruncated job name and machine name
                                and uses the long form of job conditions
       -t                       Includes the timezone in the report
       -R Run_num               Generates the report for the job run
                                specified in run_num
       -L PrintLevel            Generated Box Job hierarchy report will be
                                limited to level specified
       -N Retry                 Attempts to connect to the database for
                                number of times before generating an error
       -D DataSource            Generates report from specified DataSource
       -f BlobDownloadDirectory Location on disk where blob data is downloaded t
o
       -a                       Download blob data to file as ASCII text
       -x                       Returns version information
       -?                       Help

NOTE:  1. -J OR -M OR -B OR -I OR -X OR -Y are required parameters.
       2. If OverRide# = 0, it will display OverRide Currently in Effect.
       3. If both [-B GroupName] and [-I ApplicationName] attributes
          are specified, this is treated as an AND condition.
       4. [-J JobName] and [-B GroupName or -I ApplicationName][-X]
          are mutually exclusive.
       5. The [-a] and/or [-f] attributes are valid with the attribute
          pair [-J JobName] and [-q] or with the [-z GlobalBlobName] attribute


D:\AutoSys 11.x>
  • Now you are ready to use AUTOSYS
  • If you want to crate new job first create jil file sample is below:
insert_job: javahonk_Box job_type: b
owner: sybase
permission: gx,ge,mx,me
date_conditions: 1
days_of_week: mo,tu,we,th,fr
start_times: “20:00”
description: “javahonk~ load database on request”
term_run_time: 600
max_run_alarm: 600
alarm_if_fail: 1
application: javahonk
  • Save this file to somewhere on the window box as *.jil or *.txt does not matter (Note: In single *.txt file or *.jil file you could include multiple jobs). For this i have saved my file TestMeOut.txt and executed below command:
D:\AutoSys 11.x>jil < TestMeOut.txt

CAUAJM_I_50204 Inserting/Updating Job: 2OTC_TEST_ME_Box
CAUAJM_E_10302 Database Change successful.

D:\AutoSys 11.x>

Note: You should have proper access to execute the job otherwise you will get exception below:

D:\AutoSys 11.x>jil < TestMeOut.txt
______________________________________________________________________________

CAUAJM_I_50204 Inserting/Updating Job: 2OTC_TEST_ME_Box
CAUAJM_W_10420 Job Create Access Denied!
CAUAJM_W_10439 No Policies Granting Access To Resource
CAUAJM_W_10440 Class: as-job Resource: UC1.2OTC_TEST_ME_Box User: JavaHonk Access: create
CAUAJM_W_10442 Time: 1479845146  Delegator: None
CAUAJM_E_10302 Database Change WAS NOT successful.
______________________________________________________________________________

CAUAJM_E_50198 Exit Code = 1
______________________________________________________________________________


D:\AutoSys 11.x>

If you see above exception while executing AUTOSYS job then you will have to raise request to add your id to whatever g
That’s it.

Leave a Reply

Your email address will not be published. Required fields are marked *