application tuning for ca datacom environments part ii

Post on 09-Jan-2017

22 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

World®’16

ApplicationTuningforCADatacomenvironments– PartIIKevinShuma,VPProductManagementCATechnologies

MFX67EB

MAINFRAMEANDWORKLOADAUTOMATION

2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Abstract

ThisisatwopartsessionthatdescribesthevarioustechniquesusedtotuneaCADatacomapplicationforthebestpossibleperformance.Includedwillbediscussionsonavailablemonitoringtools.

ThissessionisprimarilyfocusedontheapplicationdeveloperwhoiswritingapplicationsfortheCADatacom®/DBdatabase.

KevinShuma

CATechnologiesVP,ProductManagement

3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Agenda

APPLICATIONTUNINGWITHINTHEAPPLICATION

WHATISTHEURTANDHOWDOESITAFFECTTHEAPPLICATION

GENERALPROGRAMMINGRECOMMENDATIONS

IDEALPROGRAMMINGRECOMMENDATIONS

AVAILABLETUNINGTOOLSANDRESOURCES

SUMMARY

1

2

3

4

5

6

4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApplicationTuningwithintheapplication

§ Someapplicationissuesneedtoberesolvedwithintheapplication

§ Inothercases,newordifferentprogrammingtechniquescanbeusedtoimprovetheapplicationsperformance

§ Thissessionwilladdresswaystoimproveapplicationprocessingwithintheapplicationprogram

Bestpracticesthatcanbeapplied

5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatistheURTandhowdoesitaffecttheapplication

6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

WhatisaURT?

§ Muchmorethanjustalistoftablesaccessedbytheprogram– Interfacecode(batchnon-Ideal)– Processingoptions– TableslistandSequentialReadAheadoptions– GBMAXR/GETBLK/SEQBUFS– GSETL/GETITinvokedautomaticallybyCAIdealFORconstructsunder

therightcircumstances– NotinvokedautomaticallyforCAMetaCOBOL+

Two-partwebcastisavailableonthesubjectofURTs

7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SequentialReadAheadSimplifiedview

HalfofSEQBUFSbuffers(1-16)filledNOW

SecondhalfofSEQBUFSbuffers(17-32)filledwhilefirsthalfarebeingprocessed

ApplicationRegion MUFRegion

GSETL/GETIT SEQBUFS=32

GETBLK=61440GBMAXR=255

BlockofrowsreturnedsubjecttoGBMAXRlimit(255is“unlimited”)

8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SequentialReadAhead(cont’d)

§ Pros– Significantlyfasterbatchsequentialprocessing– ReducedelapsedtimeduetoMUFread-ahead– ReducednumberofMUFtoapplicationcommunications

§ EspeciallyimportantwhenusingXCF– PossiblereducedIOsduetoveryfastbufferre-use

Simplifiedview

9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SequentialReadAhead(cont’d)

§ Cons– Significantpossibilityforapplicationprogramtomisusethe

functionality§ Gettinglotsofdatarowsthatareneveractuallyreadintheprogram§ Typicalwhennotreadingthekeyrangefrombeginningtoend§ Fornon-Ideal,besuretospecifythekeyrangeendvalue

– Gettinglotsofdatarowsandholdingthemunderexclusivecontrol§ IfURThasUPDATE=YESallrowspassedinBlockGETxxbufferarelocked§ CanbeminimizedbyusingsmallerGBMAXRand/orGETBLK(e.g.GBMAXR=10)

Simplifiedview

10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

URTPriority

§ MUFBREAKparameterwillinfluenceeffectiveness– BREAK500suitableatmostsites

§ WhattospecifyforPRTY=inURTs:– HotCICSAORsandHotTrustedServer:12– NormalCICSAORsandTrustedServer:10– Hotbatch(Time-sensitiveorCriticalPath):8or9– Normalbatch:7(CADefault)– DataqueryCICSAORsandAd-hocServer:5– Dataquerybatch,DBSQLPRandDataReporter:3

Doesitstillreallymatter?InabusyMUF,Yes!

11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Generalprogrammingrecommendations

