pre-con ed: ca workload automation esp edition: hints, tips and tricks
TRANSCRIPT
World®’16
CAWorkloadAutomationESPEditionHints,TipsandTricksSteveWotton,CATechnologies,Sr.PrincipalConsultant
MFX25E
MAINFRAMEANDWORKLOADAUTOMATION
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
Inthissessionyouwilllearnaboutwaystoreducemanualinterventionandstreamlineyourbatchworkflows.
Byleveragingavarietyoffeatures,functionsandtechniques,youcanoptimizeyourCAWorkloadAutomationESPEdition(CAWAESP)ProceduresandCAWAESPApplicationstosimplifyandautomateyourcomplexschedulingrequirements.
SteveWotton
CATechnologiesSr.PrincipalConsultant
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
SCHEDULECRITERIA
DUEOUTPROCESSING
TEMPLATES
CONFIGURATIONOPTIONS
1
2
3
4
ScheduleCriteria
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteria
§ CAWAESPEditionenablesyoutousefreeformat,everydayEnglish,tospecifyschedulecriteriawhenschedulingEvents,jobsandothertasks
§ CAWAESPEditionhasabuilt-inunderstandingofgeneralschedulingtermsandyoucanaddyourownuniqueschedulingtermstoacalendartoincludeholidaysandspecialprocessingdays/periods
Overview
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteriaOverview
§ Youcanspecifyschedulecriteriauptotheyear2042whichisalimitationintherepresentationoftimeonIBMz/OSsystems– Timeinz/OSisrepresentedbya64-bitintegerwiththenumberof
microsecondssinceJan1,1900,whichwillrolloveronSept17,2042– IBMhasdefineda128-bittimeformatavailableonnewerhardware,
butmanyapplicationsandsoftwarecontinuetorelyonthe64-bitformat
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteriaOverview
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteriaExample
§ Run9thdayofmonth,onlyifthe9th isaSunday,elserunonthefirstSundayafterthe9th day
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteriaExample
§ RuneveryFridayexceptthefirstandlastFridayofthemonth
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteriaExample
§ Run31st dayofmonthbutonlyinmonthsthatactuallyhave31days
Hmmm……
Hmmm……
JOBPAY001IFESPSDD=“31”THENRUNTODAY
ENDJOB
Check“ScheduledDate”variabletodetermineifthescheduleddayisthe31st beforeselectingjob
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScheduleCriteriaExample
§ Run1stMondayofmonth…butifthemonthstartsonaSaturdayorSunday,runon2nd Mondayofthemonthinstead
JOBSOMEJOBGENTIMEFST1STDAYOFMONTHSTARTINGTODAYIFFSTDAY=‘SATURDAY’ORFSTDAY=‘SUNDAY’THEN-RUN2NDMONDAYOFMONTHELSERUN1STMONDAYOFMONTH
ENDJOB
UseGENTIMEtodeterminethedayoftheweekonwhichthecurrentmonthstarts,anddependingontheresult,schedulethejobtoruneitherthe1st or2nd Mondayofthemonth
Runs1st Monday
Runs2nd Monday
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
CalendarRetainCount
§ CalendarRetainCountindicateshowlongaHolidayorSpecialDayisstoredonacalendar- defaultis2daysafterthedateoccurs
§ YoumusttakeintoaccounthowlongaHolidayorSpecialdaymayneedtobereferenced,todeterminetheRetainCount
§ HolidayandSpecialDayInstancesareonlydeletedaftertheRetainCountisreachedandonceacalendarupdateismade
Overview
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
CalendarRetainCountExample
§ BLACK_FRIDAYPLUS1WEEKwillonlyresolveifBLACK_FRIDAYisretainedforatleast1weekafterthedatespecified
JOBPAY001RUNBLACK_FRIDAYPLUS1WEEK
ENDJOB
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DUEOUTProcessing
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
NOWvsREALNOW
§ Theterm“NOW”inCAWAESPreferstothescheduled timeanEventwastriggered
§ Theterm“REALNOW”inCAWAESPreferstotheactual timeanEventwastriggered
Overview
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
NOWvsREALNOW
§ Acyclicjobrunsevery1minuteuntil4pm.Ifanystepreturnsanon-zeroreturncodethejobwillstopprocessing,andoncetheerrorhasbeenresolvedthejobisrestartedandthe1-minutecyclicprocessingwillcontinue
§ ThisexampleusesNOW,REALNOWandRERUNMcommands– NOWreferstothescheduledtimeoftheEventwhileREALNOWreferstotheactual
timetheEventwastriggered– RERUNM(RerunMultiple)commandcanbeusedtorerunoneormorejobsinan
Applicationwithexecutiondependenciesresettothestatetheywereinbeforethejobsran,andthenthenrescheduledastheirdependenciesaresatisfied
Example
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
JOBCYCLICRUNDAILYCCCHKRC(1:4095)FAILSTOPRELEASE(REPEAT.CYCLE)
ENDJOB
JOBREPEAT.CYCLETASKSELFCOMPLETINGRELDELAY1ESPRERUNM APPLICATION(CYCLIC.0)ROOTJOBS(CYCLIC+)ESPAJREPEAT.CYCLEAPPLICATION(CYCLIC.0)RESETEARLYSUB('REALNOW PLUS1MINUTE')RUNDAILY
ENDJOB
JOBEND.CYCLELINKPROCESSEARLYSUB4PMESPAJALLCOMPLETEAPPL(CYCLIC.0)RUNDAILY
ENDJOB
NOWvsREALNOWExample
RerunalljobsinthisApplicationbeginning
withjobCYCLIC
ResetRELDELAYtimeto1minfromwhencommandissued
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LatePrediction
§ LatePredictionisanextensionoftheDUEOUTorLATESUBprocessingandprovidesadvancedwarningprovidedwhenaJobispredictedtobelate
§ Providesnotificationwhenajobthatwasoriginallypredictedtobelateisonceagainontime
§ SupportscrossApplicationdependenciesbypropagatinganticipatedtimesthroughExternaljobstoprovidenotification
Overview
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LatePrediction
§ LatePredictionisactivatedbyspecifyingLATEPREDInitializationParameter
– Providenotificationifajob’sDue-outtimeiswithinthenext5hoursandthejobispredicatedtogooverduebymorethan3minutes
– Notificationdoesnotoccurifoverduestatefallsoutsideoftheboundaries
LATEPREDON(5,3)
Overview
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LatePrediction
§ Providenotificationsbasedonlatepredictions
Example
JOBAHOLDRUNDAILYDURATION40RELEASEB
ENDJOB
JOBBRUNDAILYDURATION40DUEOUTEXECNOWPLUS2HOURSNOTIFYLATEPRED(1,5) USER(SWOTTON)
ENDJOB
ProvidenotificationifJobispredictedtobelateby5minsormoreandDueouttimeis
within1hour
At10:00,AETis11:20andDUEOUTis12:00STATUS:NotLate
At10:50,AETis12:10andDUEOUTis12:00STATUS:10minslatebutDon’tNotifysincemorethan1houruntilDueouttime
At11:00,AETis12:20andDUEOUTis12:00STATUS:20minslate- SendNotifysincethereis1hourorlessuntilDueouttimearrivesandjobismorethan5minslate
StartTime:10:00
Due-outTime:12:00
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Templates
23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Templates
§ ATemplateisanelementofCLANGyoucanusetospecifyrepetitivecommandsorstatementsonce
§ Parameters,positionalorkeyword,arepassedtotheTemplateandthroughaniterativeprocess,theTemplateisexpanded
TEMPLATEBILLING(1,JOBNAME)JOB%JOBNAMERUNDAILYENDJOBENDTEMPLBILLINGBILLJOB1BILLINGBILLJOB2
JOBBILLJOB1RUNDAILYENDJOBJOBBILLJOB2RUNDAILYENDJOB
Overview
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Templates
§ CreateaTemplatethatpassesparametersfortheJobnameandanysuccessor
§ AlljobshavethesameRunFrequencyandTagfield
APPLBILLINGJCLLIB'WOTST01.DEMO.CNTL'TEMPLATEBILLING(1,JOBNAME,NEXTJOB())JOB%JOBNAMERUNDAILYTAG'BILLINGJOB'IFNEXTJOBNE''THENRELEASE(%NEXTJOB)ENDJOBENDTEMPLBILLINGBILLJOB1NEXTJOB(BILLJOB2,BILLJOB3)BILLINGBILLJOB2NEXTJOB(BILLJOB4)BILLINGBILLJOB3NEXTJOB(BILLJOB4)BILLINGBILLJOB4NEXTJOB(BILLJOB5)BILLINGBILLJOB5NEXTJOB(BILLJOB6,BILLJOB7)BILLINGBILLJOB6NEXTJOB(BILLJOB8)BILLINGBILLJOB7NEXTJOB(BILLJOB8)BILLINGBILLJOB8
Example
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Templates
§ WhendownloadedviaWorkstation,aTemplatedoesnotexpandorresolvegraphicallyuntiltheCAWAESPProcedureisSimulated
Example
26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ConfigurationOptions
27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
GeneratingandProcessinganApplication
EventTriggers
ApplicationGenerationPhase
ApplicationProcessPhase
ApplicationGenerationPhase• ReadstheCAWAESPProcedure• Determineswhichjobsarescheduledtoday
alongwiththeirrequirements• Createsthejob-flow
ApplicationProcessPhase• Assesseswhetherpredecessorand
timedependencieshavebeenmet• DetermineswhetherResource
requirementshavebeenmet• Re-triggersEventtosubmitjoband
performfurtherprocessing
Overview
28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ConcurrentEventProcessing
§ EventInitiatorsenablesyoutoprovidededicatedclassesofinitiatorstospecificEventsandareoftenusedtoprioritizeandstreamcriticalEventprocessing
§ WerecommendthatyoucreatesixEventInitiators,whichenablesCAWAESPEditiontoprocesssixconcurrentrequests– Youcanaddmoreeventinitiatorstomeetyourperformance
requirementsandworkloadvolume
Overview
29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
§ UsetheEICLASSInitializationParametertocreateanEventInitiatorClassspecifyinganidentifyingclassnumberandnumberofinitiators
ConcurrentEventProcessing
• EICLASSdisplaycommandprovides:– NumberofInitiatorsforeachclass– NumberofInitiatorsactive– MaxnumberofallowedInitiators– NumberofEventsandjobseachinitiatorhasprocessedtodate
Overview
30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
§ UsetheEICLASSparameterinanEventtospecifyinwhichInitiatorClassandEventshouldprocess
ConcurrentEventProcessingExample
31 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ProcedureCaching
§ ProcedureCachingcanimproveCPUusageandprocessingspeedforCAWAESPproceduresthathaveover400jobs
§ ProcedurecachingallowsyoutokeepanoriginalcachedcopyofaCAWAESPproceduretoreduceI/Oduringprocessing
§ AcachedcopyoftheCAWAESPprocedureisstoredintheAPPLFILE
Overview
32 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
§ ToturnonprocedurecachingforallProcedures,addthefollowingInitializationParameter:– PCACHEON
§ ToturnonprocedurecachingforcertainProcedures,suchasthosecontaininglargeApplications,addthefollowingInitializationParameter:– PCACHEENABLE
§ Then,addtheCACHEoperandtotheINVOKEstatementineithertheEventorApplication
ProcedureCachingOverview
33 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ProcedureCaching
§ EachtimethePAYROLLApplicationisinvoked,theDATESprocedureisalsoinvokedcontainingsymbolicvariablesrequiredbythejobsintheApplication
§ TheDATESprocedurewillbecachedinmemorytospeedaccess
APPLPAYROLLJCLLIB'CYBER.JCL.CNTL'INVOKE'CYBER.SYMBOLS.CNTL(DATES)'CACHE
JOBPAYJOB1RUNWORKDAYS
ENDJOB
Example
34 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ResultsInthissessionwediscussedwaystoreducemanualinterventionandstreamlineyourbatchworkflowsbymakinguseofavarietyoffeatures,functionsandtechniquesrelatedto:
• Maximizingschedulecriteria
• Streamliningjobdependencies
• ProvidingproactiveDueoutnotifications
• ReducingcodethroughiterativeTemplates
• EnablingconfigurationoptionstoimproveCPUusageandminimizefilei/o
SummaryAFewWordstoReview
35 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
36 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessionsSESSION# TITLE DATE/TIME
MFX26ECAWorkloadAutomationESPEdition:SLAManagementandBusinessContinuity
11/14/2016at1:00pm
JasmineB
MFX31EBetterBigDataAnalyticswithCAWorkloadAutomationforHadoop
11/14/2016at3:00pm
JasmineB
MFX24EWobtrigs andFileTriggerswithCAWorkloadAutomationESPEdition
11/15/2016at11:00am
JasmineB
MFX33EBestPracticesforsettingupCAWorkloadAutomationESPApplicationProcedures
11/15/2016at1:00pm
JasmineB
37 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
You Are Cordially Invited……..CA Workload Automation & CA Process Automation
Where? South Seas E When? Tuesday, November 15th
Time? 4:30pm – 6:00pm
Customer & Partner Reception
38 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MustSeeDemos
ModernWorkloadAutomation
CAWLADEMFandWorkloadAutomation
SeamlessApplicationAutomationAgents&AdvancedIntegrationsMFandWorkloadAutomation
CAConversionasaService
CAWorkloadAutomationMFandWorkloadAutomation
Innovations:MainframeWorkloadAutomationCAWLACA7&ESPMFandWorkloadAutomation
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.39 @CAWORLD#CAWORLD
MainframeandWorkloadAutomation
FormoreinformationonMainframeandWorkloadAutomation,pleasevisit:http://cainc.to/9GQ2JI
40 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Thankyou
Stayconnectedatcommunities.ca.com