Post on 10-Jan-2017
World®’16
Wobtrigs andFile_Triggers withCAWorkloadAutomationESPEditionJohnRooney,Sr.PrincipalConsultant,CATechnologies
MFX24E
MAINFRAMEANDWORKLOADAUTOMATION
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
ThissessionwillreviewtheCAWorkloadAutomationESPEdition(CAWLAESP)
EventlevelWobtrig commandthatwasintroducedinCAWLAESP11.3.Itisused
totriggeraneventbaseduponadistributedfilebeingcreated.Alsointhissession,
youwilllearnabout
– ApplicationlevelFileTriggerworkloadobjectalongwithallofitscapabilities– Bestpracticesastowhichmethodwouldbethemostappropriatetousefor
yourparticularcircumstance– RecommendationsonparameterstouselikeMAILBOXtoprovidea
notificationonEventexceptionconditionslike“ScanFailed”.
JohnP.RooneyCATechnologiesSr.PrincipalConsultant
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
WOBTRIGS/FILE_TRIGGERS – THEBASICS
WOBDEFS ANDFILE_TRIGGERS DEFINED
QUESTIONS
MONITORINGANDRESOLVINGERRORS
MISC.- REMOTEFILESYSTEMS,HASCENARIOSANDOTHERFUNTHINGS
WOBTRIGS VSFILE_TRIGGERS ATTHEAPPLLEVEL
1
2
3
4
5
6
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Wobtrigs/File_Triggers – Thebasics
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Wobtrigs – Example§ Wobtrigs werecreatedtoprovideanEventSensorfortheunpredictable
distributeddataeventswithouttheneedfordefiningschedulingcriteria.
§ WOBTRIGFILE_TRIGGERAGENT(agent_name)-FileName('/webdata/batch/gis/receive/NAPS*_REQ_*.*')CREATE-NoChange(1)
§ AftertheEVENTissavedandtheagentacknowledgesthatthefiletriggerisset,itwilllookliketheonebelow.
WOBTRIGFILE_TRIGGERAGENT(agent_name)-FileName('/webdata/batch/gis/receive/NAPS*_REQ_*.*')CREATE-NoChange(1)State(Monitored)Status('MonitoredforCREATE')
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Wobtrigs – Notes§ Wobtrigs canbeapossiblechoiceifitisunknownwhatdaysorhowmanytimes
perdaythefilewillbecreated/modified.Itisasimplecasetoimplement
§ SincepeopleareNOTmonitoringthestateofevents,ifaneventgoesinto“ScanFailed”itcangoundetectedunlessprecautionsaretaken.– MAILBOX:SetupanaMAILBOXattheeventlevelsothatagroupwillbe
notifiedifaneventfails.– Scripts.PeoplehavecreatedREXXroutinestomonitorforspecificstates.An
examplecanbefoundoutonthecommunityathttps://communities.ca.com/thread/101793452
§ Iftherearetwonodesthataresetupinafailoverscenarioandtheagent(s)aremonitoringasinglefileshareitispossiblethattheeventwilltriggertwotimeswhenthefilearrives.MoreonthisinthesectiononHA.
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Wobtrigs:(cont ‘d)§ Suspendingorholdinganeventdoesnotstopthefiletrigger.
– Iftheeventissuspended,anytriggersthatcomeinwillbediscarded.– Iftheeventisheld,anyfiletriggersthatcomeinwillbeheldbasedonthe
OVERDUEcountspecifiedintheevent’sSCHEDULEstatement.
§ Defininganeventthatwaitsformultiplefilesbeforetriggeringusingthe“MULTIPLE”keywordmaygiveyouanunexpectedoutcome…
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
File_Triggers inanapplication– Example
FILE_TRIGGERFILE.001RUNDAILYAGENTAGENTU_01
FILENAME'/opt/data/*.tmp'CREATECONTINUOUSALERT(FTG1)ENDJOB
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApplicationlevelFile_Trigger – Notes§ Forthesimplecasewhereafilearrivesasmallnumberoftimesperday,atset
times,thisisabsolutelythebestmethod.
§ Eachfilethatshouldshowupcanhavealatetimeandtriggerdueoutnotificationsifithasn’tarrived.
§ TheFile_Trigger jobisvisibletotheMonitoringgroup.Itgoeslateorfailedjustlikeanyotherjobtheyhavetomonitor.
§ UsingContinuous.EachtimetheFile_Trigger conditionsaremetitwilltriggeranAlert.Itmaybebesttotriggerthisdailyandhaveitcompletejustbeforethenextdaytriggers.
§ ScanFailedjobswillturnredandtriggeralertsforthefailedprocess.Justlikeanyotherfailedjob.
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
UsingVariables§ ESPWTAGENT– Containsthenameoftheagentthatthefiletriggerwasdetected
on.UsingContinuous.Itmaybebesttotriggerthisdailyandhaveitcompletejustbeforethenextdaytriggers.
§ ESPWTFILE– Containsthenameofthefilethatfiletriggerwassatisfiedfor.
§ File_Triggers using“continuous”canuse“MonitorVariables”.ThesecontaininformationlikejobnameForthesimplecasewhereafilearrivesasmallnumberoftimesperday,atsettimes,thisisthebestmethod.
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Monitoringandresolvingerrors
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Thecurrentstateofaffairs….STATE(Failed|In Preparation|Monitored)
§ Indicatesthestateofthemonitoringrequest.YoudonotcodeSTATE;itisdisplayedintheWOBTRIGorCSF
§ Failed:Themonitoringrequestfailed.– Example- Status('ScanFailed')LStatus('The/opt/datadoesnotexistornota
directory')
§ InPreparation:Themonitoringrequestisbeingprepared.
§ Monitored:Theagentismonitoring.
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScanFailedissue§ AWobtrig/File_Trigger goesintoscanfailedifitcannotgettothepathtolookfor
thefile.
§ Insomecasesabriefnetworkglitchorashortperiodwherearemotefilesystemisofflinecancausea“ScanFailed”error.SincepeopleareNOTmonitoringthestateofevents,“ScanFailed”eventscangoundetectedunlessprecautionsaretaken.
§ MAILBOX:SetupanaMAILBOXattheeventlevelsothatagroupwillbenotifiedifaneventfails.
§ Scripts:PeoplehavecreatedREXXroutinestomonitorforspecificstates.Anexamplecanbefoundoutonthecommunityathttps://communities.ca.com/thread/101793452
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScanFailed– Resolving§ AnotherworkaroundistousetheparametersbelowtostoptheFile_Trigger from
goinginto“ScanFailed”ifthereisabriefoutage/issue.Thescan.retries parameterwilllettheagentretryxnumberoftimesbeforeactuallyfailing.
§ filemonplugin.scan.retries=5§ filemonplugin.scan.retries.sleep=60000
§ Theexampleabovewillhavetheagentretryfor5minutesbeforefailing.Itisnotrecommendedtoextendthisperiodfortoolong.
§ Retries- default=1§ Retries.sleep - default=10000or10seconds
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScanFailed- ResolvingEVENTLEVEL- Tofixaneventthatisin“ScanFailed”removeeverythingaftertheword“CREATE/UPDATE…”andsaveoutoftheeventinISPF.UploadthemodifiedeventusingWorkstation.TheeventwillresendandverifythenewFile_Trigger.
/*************************************************//*DEFINEDBYPOWDO03AT00.54ONMON25APR2016*//*LASTRUNAT00.57ONMON25APR2016*//*************************************************/EVENTID(POWDO03.DPFILEYY)MAILBOX(POWDO03)SYSTEM(X114DPM)REPLACEINVOKE'POWDO03.TEST.APPL(DPFILEYY)'WOBTRIGFILE_TRIGGERAgent(AGENTU_01)FileName('/opt/data/z8.txt')-
CREATEState(Failed)Status('ScanFailed')-LStatus('The/opt/datadoesnotexistornotadirectory')
ENDDEF
APPLICATIONLevel- Toresolvea“ScanFailedattheApplicationlevelrestartthejobbyputtingan“R”besideitinCSF.
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Misc.- Remotefilesystems,HAScenariosandotherfunthings
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RemotefilesystemsManytimesthefileisn’tlocalontheserver.
– ThepathisaUNCpathlike\\location1\path1\path2\filename.abc
§ TheagentrunningasLocalSystemaccountorroothasfullauthoritytoeverythingontheserverbutitdoesn’thaveaccesstoanythingoutsidethebox
§ ItisnotpossibletograntLocalSystemaccountaccesstoanythingoutsidethebox.
§ RunningthejobasaUSERdoesnotgranttheauthoritytoaccessthefileshare.
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Remotefilesystems:(cont’d)§ 2Options§ Runningtheagentasauser–
– GototheagentService>>RightclickonProperties>>LogOntab.Changetheusertoaserviceaccountwithauthoritytothefileshare.
§ Itispossibletomakethelocationlooklocal.– Mountingthedrive.– Mappingthedrive.MakingtheMappingpersistentisthekey.– “AddaNetworkLocation”
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
AgentsthataresetupwithHighAvailability(HA)
Whentwoagentsaresetuptofailbackandforthusinganaliasandtheyarewatchingaremotefilesystemforanupdate:§ Useapplicationlevelnon-continuousfilemonitoring.§ ApplicationlevelFile_Triggers canonlyseetheupdateonetimeforthatapplication.
generation.BothagentswillsendbacktothemasterthattheybothsawtheFile_Trigger conditionmetbuttheywillbothcompletethesamewob inthecorrectapplication.gen.
§ Eventlevelfiletriggerscanbepassedouttobothagents.Whenthefilecomesinbothwillsendanupdatetothemasterandtwotriggerswillhappen.– Maynotseethebadbehavioruntilafterafailoverhappens.
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
UsingRegularExpressions
Itispossibletousearegularexpressiontolookforafilewithanamethatmayvaryfromtimetotime.§ Toenableregularexpressions,addfilemon.filename.r7regex=truetothe
agentparm.txtandbounceagent.§ Thejobbelowwilllookforfilesthatstartwithalowercase“t”andthenhave3
charactersthenhaveanysuffix.§ Thisisveryusefulforfileswithdates
FILE_TRIGGERFILE.005RUNDAILYAGENTAGENTU_01FILENAME'/opt/data/t???.*'UPDATE
ENDJOB
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WobtrigsVSFile_Triggers
23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Wobdef vsFiletriggerinapplEventWobdef Appl definitionWobtrigs areinvisibletotheMonitoringstaff
Itistreated asanyotherjobbyMonitoringteam.
Unable toknowiffiledoesnotarriveontime.
Abletosetlatetimes iffilehasnotarrivedbyaspecifictime.
Canwatchforupdateorcreateusing“CREATE”
“CREATE”willfailiffiledoesnotexistwhenjobruns
Canwatchforupdateorcreateusing“CREATE”
Need tousecontinuouskeywordbutneedsanalertandseparateevent
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Wobdef vsFile_Trigger intheappl
EventWobdef Appl definitionIftherearetwonodesthataresetupinafailoverscenarioandtheagent(s)aremonitoringasinglefileshareitispossible
Waitingformultiplefilescancauseproblemsifonlyonefilearrives.
Usemultiplejobsformultiplefiles.
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessionsSESSION# TITLE DATE/TIME
MFX33EBestPracticesforsettingupCAWorkloadAutomationESPApplicationProcedures
11/15/2016at1:00pm
JasmineB
MFX129SVisionandRoadmap:CAWorkloadAutomationESPEdition
11/16/2016at12:45pm
JasmineC
MFX180SHowtoHaveaVoiceinProductEnhancementsthroughCACommunitiesIdeationandValidation
11/17/2016at3:00pm
JasmineB
MFX136SDeliveringCAWorkloadAutomationfromaSaaSplatform
11/17/2016at4:30pm
JasmineB
26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MustSeeDemos
CAWLAAE&DEMFandWorkloadAutomation
SeamlessApplicationAutomationAgents&AdvancedIntegrationsMFandWorkloadAutomation
CAConversionService
CAWorkloadAutomationMFandWorkloadAutomation
Innovations:Mainframe:WorkloadAutomationCAWLACA7&ESPMFandWorkloadAutomation
Innovations:CrossEnterpriseWorkloadAutomation
27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.28 @CAWORLD#CAWORLD
MainframeandWorkloadAutomation
FormoreinformationonMainframeandWorkloadAutomation,pleasevisit:http://cainc.to/9GQ2JI
29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Thankyou.
Stayconnectedatcommunities.ca.com