Vous êtes sur la page 1sur 11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

Tutorials4All
"TechnologiesforallTechnicals"

AUTOSYSCOMMANDS
NOV16
PostedbyAbaniMahana
Thelistofcommandsusedinautosys:
Autoflags:
The autoflags option is used to show information about Unicenter Autosys JM and about its
systemconfiguration.
Theautoflagscommandprintsouttheversionandreleasenumber,thedatabasesbeingused,and
theoperatingsystem.Theautoflagscommandisalsousedtodeterminetheproperhostnameand
hostIDforlicensegeneration.
SYNTAX:
Autoflags
Autoflagsa|i|o|d|v|r|h|n|
Autoflagsa:Thiscommandwoulddisplayallautoflagsinformationtostandardoutput.
Autoflagsi:ThiscommandwoulddisplaythetapeIDnumbertostandardoutput.
Autoflagso:Thiscommandwoulddisplaytheoperatingsysteminformationtostandardoutput.
Autoflagsd:Thiscommandwoulddisplaythedatabasetypeoutput,SYSforSybaseorORAfor
oracle.
Autoflagsv:Thiscommandwoulddisplaytheversionnumbertostandardoutput.
Autoflagsr:Thiscommandwoulddisplaythereleasenumbertostandardoutput
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

1/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

Autoflagsh:Thiscommandwoulddisplaythehostidnumbertostandardoutput
Autoflagsn:Thiscommandwoulddisplaythehostnametostandardoutput.
Autoping:
The Autoping command verifies if the server and client machines are properly configured and
communicating successfully. It also checks whether the Remote agent and the remote agents
databases connections are functioning properly. In case of dual servers it checks both the
databases.
SYNTAX:
Autoping m All : This command is used to Autoping the particular machine or all the
machines mentioned in the database, The machine names are entered through the command
insert_machine . The Autoping would give an error if the machine name is not found in the
database.
Autorep: The autorep command lists a variety of information about the job, machines and the
globalvariablesthataredefinedinthedatabases.Autorepalsoservesastheproblemtrackingtool
bylistingoutalltherelevanteventinformationforthelastrunofjob.
ItisalsousedtogetextractjobdefinitionsinJILscriptsformat.
SYNTAX:
Autorep{jjob_name|Mmachine_name|Gglobal_name}
{s,d,q,o,u}
Autorepj<job_name>
This command indicates that a job report is desired. job_name specifies the name of the job on
whichtoreport.ToreportalljobsspecifyALL.The%charactermaybeusedinthejobnameasa
wildcard.Eg%box%willselectalljobscontainingthestringbox.
Ex:D:\Utils\CA\UNICEN~1.SAS>autorepjUOPS_WLYJOB_z_PUOP0TAX
JobNameLastStartLastEndSTRunPri/Xit
UOPS_WLYJOB_z_PUOP0TAX05/06/200705:34:0005/06/200707:56:10SU1256298/1
AutorepM<machine_name>
This command is used to get the machine report. This gives the lists the machines max load,
currentload,andfactor.ToreportforallthemachinesuseALLoption.
Ex:
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

2/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

D:\Utils\CA\UNICEN~1.SAS>autorepMTTMF001
MachineNameMaxLoadCurrentLoadFactorO/S
TTMF0011.00NT
AutorepG
This command is used to get the global variable reports. The command lists the variable name,
value,andlastmodificationdate.ToreportalltheglobalvariablesuseALLoption.
Ex:
D:\Utils\CA\UnicenterAutoSysJM.SAS\autosys\bin>autorepUOPS_DAILY
GlobalNameValueLastChanged
UOPS_DAILYTRUE05/10/200704:27:08
Autorepj<job_name>s
Thiscommandindicatesthatasummaryreportofthejobisrequired.
Ex:
D:\Utils\CA\UNICEN~1.SAS>autorepjHQN_INVENTORY_BOXs
JobNameLastStartLastEndSTRunPri/Xit
HQN_INVENTORY_BOX05/10/200706:01:0305/10/200706:03:20SU1261419/1
HQN_INVENTORY_BOX_PUOP873F_FTP 05/10/2007 06:01:06 05/10/2007 06:01:20 SU
1261419/1
HQN_INVENTORY_BOX_PUOP873F_FTP 05/10/2007 06:01:13 05/10/2007 06:01:16 SU
1261419/1
HQN_INVENTORY_BOX_PUOP873F05/10/200706:01:2605/10/200706:01:48SU1261419/1
HQN_INVENTORY_BOX_PUOP087305/10/200706:01:5305/10/200706:03:16SU1261419/1
Autorepj<job_name>d
Thiscommandindicatesthatadetailreportofthejobisrequired.
Ex:
D:\Utils\CA\UNICEN~1.SAS>autorepjPFPVI050d
JobNameLastStartLastEndSTRunPri/Xit
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