12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

GeneralProgrammingRecommendations

§ Record-at-a-Time(RAAT)

§ Set-at-a-Time(SAATor“CBS”)

§ SQL

§ Canmixandmatchallthreeaccessmethodswithinasingleprogram

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Record-at-a-Time(RAAT)

§ MostcommonlyusedAPIforlegacyapplications– NotavailabledirectlytoprogrammersinCAIdeal– UsedbyCAMetaCOBOL+LOCATE/READstatements– SimilartoVSAMprogrammingAPI

§ Allprocessingselectionspredetermined(table,keys,elements)– Changestokeysorelementsrequireprogramchanges

§ Veryfastfordirectrandomkeyedaccess(LOCxx/REDxx)– Buteachrowisreturnedindividually– communicationsoverhead

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Record-at-a-Time(RAAT)(cont’d)

§ Sequentialreadahead(GSETx/GETxx)– Batchonly– Veryfastiftrawlingthroughlargekeyranges– TuneGBMAXR/GETBLK/SEQBUFSinURT– “New”feature(r12)tospecifyend-of-key-rangeonGSETL

§ Oftenrowsarereturnedthatarelaterrejectedbytheapplicationinnon-zIIPprocessing

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Set-at-a-Time(SAATor“CBS”)

§ APIbuiltforusewith4GLapplications– SimilartoSQLprogrammingAPI(withoutjoins)– CAIdealandCAMetaCOBOL+“FOR”constructs

§ CallDBNTRY….SELFR/SELNR/SELSM/SELPR

§ Dataviewscanonlyreferenceaverticalsubsetofasingletable

§ Canselectonnon-keycolumns,andorderrows– Reducingcommunicationsoverheadandperformingthe“sorting”onzIIP– ReviewoldprogramswithIFtestsandinternalsorts

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Set-at-a-Time(SAATor“CBS”)(cont’d)

§ CAMetaCOBOL+doesNOTconvertSRAcandidatestoGSETL/GETIT

§ CAMetaCOBOL+(orCALL)doesallowSKIPprocessingwithintheset– Changedirectionorjumptotop/bottomofset,orrelativeposition– Greatforsimple(single-table)scrollingapplications

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Set-at-a-Time(SAATor“CBS”)(cont’d)

§ TuneusingCBStrace– “$$$”inchars1-3ofUIB

§ Manualjoins(nestedFOR)oftenmeansrowsarereturnedthatarelaterrejectedbytheapplicationinnon-zIIPprocessing

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Set-at-a-Time(SAATor“CBS”)(cont’d)

§ Thetemporaryindex– CBSexaminestherequestmadeanddetermineshowtoaccessthedata– Atemporaryindexisbuiltif

§ Mixedascending/descendingORDERBY§ ORDER/GROUPBYanon-keyfield§ Signednon-positivenumericfieldspossibleinkey§ CBSchoseabetterkeytosatisfytheWHEREclause

– SometimesatemporaryindexisNOTabadthing.§ Unnecessaryonesshouldbeeliminated

OneDBMS,threeAPIsavailableto3GLs(COBOL,PL/I,etc.)

19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CBS- BuildingatemporaryindexMixedORDERBYwithbothascendinganddescending

FOR FIRST PRICE-LIST-R001 WHERE EFCTV-DATE = W.EFCTV-DATE

AND FGI-ID = W.FGI-ID AND PRICE-CLS-ID = W.PRICE-CLS-ID AND ALWN-BRCKT-CDE GT $SPACES

ORDERED BY EFCTV-DATE FGI-ID PRICE-CLS-IDDESCENDING ALWN-BRCKT-CDE

FOR FIRST PRICE-LIST-R001 WHERE EFCTV-DATE = W.EFCTV-DATE

AND FGI-ID = W.FGI-ID AND PRICE-CLS-ID = W.PRICE-CLS-ID AND ALWN-BRCKT-CDE GT $SPACES

ORDERED BY DESCENDING EFCTV-DATE FGI-ID PRICE-CLS-IDALWN-BRCKT-CDE

Before After

