29
World ® ’1 6 Wobtrigs and File_Triggers with CA Workload Automation ESP Edition John Rooney, Sr. Principal Consultant, CA Technologies MFX24E MAINFRAME AND WORKLOAD AUTOMATION

Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

Embed Size (px)

Citation preview

Page 1: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

World®’16

Wobtrigs andFile_Triggers withCAWorkloadAutomationESPEditionJohnRooney,Sr.PrincipalConsultant,CATechnologies

MFX24E

MAINFRAMEANDWORKLOADAUTOMATION

Page 2: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.

Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.

ForInformationalPurposesOnlyTermsofthisPresentation

Page 3: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Abstract

ThissessionwillreviewtheCAWorkloadAutomationESPEdition(CAWLAESP)

EventlevelWobtrig commandthatwasintroducedinCAWLAESP11.3.Itisused

totriggeraneventbaseduponadistributedfilebeingcreated.Alsointhissession,

youwilllearnabout

– ApplicationlevelFileTriggerworkloadobjectalongwithallofitscapabilities– Bestpracticesastowhichmethodwouldbethemostappropriatetousefor

yourparticularcircumstance– RecommendationsonparameterstouselikeMAILBOXtoprovidea

notificationonEventexceptionconditionslike“ScanFailed”.

JohnP.RooneyCATechnologiesSr.PrincipalConsultant

Page 4: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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

Page 5: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Wobtrigs/File_Triggers – Thebasics

Page 6: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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')

Page 7: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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.

Page 8: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Wobtrigs:(cont ‘d)§ Suspendingorholdinganeventdoesnotstopthefiletrigger.

– Iftheeventissuspended,anytriggersthatcomeinwillbediscarded.– Iftheeventisheld,anyfiletriggersthatcomeinwillbeheldbasedonthe

OVERDUEcountspecifiedintheevent’sSCHEDULEstatement.

§ Defininganeventthatwaitsformultiplefilesbeforetriggeringusingthe“MULTIPLE”keywordmaygiveyouanunexpectedoutcome…

Page 9: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

File_Triggers inanapplication– Example

FILE_TRIGGERFILE.001RUNDAILYAGENTAGENTU_01

FILENAME'/opt/data/*.tmp'CREATECONTINUOUSALERT(FTG1)ENDJOB

Page 10: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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.

Page 11: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

UsingVariables§ ESPWTAGENT– Containsthenameoftheagentthatthefiletriggerwasdetected

on.UsingContinuous.Itmaybebesttotriggerthisdailyandhaveitcompletejustbeforethenextdaytriggers.

§ ESPWTFILE– Containsthenameofthefilethatfiletriggerwassatisfiedfor.

§ File_Triggers using“continuous”canuse“MonitorVariables”.ThesecontaininformationlikejobnameForthesimplecasewhereafilearrivesasmallnumberoftimesperday,atsettimes,thisisthebestmethod.

Page 12: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Monitoringandresolvingerrors

Page 13: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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.

Page 14: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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

Page 15: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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

Page 16: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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.

Page 17: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Misc.- Remotefilesystems,HAScenariosandotherfunthings

Page 18: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

RemotefilesystemsManytimesthefileisn’tlocalontheserver.

– ThepathisaUNCpathlike\\location1\path1\path2\filename.abc

§ TheagentrunningasLocalSystemaccountorroothasfullauthoritytoeverythingontheserverbutitdoesn’thaveaccesstoanythingoutsidethebox

§ ItisnotpossibletograntLocalSystemaccountaccesstoanythingoutsidethebox.

§ RunningthejobasaUSERdoesnotgranttheauthoritytoaccessthefileshare.

Page 19: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Remotefilesystems:(cont’d)§ 2Options§ Runningtheagentasauser–

– GototheagentService>>RightclickonProperties>>LogOntab.Changetheusertoaserviceaccountwithauthoritytothefileshare.

§ Itispossibletomakethelocationlooklocal.– Mountingthedrive.– Mappingthedrive.MakingtheMappingpersistentisthekey.– “AddaNetworkLocation”

Page 20: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

AgentsthataresetupwithHighAvailability(HA)

Whentwoagentsaresetuptofailbackandforthusinganaliasandtheyarewatchingaremotefilesystemforanupdate:§ Useapplicationlevelnon-continuousfilemonitoring.§ ApplicationlevelFile_Triggers canonlyseetheupdateonetimeforthatapplication.

generation.BothagentswillsendbacktothemasterthattheybothsawtheFile_Trigger conditionmetbuttheywillbothcompletethesamewob inthecorrectapplication.gen.

§ Eventlevelfiletriggerscanbepassedouttobothagents.Whenthefilecomesinbothwillsendanupdatetothemasterandtwotriggerswillhappen.– Maynotseethebadbehavioruntilafterafailoverhappens.

Page 21: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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

Page 22: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WobtrigsVSFile_Triggers

Page 23: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Wobdef vsFiletriggerinapplEventWobdef Appl definitionWobtrigs areinvisibletotheMonitoringstaff

Itistreated asanyotherjobbyMonitoringteam.

Unable toknowiffiledoesnotarriveontime.

Abletosetlatetimes iffilehasnotarrivedbyaspecifictime.

Canwatchforupdateorcreateusing“CREATE”

“CREATE”willfailiffiledoesnotexistwhenjobruns

Canwatchforupdateorcreateusing“CREATE”

Need tousecontinuouskeywordbutneedsanalertandseparateevent

Page 24: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Wobdef vsFile_Trigger intheappl

EventWobdef Appl definitionIftherearetwonodesthataresetupinafailoverscenarioandtheagent(s)aremonitoringasinglefileshareitispossible

Waitingformultiplefilescancauseproblemsifonlyonefilearrives.

Usemultiplejobsformultiplefiles.

Page 25: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

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

Page 26: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

MustSeeDemos

CAWLAAE&DEMFandWorkloadAutomation

SeamlessApplicationAutomationAgents&AdvancedIntegrationsMFandWorkloadAutomation

CAConversionService

CAWorkloadAutomationMFandWorkloadAutomation

Innovations:Mainframe:WorkloadAutomationCAWLACA7&ESPMFandWorkloadAutomation

Innovations:CrossEnterpriseWorkloadAutomation

Page 27: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Questions?

Page 28: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.28 @CAWORLD#CAWORLD

MainframeandWorkloadAutomation

FormoreinformationonMainframeandWorkloadAutomation,pleasevisit:http://cainc.to/9GQ2JI

Page 29: Pre-Con Ed: Wobtrigs and File triggers with CA Workload Automation ESP Edition

29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Thankyou.

Stayconnectedatcommunities.ca.com