3/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

PFPVI05005/10/200705:05:5805/10/200705:06:35FA1259917/1100
Status/[Event]TimeNtryESProcessTimeMachine
STARTING05/10/200705:05:551PD05/10/200705:05:58snsprd
RUNNING05/10/200705:05:581PD05/10/200705:06:01snsprd
FAILURE05/10/200705:06:351PD05/10/200705:06:38
[***ALARM***]
JOBFAILURE05/10/200705:06:371PD05/10/200705:06:40snsprd
Autorepj<job_name>q
Thiscommandindicatesthataqueryreportofthejobisrequired.
Ex:
D:\Utils\CA\UNICEN~1.SAS>autorepjDWH_FORSYTE_WEEKLY_JOBq
/*DWH_FORSYTE_WEEKLY_JOB*/
insert_job:DWH_FORSYTE_WEEKLY_JOBjob_type:c
command:E\:\MSwork1\BCASEP\load\load_forsyte_driver.cmd
machine:MDCAS035
owner:poracdw@SCHUSTERNA
permission:gx,ge
date_conditions:1
days_of_week:sa
start_times:07:15
condition:s(DWH_DAILY_PROCESS_BOX)
std_out_file:E\:\MSwork1\BCASEP\load\Autosys_load_forsyte_driver.log
std_err_file:E\:\MSwork1\BCASEP\load\Autosys_load_forsyte_driver.err
max_run_alarm:30
alarm_if_fail:1
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

4/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

Autostatus:
This command would report the current status of a specific job , or the value of the global
variable.
SYNTAX:
Autostatus{j<job_name>|G<global_name>}
Autosyslog:
ThisisthecommandtodisplaythelogsforeventprocessorandtheRemoteagents.
SYNTAX:
Autosyslog{e|j<job_name>}
Autosysloge:Indicatesthattheeventprocessorlogistobementioned.Inordertoterminatethis
sessionjustpressctrlc.ThisisusedtoviewtheloginEP.
Autosyslog j <job_name> indicates the Remote Agent log for the specified job_name is to be
viewed.Thiscommandistobegiveninthemachineinwhichthespecifiedjobruns.Thisisused
toviewthelogforthejobinRemoteAgentifthejobhasfailed
Ex:
D:\Utils\CA\UNICEN~1.SAS>autosyslogjEDI_OASIS_FW
***Noremoteagentfilesfoundforjob_nameEDI_OASIS_FW***
Chk_auto_up:
Inspects the environment variables and administrator settings in the windows registry, then
determinesthedatabase(eventserver)andeventprocessorarerunning.
Ex:
D:\Utils\CA\UNICEN~1.SAS>chk_auto_up
Attempting(1)toConnectwithDatabase:SNSAUTO1
***HaveconnectedsuccessfullywithDatabase:SNSAUTO1.***
ConnectedwithEventServer:SNSAUTO1
Attempting(1)toConnectwithDatabase:SNSAUTO2
***HaveconnectedsuccessfullywithDatabase:SNSAUTO2.***
ConnectedwithEventServer:SNSAUTO2
CheckingMachine:mdcas050
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

5/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

PrimaryEventProcessorisRUNNINGonmachine:mdcas050
CheckingMachine:mdcas051
ShadowEventProcessorisRUNNINGonmachine:mdcas051
Job_depends:
Thiscommandprovidesthedetailedreportsaboutthedependenciesandconditionsofajob.
The command can be used to determine the current status of a job its dependencies and nested
hierarchies(forboxes)asdefinedinthejobdefinition,andalsothedefinitiononwhatjobswould
runduringagivenperiodoftime.
SYNTAX:
Job_depends{c|d|t}[j<job_name][Ffrom_date/time][Tto_date/time][Lprint_level][
Ddata_server:database|DTNSname]
SENDEVENT: Sendevent command can be issued to any job to change its status, like starting,
stopping.Theycanalsobeusedtosetaglobalvariableortocancelthescheduledevent.
STARTJOB:startsthejobspecified.
KILLJOB:killsthejobspecified.
DELETEJOB:deletesthejobspecified.
FORCE_STARTJOB: starts the specified job, regardless of whether the starting conditions are
satisfied.
JOB_ON_ICE: puts the specified job on ice. A job cannot be put onice when it is in
Starting/Runningcondition.
JOB_OFF_ICE:takesthespecifiedjoboffice.Jobsthataretakenofficewillnotstartuntilthenext
timetheirstartingconditionsaremet.
JOB_ON_HOLD:putsthespecifiedjobonhold.Thenthisparticularjobwillnotbestartedandits
dependentjobswillnotrun.
JOB_OFF_HOLD:takesthespecifiedjoboffhold.Ifthestartingconditionsofthejobaremet,it
getsstarted,
STOP_DEMON:stopstheeventprocessorservice.
sendeventESTARTJOBj<job_name>
D:\UTILS\CA\UNICEN~1.TSS>sendeventESTARTJOBJabc_test
Startsthejob.
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