Allthe“ascending”columnsintheORDERBYarespecifiedasequalitiesintheWHEREclause,sotheORDERBYcanbechangedwithoutimpactingtheprogram

20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CBS- Buildingatemporaryindex(cont’d)

§ SQLCREATETABLEstatementsalwaysdefinenumericcolumnsassigned– DBAcanchangetounsignedafterwards

§ Ifthecolumnonlyevercontainspositivevalues– DBAshouldsetTYPE-NUMERIC=Pattribute

§ Ifthecolumndoescontainnegativevalues– DBAshouldsetDATA-SENSITIVEattribute

Signednumericcolumnsinkey

21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CBS- DeterminingthebestkeytouseforCBS

§ CBSdynamicallychoosesthebestkeytousebasedoninformationinthewhereandorderbyclauses

§ Becarefulwhentryingtosecond-guessCBS– RunaCBStracetocheckthatyourassumptionwascorrect– Withtwosimilarcandidatekeys,StatisticalPopulationCountingcan

changethekeyselectionatruntime

§ Inthefollowingexample– TheORDERBYmatchesthenativekey– ButabetterkeymatchestheWHEREclause

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CBS- DeterminingthebestkeytouseforCBS(cont’d)Orderbydeterminesthekey– butisnotthebestchoice

FOR FIRST SALES-EST-PD WHERE MARKET-CODE EQ W.MARKET-CODE

AND SOURCE-CODE EQ $SPACES AND CURRENT-WEEK EQ W-WEEK AND CPCK-ITEM-CODE EQ $SPACES AND SETUP-WEEK-10 GE SETUP-DATE

ORDERED BY MARKET-CODE SOURCE-CODE

CURRENT-WEEK SETUP-WEEK-10

FOR FIRST SALES-EST-PD WHERE MARKET-CODE EQ W.MARKET-CODE

AND SOURCE-CODE EQ $SPACES AND CURRENT-WEEK EQ W-WEEK AND CPCK-ITEM-CODE EQ $SPACES AND SETUP-WEEK-10 GE SETUP-DATE

ORDERED BY MARKET-CODECURRENT-WEEK

SOURCE-CODE :MovedCPCK-ITEM-CODE :InsertedSETUP-WEEK-10

Before After

StatisticalPopulationCountingandaTemporaryIndex Nowadirectselection

23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CBS- MoreWHEREclausetips

§ AvoidNOToperator,iffeasible– WHEREACTIVE=“Y”…ratherthan…– WHEREACTIVE<>“N”

§ Specifyanalternativeto“OR”-ingvaluesforafield- usearange,iffeasible– WHEREQTY=3OR4OR5…becomes…– WHEREQTY>=3ANDQTY<=5– ConverttoIFstatementONLYinspecialcircumstances

24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SQL

§ Agile/DevOps- Quicktodevelop/maintain

§ Alljoins/aggregation/formattingdoneinMUF– AvailableforzIIPprocessing– Keepstheapplicationsmall/simple/efficient

§ Minimizescommunicationsoverhead– SQLpre-fetchworksforCICSrequeststoo

§ Ifthereissyntax/functionalityyouneed…– Submityourenhancement“Ideas”

Industrystandardsyntax

25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SQL(cont’d)

§ SQLConstraintscanbeusedtoimplementbusinessrules– RunsinMUF(onzIIP)– Reducesneedforprogram“checks”

§ Don’tallowadeleteofacustomerthatstillhasanorder§ Onlyallowtype“A,B,C”§ UtilizeCASCADEtotriggerfulldeletes

§ SQLCACHEcanbeimplementedtoimproverepeateddynamicqueries

Industrystandardsyntax

26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SQLtuningtips

§ INvs.OR– WHERECAT_TYPEIN(’05’,’07’)– WHERECAT_TYPE=’05’ORCAT_TYPE=’07’– UsuallyORisbetter

§ ORvs.BETWEEN– WHERECAT_TYPEIN(’05’,’06’,’07’)– WHERECAT_TYPE=’05’ORCAT_TYPE=’06’ORCAT_TYPE=’07’– WHERECAT_TYPEBETWEEN’05’AND‘07’– UsuallyBETWEENisbetter