6/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

sendeventEFORCE_STARTJOBj<job_name>
D:\UTILS\CA\UNICEN~1.TSS>sendeventEFORCE_STARTJOBJabc_test
Forcestartsthejob.
sendeventECHANGE_STATUSj<job_name>sINACTIVE
D:\UTILS\CA\UNICEN~1.TSS>sendeventECHANGE_STATUSJabc_testsINACTIVE
Changesthejobstatustoinactive.
TolisttheForecastreportofthejobsrunningatparticulartimeinterval:
Job_dependsjALLtFmm/dd/yyTmm/dd/yy
CreatingaCommandJob:
Jobscanbecreatedeitherthroughthecommandpromptorthejobeditor.
Whileusingthecommandpromptweprovidetheattributes:
Insert_job:
Job_type:c[forallcommandjobs]
machine:
command:
ex:
D:\UTILS\CA\UNICEN~1.TSS>jil
jil>>1>insert_job:abc_test
jil>>2>job_type:c
jil>>3>command:dir
jil>>4>machine:localhost
jil>>5>exit
Creatingafilewatcherjob:
The job is created by providing the path of the file which the file watcher has to watch. The
minimumsizeofthefilecanbeprovidedifnecessary:
Insert_job:
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

7/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

job_type:f[forallfilewatchers]
machine:
watch_file:c:\TEMP\EodTransfile
watch_interval:
watch_file_min_size:
Creatingadependentjob:
Thejobiscreatedbyprovidingthedependentconditionassuccessofsomeotherjob:
Insert_job:
Job_type:
machine:
condition:s(test)
command:
NOTES:
Whenajobisstuckinthestartingconditionthismeansthattheeventprocessorcommunicated
with the remote agent and passed all the information the remote agent ran the job but was not
abletocommunicatetotheDB.OncetestingisdonewithAutoSysoneshouldchangethedefault
refreshintervalforAutoSys.ThisissothereislessqueryingtotheDB.WhenAutoSysgoesfrom
dual mode to single mode, always run the autobcp command before bringing AutoSys back to
dual mode/High Availability. Default behavior for stdout is to always appends. If you want to
overwritethefileenterthefollowing,nospaces:>file.out
BoxLogic
Use boxes to group jobs with like scheduling parameters, not as means of grouping jobs
organizationally.Forexample,ifyouhaveanumberofjobsthatrundailyat1:00a.m.,youcould
putallthesejobsinaboxandassigningadailystartconditiontothebox.However,avarietyof
accountprocessingjobswithdiversestartingconditionsshouldnotbegroupedinthesamebox.
DefaultBoxJobBehavior
Someimportantrulestorememberaboutboxesare:
Jobsrunonlyonceperboxexecution.
Jobsinaboxwillstartonlyiftheboxitselfisrunning.
https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

8/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