Simplewhereclausepredicatetips

27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SQLtuningtips(cont’d)

§ IndexcardinalitystatsandRowCounts– RETIXDBID=100,KEYNAME=*SETR– REPORTAREA=IXX,DBID=100,TYPE=G,UPDATE=YES– Don'tforgetUATenvironments– EspeciallyifrefreshedusingDASDutilities

§ SYSMSGenhancements– Mucheasiertounderstand– Predicatemessagesnolonger“lost”inPXX– SELECT*FROMSYSADM.SYSMSGWHEREPLANNAME='KEVIN';

SQLqueryoptimizationhousekeeping

28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

COBOLtuningtips

§ COBOLSTRING/UNSTRINGwithpointerisveryefficient

§ Cachingusinginternalarrays– Goodorbad?– Directaccesscanbegood– SearchingisCPU-intensive

§ OrdertheEVALUATEpredicatesbymost-used->Least-used

SQLqueryoptimizationhousekeeping

29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

COBOLtuningtips(cont’d)

§ CBLOPTIMIZE– Dualcompile?

§ EnterpriseCOBOL5.xandbeyond- thebiggeststepchangesinceCOBOLII– Architectureexploitation(ARCH)– Choosethehighestlevelsupportedbyyourhardware– IncludingyourDRsite

SQLqueryoptimizationhousekeeping

30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogrammingrecommendations

31 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $SUBSTR

§ $SUBSTRisoneofthemostCPU-intensivefunctionsofCAIdeal– Nevercodea$SUBSTRwithfixedvaluesforbothSTART=andLEN=– Breakthetargetfieldintoagroupfieldandreferencethedatadirectly

asasimplefield

§ Don’trepeatthesame$SUBSTRfunctionunnecessarily– SETtheresultintoasimplefieldandthenreferencethatfieldin

subsequentstatements

Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

32 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $SUBSTR(cont’d)Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

Level Field Name T I Ch/Dg ----- ------------------- - - -----1 SRA-DATA X 80

SELECT FIRST ACTION WHEN $SUBSTR(SRA-DATA,START=70,LENGTH=3) = 'ELM'

SET ELM = TRUE WHEN $SUBSTR(SRA-DATA,START=70,LENGTH=3) = 'DVW'

SET DVW = TRUE WHEN $SUBSTR(SRA-DATA,START=70,LENGTH=3) = 'PGM'

SET PGM = TRUE ENDSEL

Level Field Name T I Ch/Dg ----- ------------------- - - -----1 SRA-DATA 2 FILLER-1 X 692 SRA-ENT-TYP X 32 FILLER-2 X 8

SELECT FIRST ACTION WHEN SRA-ENT-TYP = 'ELM'

SET ELM = TRUE WHEN SRA-ENT-TYP = 'DVW'

SET DVW = TRUE WHEN SRA-ENT-TYP = 'PGM'

SET PGM = TRUE ENDSEL

Before After

33 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $STRING

§ $STRINGisoneofthemostCPU-intensivefunctionsofCAIdeal– Dataiscopiedtoatemporaryworkarea,appendedandthencopiedto

thetargetarea– Whereappropriate,usethenewIdeal15.0DOCUMENTfeaturewith

variable-lengthfieldstoaccomplishthetask

§ Don’trepeatthesame$STRINGfunctionunnecessarily– Settheresultintoasimplefieldandthenreferencethatfieldin

subsequentstatements

Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

34 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $STRING(cont’d)Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

SET W.DUPLICATE = FALSE LOOP VARYING W.SUB2 FROM 1 BY 1 UNTIL W.DUPLICATE

OR W.SUB2 = 640 IF DUP-PGM-DVW(W.SUB2) =

$STRING(RPT.PROGRAM,RPT.STATUS,RPT.DATAVIEW)

SET W.DUPLICATE = TRUE ENDIF

ENDLOOP

Before

35 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $STRING

§ Whileweareherewhatelsecanweimprove?– Avoidloopingthroughthewholearray

§ Inthiscase,all640entriesaresearchediftheincomingitemisNOTaduplicate

§ Storethe“maximumentry#”valuewhenthearrayisbuiltandusethatvaluetoterminatetheloop

– Avoidre-testingthe“terminator”valueoneachiterationoftheloop

Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

36 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $STRING(cont’d)Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

SET W.DUPLICATE = FALSE LOOP VARYING W.SUB2 FROM 1 BY 1 UNTIL W.DUPLICATE

OR W.SUB2 = 640 IF DUP-PGM-DVW(W.SUB2) =

$STRING(RPT.PROGRAM,RPT.STATUS,RPT.DATAVIEW)

SET W.DUPLICATE = TRUE ENDIF

ENDLOOP

BeforeSET W.DUPLICATE = FALSE SET NEW-PGM-DVW = $STRING(RPT.PROGRAM,

RPT.STATUS,RPT.DATAVIEW)<<SEARCH-PGM-DVW>>LOOP VARYING W.SUB2 FROM 1 BY 1 UP THRU W.DVW-MAX

IF DUP-PGM-DVW(W.SUB2) = NEW-PGM-DVW SET W.DUPLICATE = TRUE QUIT SEARCH-PGM-DVW

ENDIFENDLOOP

After

37 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $STRING(cont’d)Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

SET W.DUPLICATE = FALSE LOOP VARYING W.SUB2 FROM 1 BY 1 UNTIL W.DUPLICATE

OR W.SUB2 = 640 IF DUP-PGM-DVW(W.SUB2) =

$STRING(RPT.PROGRAM,RPT.STATUS,RPT.DATAVIEW)

SET W.DUPLICATE = TRUE ENDIF

ENDLOOP

BeforeSET W.DUPLICATE = FALSE SET NEW-PGM-DVW = $STRING(RPT.PROGRAM,

RPT.STATUS,RPT.DATAVIEW)<<SEARCH-PGM-DVW>>LOOP VARYING W.SUB2 FROM 1 BY 1 UP THRU W.DVW-MAX

IF DUP-PGM-DVW(W.SUB2) = NEW-PGM-DVW SET W.DUPLICATE = TRUE QUIT SEARCH-PGM-DVW

ENDIFENDLOOP

After

SET NEW-PGM-DVW = $STRING(RPT.PROGRAM,RPT.STATUS,RPT.DATAVIEW)

LOOP VARYING W.SUB2 FROM 1 BY 1 UP THRU W.DVW-MAX

UNTIL DUP-PGM-DVW(W.SUB2) = NEW-PGM-DVWENDLOOP IF W.SUB2 > W.SUB

SET W.DUPLICATE = FALSE ELSE

SET W.DUPLICATE = TRUE ENDIF

After

IfyoureallyhateQUIT

38 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas– Internalsorting

§ AVOIDunnecessaryinternalsorts– UseSQLtojoin/aggregate/sortdataintorequiredsequence

§ MoveworktoMUFwherezIIPCPUcanbeused– UsethesortedreportfacilityofCAIdealinstead,ifappropriate– Ifinternalsortistheonlyoption,avoidrepeatedlycalculatingtheindex

subscript§ Calculatethe“subscript– 1”onceandusethatinallsubsequentstatements§ Usegroupfieldtomovewholearray“row”atonce

Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

39 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Ifinternalsortistheonlyoption,avoidrepeatedlycalculatingtheindexsubscript

LOOP VARYING W.SUB FROM W.ENTRIES BY -1 DOWN THRU 1IF W.CURR-KEY < W.PREV-KEY

SET WT.PROD-CD = W.PROD-CD(W.SUB) SET WT.CUST-CD = W.CUST-CD(W.SUB) SET WT.EFCT-DT = W.EFCT-DT(W.SUB) SET WT.TERM-DT = W.TERM-DT(W.SUB) SET W.PROD-CD(W.SUB) = W.PROD-CD(W.SUB - 1) SET W.CUST-CD(W.SUB) = W.CUST-CD(W.SUB - 1) SET W.EFCT-DT(W.SUB) = W.EFCT-DT(W.SUB - 1) SET W.TERM-DT(W.SUB) = W.TERM-DT(W.SUB - 1) SET W.PROD-CD(W.SUB - 1) = WT.PROD-CD SET W.CUST-CD(W.SUB - 1) = WT.CUST-CDSET W.EFCT-DT(W.SUB - 1) = WT.EFCT-DTSET W.TERM-DT(W.SUB - 1) = WT.EFCT-DT