As long as any job in a box is running, the box remains in RUNNING state; the box cannot
completeuntilalljobshaverun.
Bydefault,aboxwillreturnastatusofSUCCESSonlywhenallthejobsintheboxhaverunand
thestatusofallthejobsissuccess.DefaultSUCCESSisdescribedinDefaultBoxSuccessand
BoxFailureonpage513.
Bydefault,aboxwillreturnastatusofFAILUREonlywhenalljobsintheboxhaverunandthe
statusofoneormoreofthejobsisfailure.DefaultFAILUREisdescribedinDefaultBoxSuccess
andBoxFailureonpage513.
Unlessotherwisespecified,aboxwillrunindefinitelyuntilitreachesastatusofSUCCESSor
FAILURE. For a description of how to override this behavior, see Box Job Attributes and
Terminatorsonpage56.
ChangingthestateofaboxtoINACTIVE(viathesendeventcommand)changesthestateofall
thejobsintheboxtoINACTIVE.
WhenyouShouldNotUseaBox
Thefactthatalljobsinaboxchangestatuswhenaboxstartsrunninghasleadsometouseboxes
to implement job cycle behavior. Be aware that placing jobs in a box to achieve this end may
bringwithitundesiredbehaviorduetothenatureofboxes.
Avoidthetemptationtoputjobsinaboxasashortcutforperformingevents(suchasON_ICEor
ON_HOLD)onalargenumberofjobsatonce.Youwillmostlikelyfindthatthedefaultbehavior
ofboxesinhibitstheexpectedexecutionofthejobsyouplacedinthebox.
Likewise,youshouldnotplacejobsinaboxsolelybecauseyouwanttorunreportsonallofthem.
Whenyourunautoreponabox,youwillgetareportontheboxandallthejobsinthebox(unless
you use the L0 option). In addition, if you use wildcarding when specifying a job name, you
could get duplicate entries in your report. For example, suppose you have a box named
acnt_boxcontainingthreejobsnamedacnt_job1,acnt_job2,anddaily_rep.Ifyouspecify
acnt%asthejobnamefortheautorepreport,thereportwillhaveanentryfortheboxacnt_box
and an entry for each job in the box. Then autorep will continue searching for all job names
matchingthewildcardcharactersand,thus,willlistacnt_job1andacnt_job2asecondtime.
WhatHappenswhenaBoxRuns
As soon as a box starts running, all the jobs in the box (including subboxes) change to status
ACTIVATED,meaningtheyareeligibletorun.(Becauseofthis,jobsinboxesdonotretaintheir
statuses from previous box cycles.) Then each job is analyzed for additional starting conditions.
All jobs with no additional starting conditions are started, without any implied ordering or
prioritizing.JobswithadditionalstartingconditionsremainintheACTIVATEDstateuntilthose
additionaldependencieshavebeenmet.TheboxremainsintheRUNNINGstateaslongasthere
areactivatedorrunningjobsinthebox.
9/11
Ifaboxisterminatedbeforeajobinitwasabletostart,thestatusofthatjobwillchangedirectly

https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

Ifaboxisterminatedbeforeajobinitwasabletostart,thestatusofthatjobwillchangedirectly
fromACTIVATEDtoINACTIVE.
NoteoJobsinaboxcannotstartunlesstheboxisrunning.However,oncethejobstartsrunning,
itwillcontinuetoruneveniftheboxislaterstoppedforsomereason.
TimeConditionsinaBox
Each job in a box will run only once per box execution. Therefore, you should not define more
thanonetimeattributeforanyjobinaboxbecausethejobwillonlyrunthefirsttime.Ifyouwant
toputajobinabox,butyoualsowantittorunmorethanonce,youmustassignmultiplestart
timeconditionstotheboxitself,anddefinenotimeconditionsforthejob.Rememberalsothatthe
boxmustberunningbeforethejobcanstart.Donotassignastarttimeforajobinaboxifthebox
will not be running at that time. If you do, the next time the box starts the job will start
immediately.
Thefollowingexampleillustratesascenariothatwouldnotworkproperlyifplacedinabox.
job_aisdefinedtorunrepeatedlyuntilitsucceeds.job_reporthasonestartingconditionthe
successofjob_a.
HowJobStatusChangesAffectBoxStatus?
Ifaboxthatisnotrunningcontainsajobthatchangesstatus,asaresultofaFORCE_STARTJOB
or CHANGE_STATUS event, the new job status could change the status of its container box. A
changeofstatusoftheboxcouldtriggerthestartofdownstreamjobsthataredependentonthe
box.
Ifaboxcontainedonlyonejob,andthejobchangedstatus,theboxstatuswouldchange.
About these ads
(http://wordpress.com/aboutthese-ads/)

AboutAbaniMahana
IamAbani..:)
ViewallpostsbyAbaniMahana(https://amahana.wordpress.com/author/amahana/)
PostedonNovember16,2013,inFrequentlyUpdates.andtaggedunicenterautosysjm
commands.Bookmarkthepermalink.1Comment.

https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

10/11

11/04/2015

AUTOSYSCOMMANDS|Tutorials4All...

Leaveacomment

Trackbacks1

Comments0
1. Pingback:AutosysMEGAINFINITUM|Badgoonersthingstoremember

BlogatWordPress.com.TheMystiqueTheme.
Follow

FollowTutorials4All...
BuildawebsitewithWordPress.com

https://amahana.wordpress.com/2013/11/16/unicenterautosysjmcommands/

11/11

Vous aimerez peut-être aussi