ENDIFENDLOOP

BeforeLOOP VARYING W.SUB

FROM W.ENTRIES BY -1 DOWN THRU 1IF W.CURR-KEY < W.PREV-KEY

SET W.SUB2 = W.SUB - 1 SET WT.ARRAY-ROW =

W.ARRAY-ROW(W.SUB) BY POSITIONSET W.ARRAY-ROW(W.SUB) =

W.ARRAY-ROW(W.SUB2) BY POSITIONSET W.ARRAY-ROW(W.SUB2) =

WT.ARRAY-ROW BY POSITIONENDIF

ENDLOOP

After

40 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $TRIM

§ $TRIMisoneofthemostCPU-intensivefunctionsofCAIdeal– Whenbuildingoutputtextstrings

§ Avoidrepeatedlytrimmingtrailingblanksandsoonfromthesameinputstrings

– Ifrepeatedlyreferencingfixed-lengthinput§ Converttovariable-lengthworkingdatafieldwith$TRIMjustonceandreferencethat

Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

41 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Idealprogramminggotchas- $TRIM(cont’d)

§ Appendingdatatoanoutput“message”string– Defineoutputmessagestringasvariable-lengthworkingdatafield;no

needfor$TRIM– UsetheCAIdeal15.0DOCUMENTfeature

§ Particularlyrelevanttothesetypesofapplications– InterfacingwithIBMMQ-Series– Ideal/webinterfaceoutputdocuments

Idealisapowerfullanguagebutsomeprocessescanbeexpensivetouse

42 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Re-InitializingArrays

§ Inbatch,storageischeap,CPUisexpensive– Ifanarrayhastobeclearedmanytimesduringexecutionofaprogram

§ Keepanemptycopyofthearrayinworkingdata§ UseSETreal-array=empty-arrayBYPOSITION

§ InCICS,storageisnotsocheap,sothismethodmaynotbeappropriateforlargearrays

43 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CallingNon-IdealSubprograms

§ IfusinganyLanguageEnvironment(LE)-enabledlanguage– MakesureyouareusingtheCEEUOPTRTEREUS=ONoption

§ EnsuresthatLEruntimeenvironmentisonlyestablishedonce§ Workingdataandsoonispreservedbetweencallsofthesubprogram§ Significantperformanceimprovementswheresubprogramiscalledrepeatedly

44 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

InsertorupdateexistingrowDeterminewhichtousebasedonlikelihoodthatrowalreadyexists

FOR FIRST dataviewnameWHERE...

update valuesWHEN NONE

FOR NEW dataviewnameinsert values

WHEN DUPLICATEhandle “unique” failures

ENDFORENDFOR

FOR NEW dataviewnameinsert values

WHEN DUPLICATEFOR FIRST dataviewnameWHERE...

update valuesENDFOR

ENDFOR

Rowisusuallypresent RowisusuallyNOTpresent

45 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Dataviewsandelements

§ Dataviewsareacollectionofelements– Elementsaretheunitoftransfer

§ Definedasasinglefield– costsvsbenefits– nowonzIIP– Isolationfromothertablechanges– Agile/DevOps– SQLeffectivelydoesthis

§ Definedasthewholerow– Usewherethewholerowis/willbeALWAYSrequired

§ Definedasallthecolumnsinakey– Index-onlyprocessing.

ElementsareaDatacom-onlyconcept

46 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

AvailableTuningtoolsandresources

47 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Built-intuningtools

§ PXXJobstatistics– ShowsnumberofDatabaserequestsandI/O’s

§ RXXreports(andREADRXX)– Usefultotrackmaintenanceactivityandtimes

§ DatacomAccounting– Canbeverylowoverheadifdefinedcorrectly– Canbeextremelydetailedforusewhenrequired

§ DynamicSystemTables

IncludedwiththeDatacomenvironment

48 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Built-intuningtools(cont’d)

§ AUTOINFO/AUTOSTATUS/AUTOCOLLECT– Usefulinspottingtrendsandcontentions

§ MUF– EOJSYSPRINT– JESLOG

§ CBSDiagnostictrace

§ SQLplanmessageoptions(ortraces)

IncludedwiththeDatacomenvironment

49 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Built-intuningtools(cont’d)

§ CICSDEBUGFacility

§ CAIdealDEBUGfacility– Yesitrunsinbatch,andinruntime-onlyenvironments

§ IBMDebugTool– Basicbutcanbeveryuseful

IncludedwiththeDatacomenvironment

50 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CAApplicationTuningtools

§ CAIntertest– Functionallyrich– CodeCountingfeaturetoidentifyheavilyusedstatements

§ CASysview– Excellentforanalysisofcurrentactivity– CICSTransactionLogprovideshistoricalanalysis

§ MakesureSysview’sDCCTXPRhasbeenimplemented

AvailableforusewiththeDatacomenvironment

51 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

CAApplicationTuningtools(cont’d)

§ CAMainframeApplicationTuner(MAT)– MajornewtoolforCAIdealandCOBOLandothers– Virtuallynooverheadandnorecompilesrequired

§ IrecommendyouattendthevarioussessionsontheseproductswhileyouareatCAWorld

§ ComeseeusattheDatacomdemostation

AvailableforusewiththeDatacomenvironment

52 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Externalresources

§ CADREonCACommunitiescommunities.ca.com/community/ca-datacom-cadre– Thereisnosuchthingasa“stupidquestion”– Askquestionsandshareyourexperienceswithdevelopersacrossthe

globe– Submityour“Ideas”forproductenhancements– Specificenhancementrequestsarewelcome– Non-specific“Iwishsomehow..”requestsarejustaswelcome

AvailabletoCADatacomusers

53 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Externalresources(cont’d)

§ CASupport– support.ca.com/irj/portal/anonymous/newhome– ThefriendlyCAsupportstaffhavedecadesofexperienceandare

alwayshappytohelp

AvailabletoCADatacomusers

54 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

OurresultswhenapplyingapplicationtuningWehavemoreDatacomtablesthaneverbefore.Wehavemorerowsinthosetablesthaneverbefore.Wehavemoreapplicationsprocessingthedatathaneverbefore.Wehavefasterresponsetimes(batch,ServerandCICS)thaneverbefore.

Wehave30%lessCPU(MSUs)thanatthestartofthetuningexercise.ThemainframeisnolongerthehighestTCOserver.

SummaryCommentsfromthemanagingDBAforthetwositesprofiledinPartI

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

MainframeandWorkloadAutomation

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

56 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

RecommendedSessionsSESSION# TITLE DATE/TIME

MFX92S StrategyandVisionforCADatacomandCAIdeal 11/16/2016at12:45pm

MFX93S What’snewinCADatacom 11/16/2016at1:45pm

MFX94S ReducingTCOwithDatacomCompression(Presspack) 11/16/2016at3:00pm

MFX95SA ModernizingtheCADatacomdata – SQLAccessPartI 11/16/2016at3:45pm

MFX95SB ModernizingtheCADatacomdata – SQLAccessPartII 11/16/2016at4:30pm

MFX96S CADatacom/ADInstallation/UpgradeandMaintenance 11/17/2016at12:45pm

MFX97S CADatacom/ADReportUtilization,andinformationgatherforSupport 11/17/2016at1:45pm

MFX98SUsingSysview tomonitorandmeasureyourCADatacomenvironment– ADandDB

11/17/2016at3:00pm

MFX99S BirdsofaFeather/StumptheTechie! 11/17/2016at3:45pm

57 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Questions?

58 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Thankyou.

Stayconnectedatcommunities.ca.com

59 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.

Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.

ForInformationalPurposesOnlyTermsofthisPresentation

top related