methodsylmfos4.0

ylmfos4.0  时间:2021-03-28  阅读:()
z/OSBasicSkillsInformationCenterOnlineWorkloadsforz/OSz/OSBasicSkillsInformationCenterOnlineWorkloadsforz/OSNoteBeforeusingthisinformationandtheproductitsupports,readtheinformationin"Notices"onpage49.
Thiseditionappliestoz/OS(productnumber5694-A01).
Weappreciateyourcommentsaboutthispublication.
Commentonspecificerrorsoromissions,accuracy,organization,subjectmatter,orcompletenessofthisbook.
Thecommentsyousendshouldpertaintoonlytheinformationinthismanualorproductandthewayinwhichtheinformationispresented.
Fortechnicalquestionsandinformationaboutproductsandprices,pleasecontactyourIBMbranchoffice,yourIBMbusinesspartner,oryourauthorizedremarketer.
WhenyousendcommentstoIBM,yougrantIBManonexclusiverighttouseordistributeyourcommentsinanywayitbelievesappropriatewithoutincurringanyobligationtoyou.
IBMoranyotherorganizationswillonlyusethepersonalinformationthatyousupplytocontactyouabouttheissuesthatyoustateonthisform.
SendyourcommentsthroughthisWebsite:http://publib.
boulder.
ibm.
com/infocenter/zoslnctr/v1r7/index.
jsptopic=/com.
ibm.
zcontact.
doc/webqs.
htmlCopyrightIBMCorporation2006,2010.
USGovernmentUsersRestrictedRights–Use,duplicationordisclosurerestrictedbyGSAADPScheduleContractwithIBMCorp.
ContentsAbstract.
vIntroductiontoonlineworkloadsforz/OSviiChapter1.
Transactionmanagementsystems.
1Transactionsystemsforthemainframe2Whataretransactionprograms3Whatisatransactionsystem3Whatarethetypicalrequirementsofatransactionsystem5Whatiscommitandrollback5IntroductiontoCICS.
7CICSinaz/OSsystem7CICSprograms,transactionsandtasks.
8UsingprogramminglanguageswithCICS.
.
.
9CICSconversationalandpseudo-conversationalprogramming9CICSprogrammingcommands11HowaCICStransactionflows12CICSservicesforapplicationprograms.
.
.
.
14CICSprogramcontrol16CICSprogrammingroadmap18CICSonlineexample18Chapter2.
Databasemanagementsystems21Whoisthedatabaseadministrator21Whatisadatabasemanagementsystem22Chapter3.
Web-basedworkloads.
.
.
25Introductiontoz/OSHTTPServer25ServingstaticWebpagesonz/OS26ServingdynamicWebpagesonz/OS.
.
.
.
26z/OSHTTPServercapabilities28IntroductiontoWebSphereApplicationServerforz/OS31J2EEapplicationmodelonz/OS33RunningWebSphereApplicationServeronz/OS33Applicationserverconfigurationonz/OS.
.
.
37WebSphereApplicationServerconnectorsforEnterpriseInformationSystems.
39IntroductiontoWebSphereMQ.
42WebSphereMQsynchronouscommunication.
.
42WebSphereMQasynchronouscommunication.
.
43WebSphereMQmessagetypes44WebSphereMQmessagequeuesandthequeuemanager44WhatisaWebSphereMQchannel46HowWebSphereMQensurestransactionalintegrity46ExampleofmessagingandqueuinginWebSphereMQ47InterfacingwithCICS,IMS,batch,orTSO/EinWebSphereMQ48Notices49Programminginterfaceinformation50Trademarks50CopyrightIBMCorp.
2006,2010iiiivOnlineWorkloadsforz/OSAbstractThisPDFcontainsthemiddlewaretopicspublishedinthez/OSBasicSkillsInformationCenterwiththefollowingexceptions.
vThe"IntroductiontoIMS"topicsappearinaretailpublicationthatwaswrittenbymembersoftheteamresponsibleforthedevelopmentanddeploymentofIMS:AnIntroductiontoIMS:YourCompleteGuidetoIBM'sInformationManagementSystem,byDeanH.
Meltz,RickLong,MarkHarrington,RobertHain,andGeoffNicholls(PearsonPublishing,ISBN0-13-185671-5).
vThe"IntroductiontoDB2"topicsareavailableinPDFformatatthisURL:http://publib.
boulder.
ibm.
com/infocenter/dzichelp/v2r2/index.
jsptopic=/com.
ibm.
db29.
doc.
intro/db2z_intro.
htmCopyrightIBMCorp.
2006,2010vviOnlineWorkloadsforz/OSIntroductiontoonlineworkloadsforz/OSInthispart,weexaminethemajorcategoriesofonlineorinteractiveworkloadsperformedonz/OS,suchastransactionprocessing,databasemanagement,andWeb-serving.
Thissectionscontainsdiscussionsofseveralpopularmiddlewareproducts,includingCICS,IMS,DB2,andWebSphere.
z/OSisabaseformanymiddlewareproductsandfunctions.
Itiscommonplacetorunavarietyofdiversemiddlewarefunctions,withmultipleinstancesofsome.
Theroutineuseofwide-rangingworkloads(mixturesofbatch,transactions,Webserving,databasequeriesandupdates,andsoon)ischaracteristicofz/OS.
Typicalz/OSmiddlewareincludes:vTransactionmanagersvDatabasesystemsvWebserversvMessagequeueingandroutingfunctions.
CopyrightIBMCorp.
2006,2010viiviiiOnlineWorkloadsforz/OSChapter1.
TransactionmanagementsystemsToexpandyourknowledgeofmainframeworkloads,youmustunderstandtheroleofmainframesintoday'sonlineworld.
Thissectionintroducesconceptsandterminologyfortransactionalprocessing,andpresentsanoverviewofthemajortypesofsystemsoftwareusedtoprocessonlineworkloadsonthemainframe.
Inthissection,wefocusontwoofthemostwidelyusedtransactionmanagementproductsforz/OS:CICSandIMS.
OnlineprocessingonthemainframeInothersections,wediscussedthepossibilitiesofbatchprocessing–butthosearenottheonlyapplicationsrunningonz/OSandthemainframe.
Onlineapplicationsalsorunonz/OS,asweshowinthissection.
Wealsodescribewhatonline,orinteractive,applicationsareanddiscusstheircommonelementsinthemainframeenvironment.
Weexaminedatabases,whichareacommonwayofstoringapplicationdata.
Databasesmakedevelopmenteasier–especiallyinthecaseofarelationaldatabasemanagementsystem(RDBMS)–byremovingtheburdenfromtheprogrammerorganizingandmanagingthedata.
Laterinthissection,wediscussseveralwidelyusedtransactionmanagementsystemsformainframe-basedenterprises.
Webeginwiththeexampleofatravelagencywitharequirementcommontomanymainframecustomers:ProvidecustomerswithmoreimmediateaccesstoservicesandexploitthebenefitsofInternet-basedcommerce.
Exampleofglobalonlineprocessing–thenewbigpictureAbigtravelagencyhasreliedonamainframe-basedbatchsystemformanyyears.
Overtheyears,theagency'scustomershaveenjoyedexcellentservice,andtheagencyhascontinuouslyimproveditssystems.
Whenthebusinesswasbegun,theirITstaffdesignedsomeapplicationstosupporttheagency'sinternalandexternalprocesses:Employeeinformation,customerinformation,contactswithcarrentalcompanies,hotelsallovertheworld,scheduledflightsofairlines,andsoon.
Atfirst,theseapplicationswereupdatedperiodicallybybatchprocessing.
Thiskindofdataisnotstatic,however,andhasbecomeincreasinglypronetofrequentchange.
Becauseprices,forexample,changefrequently,itbecamemoredifficultovertimetomaintaincurrentinformation.
Theagency'scustomerswantedtheirinformationnowandthatwasnotalwayspossiblethroughfixedintervalsofbatchupdates(considerthetimedifferencebetweenAsia,Europe,andAmerica).
Iftheseworkloadsweretobedonethroughtraditionalmainframebatchjobs,itwouldmeanacertaintimelapsebetweenthereceptionofthechangeandtheactualupdate.
Theagencyneededawaytoupdatesmallamountsofdataprovidedinbitsandpieces--byphone,fax,ore-mail–theinstantthatchangesoccur(Figure1onpage2).
CopyrightIBMCorp.
2006,20101Therefore,theagencyITstaffcreatedsomenewapplications.
Sincechangesneedtobeimmediatelyreflectedtotheapplications'send-users,thenewapplicationsaretransactionalinnature.
Theapplicationsarecalledtransactionorinteractiveapplicationsbecausechangesinthesystemdataareeffectiveimmediately.
Thetravelagencycontacteditssupplierstoseewhatcouldbedone.
Theyneededawaytoletthecomputerstalktoeachother.
Someoftheairlineswerealsoworkingonmainframes,otherswerenot,andeverybodywantedtokeeptheirownapplications.
Eventually,theyfoundasolution!
Itmadecommunicatingeasy:youcouldjustaskaquestionandsomesecondslatergettheresult–greatstuff.
Moreinnovationswererequiredbecausethecustomersalsoevolved.
Thepersonalcomputergotintotheirhomes,sotheywantedtoseetravelpossibilitiesthroughtheInternet.
Somecustomersusedtheirmobilecomputersasawirelessaccesspoint(WAP).
TransactionsystemsforthemainframeTransactionsoccurineverydaylife,forexample,whenyouexchangemoneyforgoodsandservicesordoasearchontheInternet.
Atransactionisanexchange,usuallyarequestandresponse,thatoccursasaroutineeventinrunningtheday-to-dayoperationsofanorganization.
Transactionshavethefollowingcharacteristics:vSmallamountofdataisprocessedandtransferredpertransactionvLargenumbersofusersvAreexecutedinlargenumbers.
Figure1.
Apracticalexample2OnlineWorkloadsforz/OSWhataretransactionprogramsAbusinesstransactionisaself-containedbusinessdeal.
Sometransactionsinvolveashortconversation(forexample,anaddresschange).
Othersinvolvemultipleactionsthattakeplaceoveranextendedperiod(forexample,thebookingofatrip,includingcar,hotel,andairlinetickets).
Asingletransactionmightconsistofmanyapplicationprogramsthatcarryouttheprocessingneeded.
Large-scaletransactionsystems(suchastheIBMCICSproduct)relyonthemultitaskingandmultithreadingcapabilitiesofz/OStoallowmorethanonetasktobeprocessedatthesametime,witheachtasksavingitsspecificvariabledataandkeepingtrackoftheinstructionseachuserisexecuting.
Multitaskingisessentialinanyenvironmentinwhichthousandsofuserscanbeloggedonatthesametime.
Whenamultitaskingtransactionsystemreceivesarequesttorunatransaction,itcanstartanewtaskthatisassociatedwithoneinstanceoftheexecutionofthetransaction;thatis,oneexecutionofatransaction,withaparticularsetofdata,usuallyonbehalfofaparticularuserataparticularterminal.
YoumightalsoconsideratasktobeanalogoustoaUNIXthread.
Whenthetransactioncompletes,thetaskisended.
Multithreadingallowsasinglecopyofanapplicationprogramtobeprocessedbyseveraltransactionsconcurrently.
Multithreadingrequiresthatalltransactionalapplicationprogramsbereentrant;thatis,theymustbeseriallyreusablebetweenentryandexitpoints.
Amongprogramminglanguages,reentranceisensuredbyafreshcopyofworkingstoragesectionbeingobtainedeachtimetheprogramisinvoked.
WhatisatransactionsystemTransactionsystemsmustbeabletosupportahighnumberofconcurrentusersandtransactiontypes.
Figure2onpage4showsthemaincharacteristicsofatransactionsystem.
BeforetheadventoftheInternet,atransactionsystemservedhundredsorthousandsofterminalswithdozensorhundredsoftransactionspersecond.
Thisworkloadwasratherpredictablebothintransactionrateandmixoftransactions.
Chapter1.
Transactionmanagementsystems3Transactionsystemsmustbeabletosupportahighnumberofconcurrentusersandtransactiontypes.
Oneofthemaincharacteristicsofatransactionoronlinesystemisthattheinteractionsbetweentheuserandthesystemareverybrief.
Mosttransactionsareexecutedinshorttimeperiods--onesecond,insomecases.
Theuserwillperformacompletebusinesstransactionthroughshortinteractions,withimmediateresponsetimerequiredforeachinteraction.
Thesearemission-criticalapplications;therefore,continuousavailability,highperformance,anddataprotectionandintegrityarerequired.
Onlinetransactionprocessing(OLTP)istransactionprocessingthatoccursinteractively;itrequires:vImmediateresponsetimevContinuousavailabilityofthetransactioninterfacetotheenduservSecurityvDataintegrity.
Onlinetransactionsarefamiliartomanypeople.
Someexamplesinclude:vATMtransactionssuchasdeposits,withdrawals,inquiries,andtransfersvSupermarketpaymentswithdebitorcreditcardsvBuyingmerchandiseovertheInternet.
Infact,anonlinesystemhasmanyofthecharacteristicsofanoperatingsystem:vManaginganddispatchingtasksvControllinguseraccessauthoritytosystemresourcesvManagingtheuseofmemoryvManagingandcontrollingsimultaneousaccesstodatafilesvProvidingdeviceindependence.
Figure2.
Characteristicsofatransactionsystem4OnlineWorkloadsforz/OSWhatarethetypicalrequirementsofatransactionsystemAtransactionsystemmustcomplywithatomicity,consistency,isolation,anddurability.
Inatransactionsystem,transactionsmustcomplywithfourprimaryrequirementsknownjointlybythemnemonicA-C-I-DorACID:vAtomicity.
Theprocessesperformedbythetransactionaredoneasawholeornotatall.
vConsistency.
Thetransactionmustworkonlywithconsistentinformation.
vIsolation.
Theprocessescomingfromtwoormoretransactionsmustbeisolatedfromoneanother.
vDurability.
Thechangesmadebythetransactionmustbepermanent.
Usually,transactionsareinitiatedbyanenduserwhointeractswiththetransactionsystemthroughaterminal.
Inthepast,transactionsystemssupportedonlyterminalsanddevicesconnectedthroughateleprocessingnetwork.
Today,transactionsystemscanserverequestssubmittedinanyofthefollowingways:vWebpagevRemoteworkstationprogramvApplicationinanothertransactionsystemvTriggeredautomaticallyatapredefinedtime.
WhatiscommitandrollbackIntransactionsystems,commitandrollbackreferstothesetofactionsusedtoensurethatanapplicationprogrameithermakesallchangestotheresourcesrepresentedbyasingleunitofrecovery(UR),ormakesnochangesatall.
Thetwo-phasecommitprotocolprovidescommitandrollback.
Itverifiesthateitherallchangesornochangesareappliedevenifoneoftheelements(liketheapplication,thesystem,ortheresourcemanager)fails.
Theprotocolallowsforrestartandrecoveryprocessingtotakeplaceaftersystemorsubsystemfailure.
Thetwo-phasecommitprotocolisinitiatedwhentheapplicationisreadytocommitorbackoutitschanges.
Atthispoint,thecoordinatingrecoverymanager,alsocalledthesyncpointmanager,giveseachresourcemanagerparticipatingintheunitofrecoveryanopportunitytovoteonwhetheritspartoftheURisinaconsistentstateandcanbecommitted.
IfallparticipantsvoteYES,therecoverymanagerinstructsalltheresourcemanagerstocommitthechanges.
IfanyoftheparticipantsvoteNO,therecoverymanagerinstructsthemtobackoutthechanges.
Thisprocessisusuallyrepresentedastwophases.
Inphase1,theapplicationprogramissuesthesyncpointorrollbackrequesttothesyncpointcoordinator.
ThecoordinatorissuesaPREPAREcommandtosendtheinitialsyncpointflowtoalltheURagentresourcemanagers.
InresponsetothePREPAREcommand,eachresourcemanagerinvolvedinthetransactionrepliestothesyncpointcoordinatorstatingwhetheritisreadytocommitornot.
Whenthesyncpointcoordinatorreceivesalltheresponsesbackfromallitsagents,phase2isinitiated.
Inthisphasethesyncpointcoordinatorissuesthecommitorrollbackcommandbasedonthepreviousresponses.
Ifanyoftheagentsrespondedwithanegativeresponse,thesyncpointinitiatorcausesallofthesyncpointagentstorollbacktheirchanges.
Chapter1.
Transactionmanagementsystems5Theinstantwhenthecoordinatorrecordsthefactthatitisgoingtotellalltheresourcemanagerstoeithercommitorrollbackisknownastheatomicinstant.
Regardlessofanyfailuresafterthattime,thecoordinatorassumesthatallchangeswilleitherbecommittedorrolledback.
Asyncpointcoordinatorusuallylogsthedecisionatthispoint.
Ifanyoftheparticipantsabnormallyend(orabend)aftertheatomicinstant,theabendingresourcemanagermustworkwiththesyncpointcoordinator,whenitrestarts,tocompleteanycommitsorrollbacksthatwereinprocessatthetimeoftheabend.
Onz/OS,theprimarysyncpointcoordinatoriscalledResourceRecoveryServices(RRS).
Also,theIBMtransactionmanagerproduct,CICS,includesitsownbuilt-insyncpointcoordinator.
Duringthefirstphaseoftheprotocol,theagentsdonotknowwhetherthesyncpointcoordinatorwillcommitorrollbackthechanges.
Thistimeisknownastheindoubtperiod.
TheURisdescribedashavingaparticularstatedependingonwhatstageitisatinthetwo-phasecommitprocess:vBeforeaURmakesanychangestoaresource,itisdescribedasbeingIn-reset.
vWhiletheURisrequestingchangestoresources,itisdescribedasbeingIn-flight.
vOnceacommitrequesthasbeenmade(Phase1),itisdescribedasbeingIn-prepare.
vOncethesyncpointmanagerhasmadeadecisiontocommit(phase2ofthetwo-phasecommitprocess),itisIn-commit.
vIfthesyncpointmanagerdecidestobackout,itisIn-backout.
Figure3illustratesthetwo-phasecommit.
Mostwidelyusedtransactionmanagementsystemsonz/OS,suchasCICSorIMS,supporttwo-phasecommitprotocols.
CICS,forexample,supportsfulltwo-phasecommitintransactionswithIMSandtheDB2databasemanagementsystem,andsupportstwo-phasecommitacrossdistributedCICSsystems.
TherearemanyrestrictionsimposedonapplicationdevelopersattemptingtodevelopnewapplicationsthatrequireupdatesinmanydifferentresourceFigure3.
Two-phasecommit6OnlineWorkloadsforz/OSmanagers,perhapsacrossanumberofsystems.
ManyofthesenewapplicationsusetechnologieslikeDB2storedproceduresandEnterpriseJavaBeans,anduseclientattachmentfacilitiesofCICSorIMSthatdonotsupporttwo-phasecommit.
Ifanyoftheseresourcemanagersareusedbyanapplicationtoupdateresources,itisnotpossibletohaveaglobalcoordinatorforthesyncpoint.
Thelackofaglobalsyncpointcoordinatormightinfluenceanapplicationdesignforthefollowingreasons:vTheapplicationisnotcapableofhavingcomplexanddistributedtransactionsifnotalloftheresourcemanagersareparticipatinginthetwo-phasecommitprotocol.
vTheapplicationcannotbedesignedasasingleapplication(orunitofrecovery)acrossmultiplesystems(exceptforCICS).
Theapplicationprogrammerwouldhavetoprogramaroundtheselimitations.
Forexample,theprogrammercouldlimitthechoiceofwheretoputthebusinessdatatoensurethatallthedatacouldbecommittedinasingleunitofrecovery.
Also,theselimitationscouldaffecttherecoverabilityoftheprotectedresourcesortheirintegrityincaseofafailureofoneofthecomponents,becauseresourcemanagershavenowaytoeithercommitorrollbacktheupdates.
IntroductiontoCICSCICSstandsfor"CustomerInformationControlSystem.
"Itisageneral-purposetransactionprocessingsubsystemforthez/OSoperatingsystem.
CICSprovidesservicesforrunninganapplicationonline,byrequest,atthesametimeasmanyotherusersaresubmittingrequeststorunthesameapplications,usingthesamefilesandprograms.
CICSmanagesthesharingofresources,theintegrityofdataandprioritizationofexecution,withfastresponse.
CICSauthorizesusers,allocatesresources(realstorageandcycles),andpassesondatabaserequestsbytheapplicationtotheappropriatedatabasemanager(suchasDB2).
WecouldsaythatCICSactslike,andperformsmanyofthesamefunctionsasthez/OSoperatingsystem.
ACICSapplicationisacollectionofrelatedprogramsthattogetherperformabusinessoperation,suchasprocessingatravelrequestorpreparingacompanypayroll.
CICSapplicationsexecuteunderCICScontrol,usingCICSservicesandinterfacestoaccessprogramsandfiles.
CICSapplicationsaretraditionallyrunbysubmittingatransactionrequest.
Executionofthetransactionconsistsofrunningoneormoreapplicationprogramsthatimplementtherequiredfunction.
InCICSdocumentationyoumayfindCICSapplicationprogramssometimessimplycalled"programs,"andsometimestheterm"transaction"isusedtoimplytheprocessingdonebytheapplicationprograms.
CICSapplicationscanalsotaketheformofEnterpriseJavaBeans.
YoucanfindoutmoreaboutthisformofprogramminginthesectiononJavaapplicationsinCICSintheCICSInformationCenter.
CICSinaz/OSsystemInaz/OSsystem,CICSprovidesalayeroffunctionformanagingtransactions,whiletheoperatingsystemremainsthefinalinterfacewiththecomputerChapter1.
Transactionmanagementsystems7hardware.
CICSessentiallyseparatesaparticularkindofapplicationprogram(namely,onlineapplications)fromothersinthesystem,andhandlestheseprogramsitself.
Whenanapplicationprogramaccessesaterminaloranydevice,forexample,itdoesn'tcommunicatedirectlywithit.
TheprogramissuescommandstocommunicatewithCICS,whichcommunicateswiththeneededaccessmethodsoftheoperatingsystem.
Finally,theaccessmethodcommunicateswiththeterminalordevice.
Az/OSsystemmighthavemultiplecopiesofCICSrunningatonetime.
EachCICSstartsasaseparatez/OSaddressspace.
CICSprovidesanoptioncalledmuti-regionoperation(MRO),whichenablestheseparationofdifferentCICSfunctionsintodifferentCICSregions(addressspaces);soaspecificCICSaddressspace(ormore)mightdotheterminalcontrolandwillbenamedterminalowningregion(TOR).
Otherpossibilitiesincludeapplication-owningregions(AORs)forapplicationsandfile-owningregions(FORs)forfiles.
CICSprograms,transactionsandtasksCICSallowsyoutokeepyourapplicationlogicseparatefromyourapplicationresources.
TodevelopandrunCICSapplications,youneedtounderstandtherelationshipbetweenCICSprograms,transactions,andtasks.
ThesetermsareusedthroughoutCICSpublicationsandappearinmanycommands:TransactionAtransactionisapieceofprocessinginitiatedbyasinglerequest.
Thisisusuallyfromanenduserataterminal,butmightalsobemadefromaWebpage,fromaremoteworkstationprogram,fromanapplicationinanotherCICSsystem,ortriggeredautomaticallyatapredefinedtime.
TheCICSInternetGuideandtheCICSExternalInterfacesGuidedescribedifferentwaysofrunningCICStransactions.
ACICStransactionisgivena4-charactername,whichisdefinedintheprogramcontroltable(PCT).
ApplicationprogramAsingletransactionconsistsofoneormoreapplicationprogramsthat,whenrun,carryouttheprocessingneeded.
However,thetermtransactionisusedinCICStomeanbothasingleeventandallothertransactionsofthesametype.
YoudescribeeachtransactiontypetoCICSwithatransactionresourcedefinition.
ThisdefinitiongivesFigure4.
Transactionalsystemandtheoperatingsystem8OnlineWorkloadsforz/OSthetransactiontypeaname(thetransactionidentifierorTRANSID)andtellsCICSseveralthingsabouttheworktobedone,suchaswhatprogramtoinvokefirstandwhatkindofauthenticationisrequiredthroughouttheexecutionofthetransaction.
YourunatransactionbysubmittingitsTRANSIDtoCICS.
CICSusestheinformationrecordedintheTRANSACTIONdefinitiontoestablishthecorrectexecutionenvironment,andstartsthefirstprogram.
UnitofworkThetermtransactionisnowusedextensivelyintheITindustrytodescribeaunitofrecoveryorwhatCICScallsaunitofwork.
Thisistypicallyacompleteoperationthatisrecoverable;itcanbecommittedorbackedoutasanentiretyasaresultofaprogrammedcommandorsystemfailure.
Inmanycases,thescopeofaCICStransactionisalsoasingleunitofwork,butyoushouldbeawareofthedifferenceinmeaningwhenreadingnon-CICSpublications.
TaskYouwillalsoseethewordtaskusedextensivelyinCICSpublications.
ThiswordalsohasaspecificmeaninginCICS.
WhenCICSreceivesarequesttorunatransaction,itstartsanewtaskthatisassociatedwiththisoneinstanceoftheexecutionofthetransaction–thatis,oneexecutionofatransaction,withaparticularsetofdata,usuallyonbehalfofaparticularuserataparticularterminal.
Youcanalsoconsideritanalogoustoathread.
Whenthetransactioncompletes,thetaskisterminated.
UsingprogramminglanguageswithCICSYoucanuseCOBOL,OOCOBOL,C,C++,Java,PL/I,orAssemblerlanguagetowriteCICSapplicationprogramstorunonz/OS.
Mostoftheprocessinglogicisexpressedinstandardlanguagestatements,butyouuseCICScommands,ortheJavaandC++classlibraries,torequestCICSservices.
Mostofthetime,youusetheCICScommandlevelprogramminginterface,EXECCICS.
ThisisthecaseforCOBOL,OOCOBOL,C,C++,PL/Iandassemblerprograms.
ThesecommandsaredefinedindetailintheCICSApplicationProgrammingReference.
ProgramminginJavawiththeJCICSclasslibraryisdescribedinthesectiononJavaapplicationsintheCICScomponentoftheCICSInformationCenter.
ProgramminginC++withtheCICSC++classesisdescribedintheCICSC++OOClassLibrariesdocumentation.
CICSconversationalandpseudo-conversationalprogrammingInCICS,whentheprogramsbeingexecutedenterintoaconversationwiththeuser,itiscalledaconversationaltransaction.
Anon-conversationaltransaction,bycontrast,processesoneinput,responds,andends(disappears).
Itneverpausestoreadasecondinputfromtheterminal,sothereisnorealconversation.
ThereisatechniqueinCICScalledpseudo-conversationalprocessing,inwhichaseriesofnon-conversationaltransactionsgivestheappearance(totheuser)ofasingleconversationaltransaction.
Notransactionexistswhiletheuserwaitsforinput;CICStakescareofreadingtheinputwhentheusergetsaroundtosendingit.
Figure5onpage10andFigure6onpage11showdifferenttypesofconversationinanexampleofarecordupdateinabankingaccount.
Chapter1.
Transactionmanagementsystems9Inaconversationaltransaction,programsholdresourceswhilewaitingtoreceivedata.
Inapseudo-conversationalmodel,noresourcesareheldduringthesewaits(Figure6onpage11).
MoreinformationaboutthesetopicscanbefoundinCICSApplicationProgrammingGuide.
Figure5.
Exampleofaconversationaltransaction10OnlineWorkloadsforz/OSCICSprogrammingcommandsThegeneralformatofaCICScommandisEXECUTECICS(orEXECCICS)followedbythenameofthecommandandpossiblyoneormoreoptions.
YoucanwritemanyapplicationprogramsusingtheCICScommand-levelinterfacewithoutanyknowledgeof,orreferenceto,thefieldsintheCICScontrolblocksandstorageareas.
However,youmightneedtogetinformationthatisvalidoutsidethelocalenvironmentofyourapplicationprogram.
WhenyouneedaCICSsystemservice,forexamplewhenreadingarecordfromafile,youjustincludeaCICScommandinyourcode.
InCOBOL,forexample,CICScommandslooklikethis:EXECCICSfunctionoptionoption.
.
.
END-EXEC.
The"function"istheactionyouwanttoperform.
ReadingafileisREAD,writingtoaterminalisSEND,andsoon.
An"option"issomespecificationthat'sassociatedwiththefunction.
Optionsareexpressedaskeywords.
Forexample,theoptionsfortheREADcommandincludeFILE,RIDFLD,UPDATE,andothers.
FILEtellsCICSwhichfileyouwanttoread,andisalwaysfollowedbyavalueindicatingorpointingtothefilename.
RIDFLD(recordidentificationfield,thatis,thekey)tellsCICSwhichrecordandlikewiseneedsavalue.
TheUPDATEoption,ontheotherhand,simplymeansthatyouintendtochangetherecord,anditdoesn'ttakeanyvalue.
So,toreadwithintentFigure6.
Exampleofapseudo-conversationaltransactionChapter1.
Transactionmanagementsystems11tomodify,arecordfromafileknowntoCICSasACCTFIL,usingakeythatwestoredinworkingstorageasACCTC,weissuedthecommandshowninFigure7.
YoucanusetheADDRESSandASSIGNcommandstoaccesssuchinformation.
Forprogramminginformationaboutthesecommands,seeCICSApplicationProgrammingReference.
WhenusingtheADDRESSandASSIGNcommands,variousfieldscanbereadbutshouldnotbesetorusedinanyotherway.
ThismeansthatyoushouldnotuseanyoftheCICSfieldsasargumentsinCICScommands,becausethesefieldsmaybealteredbytheEXECinterfacemodules.
HowaCICStransactionflowsWhileitruns,yourapplicationprogramrequestsvariousCICSfacilitiestohandlemessagetransmissionsbetweenitandtheterminal,andtohandleanynecessaryfileordatabaseaccesses.
TobeginanonlinesessionwithCICS,usersusuallybeginby"signingon,"theprocesswhichidentifiesthemtoCICS.
SigningontoCICSgivesuserstheauthoritytoinvokecertaintransactions.
Whensignedon,usersinvoketheparticulartransactiontheyintendtouse.
ACICStransactionisusuallyidentifiedbya1-to4-charactertransactionidentifierorTRANSID,whichisdefinedinatablethatnamestheinitialprogramtobeusedforprocessingthetransaction.
Applicationprogramsarestoredinalibraryonadirectaccessstoragedevice(DASD)attachedtotheprocessor.
Theycanbeloadedwhenthesystemisstarted,orsimplyloadedasrequired.
Ifaprogramisinstorageandisn'tbeingused,CICScanreleasethespaceforotherpurposes.
Whentheprogramisnextneeded,CICSloadsafreshcopyofitfromthelibrary.
Inthetimeittakestoprocessonetransaction,thesystemmayreceivemessagesfromseveralterminals.
Foreachmessage,CICSloadstheapplicationprogram(ifitisn'talreadyloaded),andstartsatasktoexecuteit.
Thus,multipleCICStaskscanberunningconcurrently.
Multithreadingisatechniquethatallowsasinglecopyofanapplicationprogramtobeprocessedbyseveraltransactionsconcurrently.
Forexample,onetransactionmaybegintoexecuteanapplicationprogram(atravellerrequestsinformation).
Whilethishappens,anothertransactionmaythenexecutethesamecopyoftheapplicationprogram(anothertravellerrequestsinformation).
Comparethiswithsingle-threading,whichistheexecutionofaprogramtocompletion:processingoftheprogrambyonetransactioniscompletedbeforeanothertransactioncanuseit.
MultithreadingrequiresthatallCICSapplicationprogramsbequasi-reentrant;thatis,theymustbeseriallyreusablebetweenentryandexitpoints.
CICSapplicationprogramsusingtheCICScommandsobeythisruleautomatically.
EXECCICSREADFILE('ACCTFIL')RIDFLD(ACCTC)UPDATE.
.
.
END-EXEC.
Figure7.
CICScommandexample12OnlineWorkloadsforz/OSCICSmaintainsaseparatethreadofcontrolforeachtask.
When,forexample,onetaskiswaitingtoreadadiskfile,ortogetaresponsefromaterminal,CICSisabletogivecontroltoanothertask.
TasksaremanagedbytheCICStaskcontrolprogram.
CICSmanagesbothmultitaskingandrequestsfromthetasksthemselvesforservices(oftheoperatingsystemorofCICSitself).
ThisallowsCICSprocessingtocontinuewhileataskiswaitingfortheoperatingsystemtocompletearequestonitsbehalf.
EachtransactionthatisbeingmanagedbyCICSisgivencontroloftheprocessorwhenthattransactionhasthehighestpriorityofthosethatarereadytorun.
Whileitruns,yourapplicationprogramrequestsvariousCICSfacilitiestohandlemessagetransmissionsbetweenitandtheterminal,andtohandleanynecessaryfileordatabaseaccesses.
Whentheapplicationiscomplete,CICSreturnstheterminaltoastandbystate.
Figure8,Figure9onpage14,andFigure10onpage14helpyouunderstandwhatgoeson.
Theflowofcontrolduringatransaction(codeABCD)isshownbythesequenceofnumbers1to8.
(We'reonlyusingthistransactiontoshowsomeofthestagesthancanbeinvolved.
)Themeaningsoftheeightstagesareasfollows:1.
TerminalcontrolacceptscharactersABCD,typedattheterminal,andputstheminworkingstorage.
2.
SystemservicesinterpretthetransactioncodeABCDasacallforanapplicationprogramcalledABCD00.
Iftheterminaloperatorhasauthoritytoinvokethisprogram,itiseitherfoundalreadyinstorageorloadedintostorage.
3.
Modulesarebroughtfromtheprogramlibraryintoworkingstorage.
Figure8.
CICStransactionflow(part1)Chapter1.
Transactionmanagementsystems134.
Ataskiscreated.
ProgramABCD00isgivencontrolonitsbehalf.
5.
ABCD00invokesBasicmappingsupport(BMS)andterminalcontroltosendamenutotheterminal,allowingtheusertospecifypreciselywhatinformationisneeded.
6.
BMSandterminalcontrolalsohandletheuser'snextinput,returningittoABCD01(theprogramdesignatedbyABDC00tohandlethenextresponsefromtheterminal)whichtheninvokesfilecontrol.
7.
Filecontrolreadstheappropriatefilefortheinvocationtheterminaluserhasrequested.
8.
Finally,ABCD01invokesBMSandterminalcontroltoformattheretrieveddataandpresentitontheterminal.
CICSservicesforapplicationprogramsCICSapplicationsexecuteunderCICScontrol,usingCICSservicesandinterfacestoaccessprogramsandfiles.
ApplicationprogramminginterfaceYouusetheapplicationprogramminginterfaceorAPItoaccessCICSservicesfromtheapplicationprogram.
YouwriteaCICSprograminmuchthesamewayasyouwriteanyotherprogram.
Mostoftheprocessedlogicisexpressedinstandardlanguageelements,butyoucanuseCICScommandstorequestCICSservices.
Figure9.
CICStransactionflow(part2)Figure10.
CICStransactionflow(part3)14OnlineWorkloadsforz/OSTerminalcontrolservicesTheseservicesallowaCICSapplicationprogramtocommunicatewithterminaldevices.
Throughtheseservices,informationmaybesenttoaterminalscreenandtheuserinputmayberetrievedfromit.
It'snoteasytodealwithterminalcontrolservicesinadirectway.
BasicMappingSupport,orBMS,letsyoucommunicatewithaterminalwithahigherlanguagelevel.
Itformatsyourdata,andyoudonotneedtoknowthedetailsofthedatastream.
FileanddatabasecontrolservicesWemaydifferentiatethefollowingtwodifferentCICSdatamanagementservices:1.
CICSfilecontroloffersyouaccesstodatasetsthataremanagedbyeithertheVirtualStorageAccessMethod(VSAM)ortheBasicDirectAccessMethod(BDAM).
CICSfilecontrolletsyouread,update,add,andbrowsedatainVSAMandBDAMdatasetsanddeletedatafromVSAMdatasets.
2.
DatabasecontrolletsyouaccessIMSandDB2databases.
AlthoughCICShastwoprogramminginterfacestoIMS,usingthehigher-levelEXECDL/Iinterfaceisrecommended.
CICShasoneinterfacetoDB2:theEXECSQLinterface.
TheEXECSQLinterfaceofferspowerfulstatementsformanipulatingsetsoftables,thusrelievingtheapplicationprogramofrecord-by-recordprocessing.
OtherCICSservicesvTaskcontrolcanbeusedtocontroltheexecutionofatask.
Youmaysuspendataskorscheduletheuseofaresourcebyataskbymakingitseriallyreusable.
Also,thepriorityassignedtoataskmaybechanged.
vProgramcontrolgovernstheflowofcontrolbetweenapplicationprogramsinaCICSsystem.
ThenameoftheapplicationreferredtoinaprogramcontrolcommandmusthavebeendefinedasaprogramtoCICS.
Youcanuseprogramcontrolcommandstolinkoneofyourapplicationprogramstoanother,andtransfercontrolfromoneapplicationprogramtoanother,withnoreturntotherequestingprogram.
vTemporaryStorage(TS)andTransientData(TD)control.
TheCICStemporarystoragecontrolfacilityprovidestheapplicationprogrammerwiththeabilitytostoredataintemporarystoragequeues,eitherinmainstorageorinauxiliarystorageonadirect-accessstoragedevice,or,inthecaseoftemporarystorage,thecouplingfacility.
TheCICStransientdatacontrolfacilityprovidesageneralizedqueuingfacilitytoqueue(orstore)dataforsubsequentorexternalprocessing.
vIntervalcontrolservicesprovidefunctionsthatarerelatedtotime.
Usingintervalcontrolcommands,youcanstartataskataspecifiedtimeorafteraspecifiedinterval,delaytheprocessingofatask,andrequestnotificationwhenaspecifiedtimehasexpired,amongotheractions.
vStoragecontrolfacilitycontrolsrequestsformainstoragetoprovideintermediateworkareasandothermainstorageneededtoprocessatransaction.
CICSmakesworkingstorageavailablewitheachprogramautomatically,withoutanyrequestfromtheapplicationprogram,andprovidesotherfacilitiesforintermediatestoragebothwithinandamongtasks.
InadditiontotheworkingstorageprovidedautomaticallybyCICS,however,youcanuseotherCICScommandstogetandreleasemainstorage.
vDumpandtracecontrol.
Thedumpcontrolprovidesatransactiondumpwhenanabnormalterminationoccursduringtheexecutionofanapplicationprogram.
Chapter1.
Transactionmanagementsystems15CICStraceisadebuggingaidforapplicationprogrammersthatproducestraceentriesofthesequenceofCICSoperations.
CICSprogramcontrolAtransaction(task)mayexecuteseveralprogramsinthecourseofcompletingitswork.
TheprogramdefinitioncontainsoneentryforeveryprogramusedbyanyapplicationintheCICSsystem.
Eachentryholds,amongotherthings,thelanguageinwhichtheprogramiswritten.
Thetransactiondefinitionhasanentryforeverytransactionidentifierinthesystem,andtheimportantinformationkeptabouteachtransactionistheidentifierandthenameofthefirstprogramtobeexecutedonbehalfofthetransaction.
Youcanseehowthesetwosetsofdefinitions,transactionandprogram,workinconcert:vTheusertypesinatransactionidentifierattheterminal(ortheprevioustransactiondeterminedit).
vCICSlooksupthisidentifierinthelistofinstalledtransactiondefinitions.
vThistellsCICSwhichprogramtoinvokefirst.
vCICSlooksupthisprograminthelistofinstalledtransactiondefinitions,findsoutwhereitis,andloadsit(ifitisn'talreadyinthemainstorage).
vCICSbuildsthecontrolblocksnecessaryforthisparticularcombinationoftransactionandterminal,usinginformationfrombothsetsofdefinitions.
Forprogramsincommand-levelCOBOL,thisincludesmakingaprivatecopyofworkingstorageforthisparticularexecutionoftheprogram.
vCICSpassescontroltotheprogram,whichbeginsrunningusingthecontrolblocksforthisterminal.
Thisprogrammaypasscontroltoanyotherprograminthelistofinstalledprogramdefinitions,ifnecessary,inthecourseofcompletingthetransaction.
TherearetwoCICScommandsforpassingcontrolfromoneprogramtoanother.
OneistheLINKcommand,whichissimilartoaCALLstatementinCOBOL.
TheotheristheXCTL(transfercontrol)command,whichhasnoCOBOLcounterpart.
Whenoneprogramlinksanother,thefirstprogramstaysinmainstorage.
Whenthesecond(linked-to)programfinishesandgivesupcontrol,thefirstprogramresumesatthepointaftertheLINK.
Thelinked-toprogramisconsideredtobeoperatingatonelogicallevellowerthantheprogramthatdoesthelinking.
16OnlineWorkloadsforz/OSIncontrast,whenoneprogramtransferscontroltoanother,thefirstprogramisconsideredterminated,andthesecondoperatesatthesamelevelasthefirst.
Whenthesecondprogramfinishes,controlisreturnednottothefirstprogram,buttowhateverprogramlastissuedaLINKcommand.
SomepeopleliketothinkofCICSitselfasthehighestprogramlevelinthisprocess,withthefirstprograminthetransactionasthenextleveldown,andsoon.
Figure11illustratesthisconcept.
TheLINKcommandlookslikethis:EXECCICSLINKPROGRAM(pgmname)COMMAREA(commarea)LENGTH(length)END-EXEC.
wherepgmnameisthenameoftheprogramtowhichyouwishtolink.
commareaisthenameoftheareacontainingthedatatobepassedand/ortheareatowhichresultsaretobereturned.
TheCOMMAREAinterfaceisalsoanoptiontoinvokeCICSprograms.
AsoundprincipleofCICSapplicationdesignistoseparatethepresentationlogicfromthebusinesslogic;communicationbetweentheprogramsisachievedbyusingtheLINKcommandanddataispassedbetweensuchprogramsintheCOMMAREA.
Suchamodulardesignprovidesnotonlyaseparationoffunctions,butalsomuchgreaterflexibilityfortheWebenablementofexistingapplicationsusingnewpresentationmethods.
Figure11.
Transferringcontrolbetweenprograms(normalreturns)Chapter1.
Transactionmanagementsystems17CICSprogrammingroadmapHerearetypicalstepsfordevelopingaCICSapplicationthatusestheEXECCICScommandlevelprogramminginterface.
1.
Designtheapplication,identifyingtheCICSresourcesandservicesyouwilluse.
SeethesectiononApplicationDesigninCICSApplicationProgrammingGuide.
2.
Writetheprograminthelanguageofyourchoice,includingEXECCICScommandstorequestCICSservices.
SeeCICSApplicationProgrammingReferenceforalistofCICScommands.
Oneoftheneededcomponentsforonlinetransactionsisthescreendefinition,thatis,thelayoutofwhatisdisplayedonthescreen(suchasaWebpage);inCICSwecallthisamap.
3.
Dependingonthecompiler,youmightonlyneedtocompiletheprogramandinstallitinCICS,oryoumightneedtodefinetranslatoroptionsfortheprogramandthentranslateandcompileyourprogram.
SeeCICSApplicationProgrammingGuideformoredetails.
4.
DefineyourprogramandrelatedtransactionstoCICSwithPROGRAMresourcedefinitionsandTRANSACTIONresourcedefinitions,asdescribedinCICSResourceDefinitionGuide.
5.
DefineanyCICSresourcesthatyourprogramuses,suchasfiles,queues,orterminals.
6.
MaketheresourcesknowntoCICSusingtheCEDAINSTALLcommanddescribedinCICSResourceDefinitionGuide.
CICSonlineexampleHereareexamplesofCICStransactions.
vAdding,updatingand/ordeletingemployeeinformationvAdding,updatingand/ordeletingavailablecarsbyrentalcompanyvGettingthenumberofavailablecarsbyrentalcompanyvUpdatingpricesofrentalcarsvAdding,updatingand/ordeletingregularflightsbyairlinevGettingthenumberofsoldticketsbyairlineorbydestination.
Figure12onpage19showshowausercancalculatetheaveragesalarybydepartment.
Thedepartmentisenteredbytheuserandthetransactioncalculatestheaveragesalary.
18OnlineWorkloadsforz/OSNoticethatyoucanaddPFkeydefinitionstotheuserscreensinyourCICSapplications.
Figure12.
CICSapplicationuserscreenChapter1.
Transactionmanagementsystems1920OnlineWorkloadsforz/OSChapter2.
DatabasemanagementsystemsAdatabasemanagementsystem(DBMS)isasoftwaresystemthatcontrolsthecreation,organization,andmodificationofadatabaseandtheaccesstothedatathatisstoredinit.
Twoofthemostwidelyuseddatabasemanagementsystem(DBMS)productsforz/OSareDB2andIMSDB.
ThistopicgivesanoverviewofbasicDBMSconceptstoprovidecontextfortheintroductionstoDB2andIMSDB.
WhoisthedatabaseadministratorDatabaseadministrators(DBAs)areprimarilyresponsibleforspecificdatabasesinthesubsystem.
Insomecompanies,DBAsaregiventhespecialgroupauthorization,SYSADM,whichgivesthemtheabilitytodoalmosteverythingintheDB2subsystem,andgivesthemjurisdictionoverallthedatabasesinthesubsystem.
Inothershops,aDBA'sauthorityislimitedtoindividualdatabases.
TheDBAcreatesthehierarchyofdataobjects,beginningwiththedatabase,thentablespaces,tables,andanyindexesorviewsthatarerequired.
Thispersonalsosetsupthereferentialintegritydefinitionsandanynecessaryconstraints.
TheDBAessentiallyimplementsthephysicaldatabasedesign.
Partofthisinvolveshavingtodospacecalculationsanddetermininghowlargetomakethephysicaldatasetsforthetablespacesandindexspaces,andassigningstoragegroups(alsocalledstorgroups).
ManytoolsareavailabletohelpDBAsperformtheirtasks.
TheDBAcanberesponsibleforgrantingauthorizationstothedatabaseobjects,althoughsometimesthereisaspecialsecurityadministrationgroupthatdoesthis.
Thecentralizationofdataandcontrolofaccesstothisdataisinherenttoadatabasemanagementsystem.
Oneoftheadvantagesofthiscentralizationistheavailabilityofconsistentdatatomorethanoneapplication.
Asaconsequence,thisdictatestightercontrolofthatdataanditsusage.
ResponsibilityforanaccurateimplementationofcontrollieswiththeDBA.
Indeed,togainthefullbenefitsofusingacentralizeddatabase,youmusthaveacentralpointofcontrolforit.
BecausetheactualimplementationoftheDBAfunctionisdependentonacompany'sorganization,welimitourselvestoadiscussionoftherolesandresponsibilitiesofaDBA.
ThegroupfulfillingtheDBArolewillneedexperienceinbothapplicationandsystemsprogramming.
Inatypicalinstallation,theDBAisresponsiblefor:vProvidingthestandardsfor,andtheadministrationof,databasesandtheirusevGuiding,reviewing,andapprovingthedesignofnewdatabasesvDeterminingtherulesofaccesstothedataandmonitoringitssecurityvEnsuringdatabaseintegrityandavailability,andmonitoringthenecessaryactivitiesforreorganizationbackupandrecoveryCopyrightIBMCorp.
2006,201021vApprovingtheoperationofnewprogramswithexistingproductiondatabases,basedonresultsoftestingwithtestdata.
Ingeneral,theDBAisresponsibleforthemaintenanceofcurrentinformationaboutthedatainthedatabase.
Initially,thisresponsibilitymightbecarriedoutusingamanualapproach.
Butitcanbeexpectedtogrowtoascopeandcomplexitysufficienttojustify,ornecessitate,theuseofadatadictionaryprogram.
TheDBAisnotresponsiblefortheactualcontentofdatabases.
Thisistheresponsibilityoftheuser.
Rather,theDBAenforcesproceduresforaccurate,complete,andtimelyupdateofthedatabases.
WhatisadatabasemanagementsystemAdatabasemanagementsystem(orDBMS)isessentiallynothingmorethanacomputerizeddata-keepingsystem.
Usersofthesystemaregivenfacilitiestoperformseveralkindsofoperationsonsuchasystemforeithermanipulationofthedatainthedatabaseorthemanagementofthedatabasestructureitself.
DatabaseManagementSystems(DBMSs)arecategorizedaccordingtotheirdatastructuresortypes.
Thereareseveraltypesofdatabasesthatcanbeusedonamainframetoexploitz/OS:invertedlist,hierarchic,network,orrelational.
Mainframesitestendtouseahierarchicalmodelwhenthedatastructure(notdatavalues)ofthedataneededforanapplicationisrelativelystatic.
Forexample,aBillofMaterial(BOM)databasestructurealwayshasahighlevelassemblypartnumber,andseverallevelsofcomponentswithsubcomponents.
Thestructureusuallyhasacomponentforecast,cost,andpricingdata,andsoon.
ThestructureofthedataforaBOMapplicationrarelychanges,andnewdataelements(notvalues)arerarelyidentified.
Anapplicationnormallystartsatthetopwiththeassemblypartnumber,andgoesdowntothedetailcomponents.
Hierarchicalandrelationaldatabasesystemshavecommonbenefits.
RDBMShastheadditional,significantadvantageoverthehierarchicalDBofbeingnon-navigational.
Bynavigational,wemeanthatinahierarchicaldatabase,theapplicationprogrammermustknowthestructureofthedatabase.
Theprogrammustcontainspecificlogictonavigatefromtherootsegmenttothedesiredchildsegmentscontainingthedesiredattributesorelements.
Theprogrammuststillaccesstheinterveningsegments,eventhoughtheyarenotneeded.
Theremainderofthissectiondiscussestherelationaldatabasestructure.
WhatstructuresexistinarelationaldatabaseRelationaldatabasesincludethefollowingstructures:DatabaseAdatabaseisalogicalgroupingofdata.
Itcontainsasetofrelatedtablespacesandindexspaces.
Typically,adatabasecontainsallthedatathatisassociatedwithoneapplicationorwithagroupofrelatedapplications.
Youcouldhaveapayrolldatabaseoraninventorydatabase,forexample.
TableAtableisalogicalstructuremadeupofrowsandcolumns.
Rowshavenofixedorder,soifyouretrievedatayoumightneedtosortthedata.
Theorderofthecolumnsistheorderspecifiedwhenthetablewascreatedbythedatabaseadministrator.
Attheintersectionofeverycolumnandrowis22OnlineWorkloadsforz/OSaspecificdataitemcalledavalue,or,moreprecisely,anatomicvalue.
Atableisnamedwithahigh-levelqualifieroftheowner'suserIDfollowedbythetablename,forexampleTEST.
DEPTorPROD.
DEPT.
Therearethreetypesoftables:vAbasetablethatiscreatedandholdspersistentdatavAtemporarytablethatstoresintermediatequeryresultsvAresultstablethatisreturnedwhenyouquerytables.
Inthistableweuse:vColumns–TheorderedsetofcolumnsareDEPTNO,DEPTNAME,MGRNO,andADMRDEPT.
Allthedatainagivencolumnmustbeofthesamedatatype.
vRows–Eachrowcontainsdataforasingledepartment.
vValues–Attheintersectionofacolumnandrowisavalue.
Forexample,PLANNINGisthevalueoftheDEPTNAMEcolumnintherowfordepartmentB01.
IndexesAnindexisanorderedsetofpointerstorowsofatable.
Unliketherowsofatablethatarenotinaspecificorder,anindexmustalwaysbemaintainedinorderbyDB2.
Anindexisusedfortwopurposes:vForperformance,toretrievedatavaluesmorequicklyvForuniqueness.
Bycreatinganindexonanemployee'sname,youcanretrievedatamorequicklyforthatemployeethanbyscanningtheentiretable.
Also,bycreatingauniqueindexonanemployeenumber,DB2willenforcetheuniquenessofeachvalue.
AuniqueindexistheonlywayDB2canenforceuniqueness.
Creatinganindexautomaticallycreatestheindexspace,thedatasetthatcontainstheindex.
KeysAkeyisoneormorecolumnsthatareidentifiedassuchinthecreationofatableorindex,orinthedefinitionofreferentialintegrity.
PrimarykeyAtablecanonlyhaveoneprimarykeybecauseitdefinestheentity.
Therearetworequirementsforaprimarykey:Figure13.
ExampleofaDB2table(departmenttable)Chapter2.
Databasemanagementsystems231.
Itmusthaveavalue,thatis,itcannotbenull.
2.
Itmustbeunique,thatis,itmusthaveauniqueindexdefinedonit.
UniquekeyWealreadyknowthataprimarykeymustbeunique,butitispossibletohavemorethanoneuniquekeyinatable.
InourEMPtableexample,theemployeenumberisdefinedastheprimarykeyandisthereforeunique.
Ifwealsohadasocialsecurityvalueinourtable,hopefullythatvaluewouldbeunique.
Toguaranteethis,youcouldcreateauniqueindexonthesocialsecuritycolumn.
ForeignkeyAforeignkeyisakeythatisspecifiedinareferentialintegrityconstrainttomakeitsexistencedependentonaprimaryoruniquekey(parentkey)inanothertable.
Theexamplegivenisthatofanemployee'sworkdepartmentnumberrelatingtotheprimarykeydefinedonthedepartmentnumberintheDEPTtable.
Thisconstraintispartofthedefinitionofthetable.
24OnlineWorkloadsforz/OSChapter3.
Web-basedworkloadsAsenterprisesmovemanyoftheirapplicationstotheWeb,mainframeorganizationsfacethecomplexityofenablingandmanagingnewWeb-basedworkloadsinadditiontomoretraditionalworkloads,suchasbatchprocessing.
ThistopicusesIBMproductsintheexamples,butmanysuchmiddlewareproductsexistinthemarketplacetoday.
WebSphereisIBM'sintegrationsoftwareplatform.
Itincludestheentiremiddlewareinfrastructure—servers,services,andtools—neededtowrite,run,andmonitor24x7industrial-strength,ondemandWebapplicationsandcross-platform,cross-productsolutions.
WebSphereprovidesreliable,flexible,androbustintegrationsoftware.
Amiddlewareproductoftenincludesanapplicationprogramminginterface(API).
Insomecases,applicationsarewrittentoruncompletelyunderthecontrolofthismiddlewareAPI,whileinothercasesitisusedonlyforuniquepurposes.
SomeexamplesofmainframemiddlewareAPIsinclude:vTheWebSpheresuiteofproducts,whichprovidesacompleteAPIthatisportableacrossmultipleoperatingsystems.
Amongtheseproducts,WebSphereMQprovidescross-platformAPIsandinter-platformmessagingtofacilitateapplicationintegration.
vTheDBdatabasemanagementproduct,whichprovidesanAPI(expressedintheSQLlanguage)thatisusedwithmanydifferentlanguagesandapplications.
AWebserverisconsideredtobemiddlewareandWebprogramming(Webpages,CGIs,andsoforth)islargelycodedtotheinterfacesandstandardspresentedbytheWebserverinsteadoftheinterfacespresentedbytheoperatingsystem.
JavaisanotherexampleinwhichapplicationsarewrittentorununderaJavaVirtualMachine(JVM)andarelargelyindependentoftheoperatingsystembeingused.
z/OSHTTPServerservesstaticanddynamicWebpages.
HTTPServerhasthesamecapabilitiesasanyotherWebserver,butitalsohassomefeaturesthatarez/OS-specific.
Introductiontoz/OSHTTPServerz/OSHTTPServerservesstaticanddynamicWebpages.
YoucanrunHTTPServerinanyofthreemodes,witheachofferingadvantagesforhandlingWeb-basedworkloads:Stand-aloneserverThismodeistypicallyusedforHTTPServer-onlyimplementations(simpleWebsites).
ItsmainroleistoprovidealimitedexposuretotheInternet.
ScalableserverThismodeistypicallyusedforinteractiveWebsites,wherethetrafficvolumeincreasesordeclinesdynamically.
Itisintendedforamoresophisticatedenvironment,inwhichservletsandJSPsareinvoked.
MultipleserversThismodeusesacombinationofstand-aloneandscalableserverstoimprovescalabilityandsecuritythroughoutthesystem.
Forexample,aCopyrightIBMCorp.
2006,201025stand-aloneservercouldbeusedasagatewaytoscalableservers,andthegatewaycouldverifytheuserauthenticationofallrequests,andrerouterequeststotheotherservers.
ServingstaticWebpagesonz/OSWithaWebserveronz/OS,suchasHTTPServer,theservingofstaticWebpagesissimilartoWebserversonotherplatforms.
TheusersendsanHTTPrequesttoHTTPServertoobtainaspecificfile.
HTTPServerretrievesthefilefromitsfilerepositoryandsendsittotheuser,alongwithinformationaboutthefile(suchasmimetypeandsize)intheHTTPheader.
HTTPServerhasamajordifferencefromotherWebservers,however.
Becausez/OSsystemsencodefilesinEBCDIC,thedocumentsonz/OSmustfirstbeconvertedtotheASCIIformattypicallyusedontheInternet(binarydocumentssuchaspicturesneednotbeconverted).
HTTPServerperformstheseconversions,thussavingtheprogrammerfromperformingthisstep.
However,theprogrammermustuseFTPtoloaddocumentsontheserver.
Thatis,theprogrammerspecifiesASCIIastheFTPtransportformattohavethefileconvertedfromEBCDIC.
Forbinarytransfers,thefileisnotconverted.
ServingdynamicWebpagesonz/OSDynamicWebpagesareanessentialpartofWeb-basedcommerce.
Everykindofinteractionandpersonalizationrequiresdynamiccontent.
WhenauserfillsoutaformonaWebsite,forexample,thedataintheformmustbeprocessed,andfeedbackmustbesenttotheuser.
TwoapproachesforservingdynamicWebpagesonz/OSare:vUsingCGIfordynamicWebpagesvUsingtheplug-ininterface.
UsingCGIfordynamicWebpagesOnewaytoprovidedynamicWebpagesisthroughtheCommonGatewayInterface(CGI),whichispartoftheHTTPprotocol.
CGIisastandardwayforaWebservertopassaWebuser'sHTTPrequesttoanapplication.
CGIgeneratestheoutputandpassesitbacktoHTTPServer,whichsendsitbacktotheuserinanHTTPresponse(Figure14onpage27).
CGIisnotlimitedtoreturningonlyHTMLpages;theapplicationcanalsocreateplaintextdocuments,XMLdocuments,pictures,PDFdocuments,andsoon.
ThemimetypemustreflectthecontentoftheHTTPresponse.
CGIhasonemajordisadvantage,whichisthateachHTTPrequestrequiresaseparateaddressspace.
Thiscausesalackofefficiencywhentherearemanyrequestsatatime.
Toavoidthisproblem,FastCGIwascreated.
Basically,theHTTPServerFastCGIplug-inisaprogramthatmanagesmultipleCGIrequestsinasingleaddressspace,whichsavesmanyprograminstructionsforeachrequest.
MoreinformationaboutHTTPServerplug-insisprovidedin"Usingtheplug-ininterface"onpage27.
26OnlineWorkloadsforz/OSUsingtheplug-ininterfaceAnotherwayofprovidingdynamiccontentisbyusingtheplug-ininterfaceofHTTPServer,whichallowsoneofseveralproductstointerfacewithHTTPServer.
Here,forexample,aresomewaysinwhichHTTPServercanpasscontroltoWebSphere;vWebSphereplug-in,sameaddressspaceFigure15showsasimpleconfigurationinwhichnoJ2EEserverisneeded.
ThisservletcanconnecttoCICSorIMS,ortoDB2throughJDBC.
However,codingbusinesslogicinsideservletsisnotrecommended.
FormoreinformationaboutthearchitecturalcharacteristicsthatareassociatedwithWeb-basedDB2applications,seehttp://publib.
boulder.
ibm.
com/infocenter/dzichelp/v2r2/index.
jsptopic=/com.
ibm.
db29.
doc.
intro/db2z_architectureofwebapplications.
htmvWebcontainerinsideHTTPServer,separateEJBcontainerFigure16onpage28showsamoreusableconfigurationinwhichtheservletsruninadifferentaddressspacethantheEJBs,sotheEJBsareinvokedfromremotecalls.
TheEJBsthengetinformationfromotherservers.
Figure14.
HowtheCGIworksFigure15.
AccessingservletsusingtheWebSphereplug-inChapter3.
Web-basedworkloads27vSeparateJ2EEserverwithbothWebcontainerandEJBcontainerInadditiontorunningyourservletslocallywithintheWebSphereplug-in,youcanalsousetheWebSphereplug-intorunservletsremotelyinaWebcontainer,asshowninFigure17.
ThisallowsyoutolocalizeyourservletsandEJBstothesamez/OSaddressspace,sothatnoremoteEJBcallsarerequired.
IfyouareusingWebSphereApplicationServer,HTTPServermightnotbeneeded,yetthereareseveralwaysinwhichHTTPServercaninteractwithWebSphereApplicationServer.
z/OSHTTPServercapabilitiesHTTPServerprovidescapabilitiessimilartootherWebservers,butwithsomefunctionsspecifictoz/OSaswell.
Thez/OS-specificfunctionscanbegroupedasfollows:vBasicfunctionsvSecurityfunctionsvFilecaching.
z/OSHTTPServerbasicfunctionsHTTPServerbasicfunctionsincludeEBCDIC/ASCIIfileaccess,performanceandusagemonitoring,tracingandlogging,serversideinclude(SSI),SimpleNetworkManagementProtocol(SNMP)ManagementInformationBase(MIB),cookiessupport,Multi-FormatProcessing,persistentconnections,andvirtualhosts.
Figure16.
AccessingEJBsfromaWebSphereplug-inFigure17.
AccessingservletsinaWebcontainerusingtheWebSphereplug-in28OnlineWorkloadsforz/OSvEBCDIC/ASCIIfileaccessTheserveraccessesfilesandconvertsthem,ifneeded,fromEBCDICtoASCIIencoding.
vPerformanceandusagemonitoringAspartofthez/OSfeatures,HTTPServercanproducesystemmanagementfacilities(SMF)recordsthatthesystemprogrammercanretrievelatertodoperformanceandusageanalysis.
(SMFisanoptionalfeatureofz/OSthatprovidesyouwiththemeansforgatheringandrecordinginformationthatcanbeusedtoevaluatesystemusageforaccounting,charge-back,andperformancetuning.
)vTracingandloggingHTTPServercomeswithacompletesetoflogging,tracing,andreportingcapabilitiesthatallowyoutokeeptrackofeveryHTTPrequest.
vServerSideInclude(SSI)ServerSideIncludeallowsyoutoinsertinformationintodocuments(staticordynamic)thattheserversendstotheclients.
Thiscouldbeavariable(likethe"Lastmodified"date),theoutputofaprogram,orthecontentofanotherfile.
Enablingthisfunction,butnotusingit,canhaveaseriousperformanceimpact.
vSimpleNetworkManagementProtocol(SNMP)ManagementInformationBase(MIB)HTTPServerprovidesanSNMPMIBandSNMPsubagent,soyoucanuseanySNMP-capablenetworkmanagementsystemtomonitoryourserver'shealth,throughput,andactivity.
Itcanthennotifyyouifspecifiedthresholdvaluesareexceeded.
vCookiessupportBecauseHTTPisastatelessprotocol,astatecanbeaddedwiththehelpofcookies,whichstoreinformationontheclient'sside.
ThissupportisusefulformultipleWebpages,forexampletoachievecustomizeddocumentsorforbannerrotation.
vMulti-FormatProcessingThisfeatureisusedforpersonalizationofWebpages.
Thebrowsersendsheaderinformationalongwiththerequest,includingtheacceptheader.
Thisinformationincludesthelanguageoftheuser.
HTTPServercanmakeuseofthecontentsoftheacceptheadertoselecttheappropriatedocumenttoreturntotheclient.
vPersistentconnectionsWiththehelpofthisHTTP/1.
1-specificfeature,noteveryrequesthastoestablishanewconnection.
Persistentconnectionsstay"alive"foracertainamountoftimetoenabletheuseofagivenconnectiontoanotherrequest.
vVirtualhostsVirtualhostsallowyoutorunoneWebserverwhilemakingitappeartoclientsasifyouarerunningseveral.
ThisisachievedbytheuseofdifferentDNSnamesforthesameIPand/ordifferentIPaddressesboundtothesameHTTPServer.
z/OSHTTPServersecurityfunctionsHTTPServersecurityfunctionsincludethreadlevelsecurity,HTTPS/SSLsupport,LDAPsupport,certificateauthentication,andproxysupport.
vThreadlevelsecurityChapter3.
Web-basedworkloads29AnindependentsecurityenvironmentcanbesetforeachthreadrunningunderHTTPServer,whichbasicallymeansthateveryclientconnectingtotheserverwillhaveitsownsecurityenvironment.
vHTTPS/SSLsupportHTTPServerhasfullsupportfortheSecureSocketLayer(SSL)protocol.
HTTPSusesSSLasasublayerundertheregularHTTPlayertoencryptanddecryptHTTPrequestsandHTTPresponses.
HTTPSusesport443forservinginsteadofHTTPport80.
vLDAPsupportTheLightweightDataAccessProtocol(LDAP)specifiesasimplifiedwaytoretrieveinformationfromanX.
500-compliantdirectoryinanasynchronous,client/servertypeofprotocol.
vCertificateauthenticationAspartoftheSSLsupport,HTTPServercanusecertificateauthenticationandactasacertificateauthority.
vProxysupportHTTPServercanactasaproxyserver.
Youcannot,however,usetheFastResponseCacheAccelerator(FRCA).
z/OSfilecachingPerformancecanbesignificantlyincreasedbyusingcertainfilecaching(buffering)possibilities.
vHTTPServercachingHFSfilesvHTTPServercachingz/OSdatasetsvz/OSUNIXcachingHFSfilesvFastResponseCacheAccelerator(FRCA).
WebSphereHTTPServerplug-incodeTheWebSphereHTTPServerplug-iniscodethatrunsinsidevariousWebservers:IBMHTTPServer,Apache,IIS,SunJavaSystem.
Requestsarepassedovertotheplug-in,wheretheyarehandledbasedonaconfigurationfile.
Theplug-iniscodesuppliedwithWebSpherethatrunsinsidevariousHTTPservers.
ThoseHTTPserversmaybetheIBMHTTPServeronz/OS.
AsworkloadcomesintotheHTTPServer,directivesintheHTTPServer'sconfigurationfile(httpd.
conf)areusedtomakeadecision:istheworkrequestcominginsomethingtheHTTPServerhandlesorisitsomethingthat'stobepassedovertheplug-initself.
Onceinsidetheplug-in,thelogicthatactsupontherequestisdeterminedbytheplug-in'sconfigurationfile,nottheHTTPServer's.
Thatconfigurationfileisbydefaultcalledtheplugin-cfg.
xmlfile.
Informationonwhichofthebackedapplicationserverstherequestistogotoisdefinedinthisfile.
ThisfileissomethingthatiscreatedbyWebSphereApplicationServeranddoesn'tnecessarilyneedmodifying,althoughyouhavetheflexibilitytodoso.
Note:Ingeneral,plug-insprovidefunctionalityextensionsforHTTPServer.
Figure18onpage31showsoneexampleofitsuse,althoughtherearemanydifferentplug-insthatcanbeconfiguredtoassistincustomizationofyourWebenvironment.
Anotherpopularplug-inistheLightweightDirectoryAccessProtocolServer(LDAP)usedforsecurityauthentication.
30OnlineWorkloadsforz/OSIntroductiontoWebSphereApplicationServerforz/OSWebSphereApplicationServerisacomprehensive,sophisticated,Java2EnterpriseEdition(J2EE)andWebservicestechnology-basedapplicationsystem.
WebSphereApplicationServeronz/OSistheJ2EEimplementationconformingtothecurrentSoftwareDevelopmentKit(SDK)specificationsupportingapplicationsatanAPIlevel.
Asmentioned,itisaJavaApplicationdeploymentandrun-timeenvironmentbuiltonopenstandards-basedtechnologysupportingallmajorfunctionssuchasservlets,Javaserverpages(JSPs),andEnterpriseJavaBeans(EJBs)includingthelatesttechnologyintegrationofservicesandinterfaces.
Theapplicationserverruntimeishighlyintegratedwithallinherentfeaturesandservicesofferedonz/OS.
TheapplicationservercaninteractwithallmajorsubsystemsontheoperatingsystemincludingDB2,CICS,andIMS.
Ithasextensiveattributesforsecurity,performance,scalabilityandrecovery.
Theapplicationserveralsousessophisticatedadministrationandtoolingfunctions,thusprovidingseamlessintegrationintoanydatacenterorserverenvironment.
WebSphereApplicationServerisane-businessapplicationdeploymentenvironment.
Itisbuiltonopenstandards-basedtechnologysuchasCORBA,HTML,HTTP,IIOP,andJ2EE-compliantJavatechnologystandardsforservlets,JavaServerPages(JSP)technology,andEnterpriseJavaBeans(EJB),anditsupportsallJavaAPIsneededforJ2EEcompliance.
TheControllerAddressSpacewillautomaticallystartaservantregionasworkarrives.
AsshowninFigure19onpage32,anapplicationserverinstanceiscomposedofacontrollerregion(CR)andoneormoreservantregions(SRs).
Figure18.
Exampleofaplug-inChapter3.
Web-basedworkloads31Theapplicationserveronz/OSsupportstwotypesofconfigurations:BaseandNetworkDeployment.
Eachconfigurationusesessentiallythesamearchitecturalhierarchy,comprisedofservers,nodesandcells.
However,cellsandnodesplayanimportantroleonlyintheNetworkDeploymentconfiguration.
ServersAserveristheprimaryruntimecomponent;thisiswhereyourapplicationactuallyexecutes.
TheserverprovidescontainersandservicesthatspecializeinenablingtheexecutionofspecificJavaapplicationcomponents.
EachapplicationserverrunsinitsownJavaVirtualMachine(JVM).
Dependingontheconfiguration,serversmightworkseparatelyorincombination,asfollows:vInaBaseconfiguration,eachapplicationserverfunctionsasaseparateentity.
Thereisnoworkloaddistributionorcommonadministrationamongtheapplicationservers.
vInaNetworkDeploymentconfiguration,multipleapplicationserversaremaintainedfromacentraladministrationpoint.
Inaddition,youcanclusterapplicationserversforworkloaddistribution.
Note:AspecialtypeofapplicationservercalledaJMSServerisnotcoveredinthismaterial.
Nodes(andnodeagents)AnodeisalogicalgroupingofWebSphere-managedserverprocessesthatsharecommonconfigurationandoperationalcontrol.
Anodeisgenerallyassociatedwithonephysicalinstallationoftheapplicationserver.
Asyoumoveuptothemoreadvancedapplicationserverconfigurations,theconceptsofconfiguringmultiplenodesfromonecommonadministrationserverandworkloaddistributionamongnodesareintroduced.
Inthesecentralizedmanagementconfigurations,eachnodehasanodeagentthatworkswithaDeploymentManagertomanageadministrationprocesses.
CellsAcellisagroupingofnodesintoasingleadministrativedomain.
IntheBaseconfiguration,acellcontainsonenode.
Thatnodemayhavemultipleservers,buttheconfigurationfilesforeachserverarestoredandmaintainedindividually(XML-based).
WiththeNetworkDeploymentconfiguration,acellcanconsistofmultiplenodes,alladministeredfromasinglepoint.
TheconfigurationandapplicationfilesforallFigure19.
Anapplicationserverinstance32OnlineWorkloadsforz/OSnodesinthecellarecentralizedintoacellmasterconfigurationrepository.
ThiscentralizedrepositoryismanagedbytheDeploymentmanagerprocessandsynchronizedouttolocalcopiesheldoneachofthenodes.
Intheaddressspacesusedfortheapplicationserver,thereisaconceptofcontainers,whichprovideruntimeseparationbetweenthevariouselementsthatexecute.
Asinglecontainer,knownasanEJBcontainer,isusedtorunEnterpriseJavaBeans.
Anothercontainer,knownastheWebcontainer,isusedtoexecuteWeb-relatedelementssuchasHTML,GIFfiles,servlets,andJavaserverpages(JSPs).
Together,theymakeuptheapplicationserverruntimewithintheJVM.
J2EEapplicationmodelonz/OSTheJ2EEApplicationModelonz/OSisexactlythesameasonotherplatforms.
TheJ2EEApplicationModelonz/OSfollowstheSDKspecification,exhibitingthefollowingqualities:vFunctional–satisfiesuserrequirementsvReliable–performsunderchangingconditionsvUsable–enableseasyaccesstoapplicationfunctionsvEfficient–usessystemresourceswiselyvMaintainable–canbemodifiedeasilyvPortable–canbemovedfromoneenvironmenttoanother.
WebSphereApplicationServeronz/OSsupportsfourmajormodelsofapplicationdesign:Web-basedcomputing,integratedenterprisecomputing,multithreadingdistributedbusinesscomputing,andservice-orientedcomputing.
Allthesedesignmodelsfocusonseparatingtheapplicationlogicfromtheunderlyinginfrastructure;thatis,thephysicaltopologyandexplicitaccesstotheinformationsystemaredistinctfromtheprogrammingmodelfortheapplication.
TheJ2EEprogrammingmodelsupportedbyWebSphereApplicationServerforz/OSmakesiteasiertobuildapplicationsfornewbusinessrequirementsbecauseitseparatesthedetailsfromtheunderlyinginfrastructure.
Itprovidesforthedeploymentofthecomponentandservice-orientedprogrammingmodelofferedbyJ2EE.
RunningWebSphereApplicationServeronz/OSWebSphereApplicationServerrunsasastandardsubsystemonz/OS.
Therefore,itinheritsallthecharacteristicsofmainframequalitiesandfunctionalitythataccompanythatplatform,suchasitsuniquecapacityforrunninghundredsofheterogeneousworkloadsconcurrently,andmeetingservicelevelobjectivesasdefinedbytheuser.
ConsolidationofworkloadsAmainframecanbeusedtoconsolidateworkloadsfrommanyindividualservers.
Therefore,ifthereisalargeadministrationoverheadoraphysicalcapacityconcernofmanyindividualservers,themainframecantakeontheroleofasingleserverenvironmentmanagingthoseworkloads.
Itcanpresentasingleviewofadministration,performanceandrecoveryforapplicationsthatharnessthemainframe'sservicesduringexecution.
Chapter3.
Web-basedworkloads33Severalapplicationserverscaneasilybemigratedintoonelogicalpartitionofamainframe'sresources,thusprovidingeaseofmanagementandmonitoring.
Consolidationalsoallowsforinstrumentationandmetricgathering,resultingineasiercapacityanalysis.
WebSphereforz/OSsecurityThecombinationofzSerieshardware-andsoftware-basedsecurity,alongwithincorporatedJ2EEsecurity,offerssignificantdefenseagainstpossibleintrusions.
Theproductsecurityisalayeredarchitecturebuiltontopoftheoperatingsystemplatform,theJavaVirtualMachine(JVM),andJava2security.
WebSphereApplicationServerforz/OSintegratesinfrastructureandmechanismstoprotectsensitiveJ2EEresourcesandadministrativeresourcesaddressingtheenterprisefromanend-to-endsecurityperspectivebasedonindustrystandards.
TheopenarchitecturepossessessecureconnectivityandinteroperabilitywithallmainframeEnterpriseInformationSystems,whichincludes:vCICSTransactionServer(TS)vDB2vLotusDominovIBMDirectoryWebSphereApplicationServerintegrateswithRACFandWebSEALSecureProxy(TrustedAssociationInterceptor),providingaunified,policy-basedandpermission-basedmodelforsecuringallWebresourcesandEnterpriseJavaBeancomponents,asdefinedintheJ2EEspecification.
ContinuousavailabilityandWebSphereApplicationServerforz/OSWebSphereforz/OSusesthezSeriesplatform'sinternalerrordetectionandcorrectioninternalcapabilities.
WebSphereforz/OShasrecoveryterminationmanagementthatdetects,isolates,correctsandrecoversfromsoftwareerrors.
WebSphereforz/OScandifferentiateandprioritizeworkbasedonservicelevelagreements.
Itoffersclusteringcapabilityaswellastheabilitytomakenon-disruptivechangestosoftwarecomponents,suchasresourcemanagers.
Inacriticalapplication,WebSphereforz/OScanimplementafailuremanagementfacilityofz/OScalledautomaticrestartmanagerorARM.
Thisfacilitycandetectapplicationfailures,andrestartserverswhenfailuresoccur.
WebSphereusesARMtorecoverapplicationservers(servants).
Eachapplicationserverrunningonaz/OSsystemisregisteredwithanARMrestartgroup.
WebSphereforz/OScanimplementafeaturecalledclustering.
ClusteringtechnologyisusedextensivelyinhighavailabilitysolutionsinvolvingWebSphere,asshowninFigure20onpage35.
Aclusterconsistsofmultiplecopiesofthesamecomponentwiththeexpectationthatatleastoneofthecopieswillbeavailabletoservicearequest.
Ingeneral,theclusterworksasaunitwherethereissomecollaborationamongtheindividualcopiestoensurethattherequestcanbedirectedtowardacopythatiscapableofservicingtherequest.
Designersofahighavailabilitysolutionparticipateinestablishingaservicelevelastheydeterminethenumberandplacementofindividualmembersofclusters.
WebSphereforz/OSprovidesmanagementforsomeoftheclustersneededto34OnlineWorkloadsforz/OScreatethedesiredservicelevel.
GreaterservicelevelsofavailabilitycanbeobtainedasWebSphereclustersaresupplementedwithadditionalclustertechnologies.
AWebSphereApplicationServerclusteriscomposedofindividualclustermembers,witheachmembercontainingthesamesetofapplications.
InfrontofaWebSphereApplicationServerclusterisaworkloaddistributor,whichroutestheworktoindividualmembers.
ClusterscanbeverticalwithinanLPAR(thatis,twoormoremembersresidinginaz/OSsystem)ortheycanbeplacedhorizontallyacrossLPARstoobtainthehighestavailabilityintheeventanLPARcontainingamemberhasanoutage.
Workloadinthiscasecanstillbetakenonfromtheremainingclustermembers.
Alsowithinthesetwoconfigurations,itispossibletohaveahybridinwhichtheclusteriscomposedofverticalandhorizontalmembers(seeFigure21onpage36).
WRKL523-0CRDaemonCRServerCSRz/OSsystemAPPCRDaemonCRServerASRCRServerBSRAPPInstallapplicationintoclusterthroughISPFHFSDeploymentmanagerz/OSsystemCRServerDSRAAPPCFSYSASYSBBrowserClusterserversBandDHFSClusterFigure20.
ClusteringofserversinacellChapter3.
Web-basedworkloads35Youmightwonderwhentouseverticalclusteringasopposedtohorizontalclustering.
Youmightuseverticalclusteringtocheckthedispatchingefficiencyofasinglesystem.
Inaverticalcluster,theserverscompetewitheachotherforresources.
PerformanceandWebSphereApplicationServerforz/OSPerformanceishighlydependentonapplicationdesignandcoding,regardlessofthepoweroftheruntimeplatform–adefectivelywrittenapplicationwillperformjustaspoorlyonz/OSasitwouldonanotherplatform.
Thatsaid,WebSphereApplicationServerforz/OSusesthemainframequalitiesinhardware,andsoftwarecharacteristicsincorporatingWorkloadManagementschemes,dynamicLPARconfiguration,andParallelSysplexfunctionality.
Specifically,WebSphereApplicationServerforz/OSusesthethreedistinctfunctionsofz/OSworkloadmanagement(WLM):vRoutingWLMroutingservicesareusedtodirectclientstoserversonaspecificsystembasedonmeasuringcurrentsystemutilization,knownasthePerformanceIndex(PI).
Figure21.
Verticalandhorizontalclusters36OnlineWorkloadsforz/OSvQueuingTheWLMqueuingserviceisusedtodispatchworkrequestsfromaControllerRegiontooneormoreServerRegions.
ItispossibleforaWorkManagertoregisterwithWLMasaQueuingManager.
ThistellsWLMthatthisserverwouldliketouseWLM-managedqueuestodirectworktootherservers,whichallowsWLMtomanageserverspacestoachievethespecifiedperformancegoalsestablishedforthework.
vPrioritizeTheapplicationserverprovidesforstartingandstoppingServerRegionstosetworkpriority.
ThisallowsWLMtomanageapplicationserverinstancesinordertoachievegoalsspecifiedbythebusiness.
WLMmaintainsaperformanceindex(PI)foreachserviceclassperiodtomeasurehowactualperformancevariesfromthegoal.
Becausethereareseveraltypesofgoals,WLMneedssomewayofcomparinghowwellorpoorlyworkinoneserviceclassisdoingcomparedtootherwork.
Aserviceclass(SC)isusedtodescribeagroupofworkwithinaworkloadwithequivalentperformancecharacteristics.
Applicationserverconfigurationonz/OSAnapplicationserverconfigurationonz/OSincludesbaseservernodeandtheNetworkDeploymentManager.
BaseservernodeThebaseapplicationservernodeisthesimplestoperatingstructureintheApplicationServerforz/OS.
Itconsistsofanapplicationserverandadaemonserver(onenodeandonecell),asshowninFigure22onpage38.
AlloftheconfigurationfilesanddefinitionsarekeptintheHFSdirectorystructurecreatedforthisbaseapplicationserver.
Thedaemonserverisaspecialserverwithonecontrollerregion.
ThesystemarchitectureofWebSphereforz/OScallsforonedaemonserverpercellpersystemorLPAR.
Eachbaseapplicationservernodecontainsadministrationforitsowncelldomainandaseparaterepositoryforitsconfiguration.
Therefore,youcanhavemanybaseapplicationservers,eachisolatedfromtheothers,havingtheirownadministrationpolicyfortheirspecificbusinessneeds.
Chapter3.
Web-basedworkloads37NetworkDeploymentManagerNetworkDeploymentManager(Figure23onpage39)isanextensiontothebaseapplicationserver.
Itallowsthesystemtoadministermultipleapplicationserversfromonecentralizedlocation.
Here,applicationserversareattachedtonodes,andmultiplenodesbelongtoacell.
WiththeDeploymentManager,horizontallyandverticallyscaledsystems,aswellasdistributedapplications,canbeeasilyadministered.
TheNetworkDeploymentManageralsomanagestherepositoriesoneachnode,performingsuchtasksascreating,maintaining,andremovingtherepositories.
Thesystemusesanextract/modifymethodtoupdatetheconfiguration.
Figure22.
Baseservernode38OnlineWorkloadsforz/OSWebSphereApplicationServerconnectorsforEnterpriseInformationSystemsTheabilityofapplicationstointerfacewithresourcesoutsideoftheapplicationserverprocessandtousethoseresourcesefficientlyhasalwaysbeenanimportantrequirement.
Equallyimportantistheabilityforvendorstoplugintheirownsolutionsforconnectingtoandusingtheirresources.
Anapplicationmightrequireaccesstomanytypesofresources,whichmayormaynotbelocatedinthesamemachineastheapplication.
Therefore,accesstoaresourcebeginswithaconnectionthatisapathwayfromanapplicationtoaresource,whichmightbeanothertransactionmanagerordatabasemanager.
Javaprogramaccesstoabroadrangeofback-endresourcesisperformedthrougharesourceadapter.
Thisisasystem-levelsoftwaredriverthatplugsintoanapplicationserverandenablesaJavaapplicationtoconnecttovariousback-endresources.
Thefollowingconsiderationsarecommontoallconnections:vCreatingaconnectioncanbeexpensive.
Settingupaconnectioncantakealongtimewhencomparedtotheamountoftimetheconnectionisactuallyused.
vConnectionsmustbesecure.
Thisisoftenajointeffortbetweentheapplicationandtheserverworkingwiththeresource.
vConnectionsmustperformwell.
Performancecanbecriticaltothesuccessofanapplication,anditisafunctionoftheapplication'soverallperformance.
vConnectionsmustbemonitorableandhavegooddiagnostics.
Thequalityofthediagnosticsforaconnectiondependsontheinformationregardingthestatusoftheserverandtheresource.
vMethodsforconnectingtoandworkingwitharesource.
Differentdatabasearchitecturesrequiredifferentmeansforaccessfromanapplicationserver.
Figure23.
NetworkDeploymentManagerChapter3.
Web-basedworkloads39vQualityofservice,whichbecomesafactorwhenaccessingresourcesoutsideoftheapplicationserver.
TheapplicationmightrequiretheACID(Atomicity,Consistency,Isolation,andDurability)propertiesthatcanbeobtainedwhenusingdatainmanagingatransaction.
Enterpriseresourcesareoftenolderresourcesthatweredevelopedovertimebyabusinessandareexternaltotheapplicationserverprocess.
Eachtypeofresourcehasitsownconnectionprotocolandproprietarysetofinterfacestotheresource.
Therefore,theresourcehastobeadaptedinorderforittobeaccessiblefromaJVMprocessascontainedinanapplicationserver.
WebSphereApplicationServerhasfacilitiestointerfacewithotherz/OSsubsystemssuchasCICS,DB2andIMS.
Thisisdonethrougharesourceadapterandaconnector.
Accessingback-endEnterpriseInformationSystems(EIS)extendsthefunctionalityoftheapplicationserverintoexistingbusinessfunctions,providingenhancedcapabilities.
TheJ2EEConnectorArchitecturedefinesthecontractsbetweentheapplication,theconnector,andtheapplicationserverwheretheapplicationisdeployed.
Theapplicationhasacomponentcalledtheresourceadapter.
Thisiscontainedwithintheapplicationcodehandlingtheinterfacetotheconnectorwhichtheapplicationdevelopercreates.
Fromaprogrammingperspective,thismeansthatprogrammerscanuseasingleunifiedinterfacetoobtaindatafromtheEIS.
TheresourceadapterwillsortoutthedifferentelementsandprovideaprogrammingmodelthatisindependentoftheactualEISbehaviorandcommunicationrequirements.
Figure24.
BasicarchitectureofaconnectortoanEIS40OnlineWorkloadsforz/OSJavaConnectorArchitecture(JCA)isastandardthatprovidesauniformmethodfortalkingtodifferentkindsofEISsystemsfromanapplicationserver.
JCAisdesignedtofacilitatesharingofdataandtointegratenewJ2EEapplicationswithlegacyorotherheterogeneoussystems.
WebSphereforz/OSsupportsanyJCA-compliantresourceadapters,butdoesnotprovideanyofitsown,withtheexceptionsofthebuilt-inJMSadapter,andtherelationalresourceadapterfordatabasemanagementsystems,suchasDB2.
z/OSWebapplicationconnectorsWebapplicationsonz/OScanuseconnectorstoaccessdatainvariousmainframemiddlewareproducts.
Thistopicbrieflydescribesthefollowingcommonlyusedconnectors,whichareusedtoaccessdatainCICS,IMS,andDB2:vCICSTransactionGatewayvIMSConnectvDB2JDBC.
CICSTransactionGatewayCustomerInformationControlSystem(CICS)hastheCICSTransactionGateway(CTG)toconnectfromtheapplicationservertoCICS.
CTGprovidestheinterfacebetweenJavaandCICSapplicationtransactions.
ItisasetofclientandserversoftwarecomponentsincorporatingtheservicesandfacilitiestoaccessCICSfromtheapplicationserver.
CTGusesspecialAPIsandprotocolsinservletsorEJBstorequestservicesandfunctionsoftheCICSTransactionManager.
IMSConnectTheintegratedIMSConnectfunctionofIMSprovidesaccesstobothIMSDBandIMSTMfromTCP/IP-enabledenvironments.
ForafulldescriptionofIMSConnect,see"IMSConnectandTCP/IPcommunications"athttp://publib.
boulder.
ibm.
com/infocenter/dzichelp/v2r2/index.
jsptopic=/com.
ibm.
ims10.
doc.
ccg/ccg_part_tcpip.
htmDB2JDBCJDBCisanapplicationprogramminginterface(API)thatJavaapplicationsusetoaccessrelationaldatabases.
IBMdataserversupportforJDBCletsyouwriteJavaapplicationsthataccesslocalDB2forz/OSdataorremoterelationaldataonaserverthatsupportsDRDA.
AccordingtotheJDBCspecification,therearefourtypesofdrivers.
TheDB2forz/OSproductincludessupportfortwotypesofJDBCdriverarchitecture.
vType2DriversthatarewrittenpartlyintheJavaprogramminglanguageandpartlyinnativecode.
Thedriversuseanativeclientlibraryspecifictothedatasourcetowhichtheyconnect.
Becauseofthenativecode,theirportabilityislimited.
vType4DriversthatarepureJavaandimplementthenetworkprotocolforaspecificdatasource.
Theclientconnectsdirectlytothedatasource.
Chapter3.
Web-basedworkloads41DB2forz/OSsupportstheIBMDataServerDriverforJDBCandSQLJ,whichisasingledriverthatcombinestype2andtype4JDBCimplementations.
Thedriverispackagedinthefollowingway:vdb2jcc.
jarandsqlj.
zipforJDBC3.
0andearliersupportvdb2jcc4.
jarandsqlj4.
zipforJDBC4.
0andlater,andJDBC3.
0andearliersupportYoucontrolthelevelofJDBCsupportthatyouwantbyspecifyingtheappropriatesetoffilesintheCLASSPATH.
IntroductiontoWebSphereMQIBMWebSphereMQfacilitatesapplicationintegrationbypassingmessagesbetweenapplicationsandWebservices.
Itisusedonmorethan35hardwareplatformsandforpoint-to-pointmessagingfromJava,C,C++andCOBOLapplications.
MostlargeorganizationstodayhaveaninheritanceofITsystemsfromvariousmanufacturers,whichoftenmakesitdifficulttosharecommunicationsanddataacrosssystems.
Manyoftheseorganizationsalsoneedtocommunicateandsharedataelectronicallywithsuppliersandcustomers–whomighthaveotherdisparatesystems.
Itwouldbehandytohaveamessagehandlingtoolthatcouldreceivefromonetypeofsystemandsendtoanothertype.
Wheredataheldondifferentdatabasesondifferentsystemsmustbekeptsynchronized,littleisavailableinthewayofprotocolstocoordinateupdatesanddeletionsandsoon.
Mixedenvironmentsaredifficulttokeepaligned;complexprogrammingisoftenrequiredtointegratethem.
Messagequeues,andthesoftwarethatmanagesthem,suchasIBMWebSphereMQforz/OS,enableprogram-to-programcommunication.
Inthecontextofonlineapplications,messagingandqueuingcanbeunderstoodasfollows:vMessagingmeansthatprogramscommunicatebysendingeachothermessages(data),ratherthanbycallingeachotherdirectly.
vQueuingmeansthatthemessagesareplacedonqueuesinstorage,sothatprogramscanrunindependentlyofeachother,atdifferentspeedsandtimes,indifferentlocations,andwithouthavingalogicalconnectionbetweenthem.
WebSphereMQsynchronouscommunicationAfigureshowsthebasicmechanismofprogram-to-programcommunicationusingasynchronouscommunicationmodel.
InFigure25onpage43,programApreparesamessageandputsitonQueue1.
ProgramBgetsthemessagefromQueue1andprocessesit.
BothProgramAandProgramBuseanapplicationprogramminginterface(API)toputmessagesonaqueueandgetmessagesfromaqueue.
TheWebSphereMQAPIiscalledtheMessageQueueInterface(MQI).
WhenProgramAputsamessageonQueue1,ProgramBmightnotberunning.
ThequeuestoresthemessagesafelyuntilProgramBstartsandisreadytogetthemessage.
Likewise,atthetimeProgramBgetsthemessagefromQueue1,ProgramAmightnolongerberunning.
Usingthismodel,thereisnorequirementfortwoprogramscommunicatingwitheachothertobeexecutingatthesametime.
42OnlineWorkloadsforz/OSThereisclearlyadesignissue,however,abouthowlongProgramAshouldwaitbeforecontinuingwithotherprocessing.
Thisdesignmightbedesirableinsomesituations,butwhenthewaitistoolong,itisnotsodesirableanymore.
Asynchronouscommunicationisdesignedtohandlethosesituations.
WebSphereMQasynchronouscommunicationAfigureshowsthebasicmechanismofprogram-to-programcommunicationusinganasynchronouscommunicationmodel.
Usingtheasynchronousmodel,ProgramAputsmessagesonQueue1forProgramBtoprocess,butitisProgramC,actingasynchronouslytoProgramA,whichgetstherepliesfromQueue2andprocessesthem.
Typically,ProgramAandProgramCwouldbepartofthesameapplication.
YoucanseetheflowofthisactivityinFigure26onpage44.
Figure25.
SynchronousapplicationdesignmodelChapter3.
Web-basedworkloads43TheasynchronousmodelisnaturalforWebSphereMQ.
ProgramAcancontinuetoputmessagesonQueue1andisnotblockedbyhavingtowaitforareplytoeachmessage.
ItcancontinuetoputmessagesonQueue1evenifProgramBfails.
Ifso,Queue1storesthemessagessafelyuntilProgramBisrestarted.
Inavariationoftheasynchronousmodel,ProgramAcouldputasequenceofmessagesonQueue1,optionallycontinuewithsomeotherprocessing,andthenreturntogetandprocesstherepliesitself.
ThispropertyofWebSphereMQ,inwhichcommunicatingapplicationsdonothavetobeactiveatthesametime,isknownastimeindependence.
WebSphereMQmessagetypesWebSphereMQusesfourtypesofmessages.
DatagramAmessageforwhichnoresponseisexpected.
RequestAmessageforwhichareplyisrequested.
ReplyAreplytoarequestmessage.
ReportAmessagethatdescribesaneventsuchastheoccurrenceofanerrororaconfirmationonarrivalordelivery.
WebSphereMQmessagequeuesandthequeuemanagerAmessagequeueisusedtostoremessagessentbyprograms.
Theyaredefinedasobjectsbelongingtothequeuemanager.
Figure26.
Asynchronousapplicationdesignmodel44OnlineWorkloadsforz/OSWhenanapplicationputsamessageonaqueue,thequeuemanagerensuresthatthemessageis:vStoredsafelyvIsrecoverablevIsdeliveredonce,andonceonly,tothereceivingapplication.
Thisistrueevenifamessagehastobedeliveredtoaqueueownedbyanotherqueuemanager,andisknownastheassureddeliverypropertyofWebSphereMQ.
QueuemanagerThecomponentofsoftwarethatownsandmanagesqueuesiscalledaqueuemanager(QM).
InWebSphereMQ,themessagequeuemanageriscalledtheMQM,anditprovidesmessagingservicesforapplications,ensuresthatmessagesareputinthecorrectqueue,routesmessagestootherqueuemanagers,andprocessesmessagesthroughacommonprogramminginterfacecalledtheMessageQueueInterface(MQI).
Thequeuemanagercanretainmessagesforfutureprocessingintheeventofapplicationorsystemoutages.
MessagesareretainedinaqueueuntilasuccessfulcompletionresponseisreceivedthroughtheMQI.
Therearesimilaritiesbetweenqueuemanagersanddatabasemanagers.
Queuemanagersownandcontrolqueuessimilartothewaythatdatabasemanagersownandcontroltheirdatastorageobjects.
Theyprovideaprogramminginterfacetoaccessdata,andalsoprovidesecurity,authorization,recoveryandadministrativefacilities.
Therearealsoimportantdifferences,however.
Databasesaredesignedtoprovidelong-timedatastoragewithsophisticatedsearchmechanisms,whereasqueuesarenotdesignedforthis.
Amessageonaqueuegenerallyindicatesthatabusinessprocessisincomplete;itmightrepresentanunsatisfiedrequest,anunprocessedreply,oranunreadreport.
TypesofmessagequeuesSeveraltypesofmessagequeuesexist.
Inthistext,themostrelevantarethefollowing:vLocalqueueAqueueislocalifitisownedbythequeuemanagertowhichtheapplicationprogramisconnected.
Itisusedtostoremessagesforprogramsthatusethesamequeuemanager.
Theapplicationprogramdoesn'thavetorunonthesamemachineasthequeuemanager.
vRemotequeueAqueueisremoteifitisownedbyadifferentqueuemanager.
Aremotequeueisnotarealqueue;itisonlythedefinitionofaremotequeuetothelocalqueuemanager.
Programscannotreadmessagesfromremotequeues.
Remotequeuesareassociatedwithatransmissionqueue.
vTransmissionqueueThislocalqueuehasaspecialpurpose:itisusedasanintermediatestepwhensendingmessagestoqueuesthatareownedbyadifferentqueuemanager.
Transmissionqueuesaretransparenttotheapplication;thatis,theyareusedinternallybythequeuemanagerinitiationqueue.
Chapter3.
Web-basedworkloads45Thisisalocalqueuetowhichthequeuemanagerwrites(transparentlytotheprogrammer)atriggermessagewhencertainconditionsaremetonanotherlocalqueue,forexample,whenamessageisputintoanemptymessagequeueorinatransmissionqueue.
TwoWebSphereMQapplicationsmonitorinitiationqueuesandreadtriggermessages,thetriggermonitorandthechannelinitiator.
Thetriggermanagercanstartapplications,dependingonthemessage.
Thechannelinitiatorstartsthetransmissionbetweenqueuemanagers.
vDead-letterqueueAqueuemanager(QM)mustbeabletohandlesituationswhenitcannotdeliveramessage,forexample:–Destinationqueueisfull.
–Destinationqueuedoesnotexist.
–Messageputshavebeeninhibitedonthedestinationqueue.
–Senderisnotauthorizedtousethedestinationqueue.
–Messageistoolarge.
–Messagecontainsaduplicatemessagesequencenumber.
Whenoneoftheseconditionsoccurs,themessageiswrittentothedead-letterqueue.
Thisqueueisdefinedwhenthequeuemanageriscreated,andeachQMshouldhaveone.
Itisusedasarepositoryforallmessagesthatcannotbedelivered.
WhatisaWebSphereMQchannelAchannelisalogicalcommunicationlink.
Theconversationalstyleofprogram-to-programcommunicationrequirestheexistenceofacommunicationsconnectionbetweeneachpairofcommunicatingapplications.
Channelsshieldapplicationsfromtheunderlyingcommunicationsprotocols.
WebSphereMQusestwokindsofchannels:vMessagechannelAmessagechannelconnectstwoqueuemanagersthroughmessagechannelagents(MCAs).
Amessagechannelisunidirectional,comprisedoftwomessagechannelagents(asenderandareceiver)andacommunicationprotocol.
AnMCAtransfersmessagesfromatransmissionqueuetoacommunicationlink,andfromacommunicationlinktoatargetqueue.
Forbidirectionalcommunication,itisnecessarytodefineapairofchannels,consistingofasenderandareceiver.
vMQIchannelAnMQIchannelconnectsaWebSphereMQclienttoaqueuemanager.
Clientsdonothaveaqueuemanageroftheirown.
AnMQIchannelisbidirectional.
HowWebSphereMQensurestransactionalintegrityAbusinessmightrequiretwoormoredistributeddatabasestobemaintainedinstep.
WebSphereMQoffersasolutioninvolvingmultipleunitsofworkactingasynchronously.
ThetophalfofFigure27onpage47showsatwo-phasecommitstructure,whiletheWebSphereMQsolutionisshowninthelowerhalf,asfollows:vThefirstapplicationwritestoadatabase,placesamessageonaqueue,andissuesasyncpointtocommitthechangestothetworesources.
Themessagecontainsdatawhichistobeusedtoupdateaseconddatabaseonaseparatesystem.
Becausethequeueisaremotequeue,themessagegetsnofurtherthan46OnlineWorkloadsforz/OSthetransmissionqueuewithinthisunitofwork.
Whentheunitofworkiscommitted,themessagebecomesavailableforretrievalbythesendingMCA.
vInthesecondunitofwork,thesendingMCAgetsthemessagefromthetransmissionqueueandsendsittothereceivingMCAonthesystemwiththeseconddatabase,andthereceivingMCAplacesthemessageonthedestinationqueue.
ThisisperformedreliablybecauseoftheassureddeliverypropertyofWebSphereMQ.
Whenthisunitofworkiscommitted,themessagebecomesavailableforretrievalbythesecondapplication.
vInthethirdunitofwork,thesecondapplicationgetsthemessagefromthedestinationqueueandupdatesthedatabaseusingthedatacontainedinthemessage.
Itisthetransactionalintegrityofunitsofwork1and3,andtheonceandonceonly,assureddeliverypropertyofWebSphereMQusedinunitofwork2,whichensurestheintegrityofthecompletebusinesstransaction.
Ifthebusinesstransactionisamorecomplexone,manyunitsofworkmaybeinvolved.
ExampleofmessagingandqueuinginWebSphereMQNowlet'sreturntotheearlierexampleofatravelagencytoseehowmessagingfacilitiesplayaroleinbookingavacation.
Assumethatthetravelagentmustreserveaflight,ahotelroom,andarentalcar.
Allofthesereservationsmustsucceedbeforetheoverallbusinesstransactioncanbeconsideredcomplete.
WithamessagequeuemanagersuchasWebSphereMQ,theapplicationcansendseveralrequestsatonce;itneednotwaitforareplytoonerequestbeforesendingthenext.
Amessageisplacedoneachofthreequeues,servingtheflightreservationsapplication,thehotelreservationsapplication,andthecarrentalapplication.
EachapplicationcanthenperformitsrespectivetaskinparallelwithFigure27.
DataintegrityChapter3.
Web-basedworkloads47theothertwoandplaceareplymessageonthereply-toqueue.
Theagent'sapplicationwaitsfortheserepliesandproducesaconsolidatedanswerforthetravelagent.
Designingthesysteminthiswaycanimprovetheoverallresponsetime.
Althoughtheapplicationmightnormallyprocesstherepliesonlywhentheyhaveallbeenreceived,theprogramlogicmayalsospecifywhattodowhenonlyapartialsetofrepliesisreceivedwithinagivenperiodoftime.
InterfacingwithCICS,IMS,batch,orTSO/EinWebSphereMQWebSphereMQisavailableforavarietyofplatforms.
WebSphereMQforz/OSincludesseveraladapterstoprovidemessagingandqueuingsupportfor:vCICS:theWebSphereMQ-CICSbridgevIMS:theWebSphereMQ-IMSbridgevBatchorTSO/E.
Figure28.
Parallelprocessing48OnlineWorkloadsforz/OSNoticesThisinformationwasdevelopedforproductsandservicesofferedintheU.
S.
A.
IBMmaynotoffertheproducts,services,orfeaturesdiscussedinthisdocumentinothercountries.
ConsultyourlocalIBMrepresentativeforinformationontheproductsandservicescurrentlyavailableinyourarea.
AnyreferencetoanIBMproduct,program,orserviceisnotintendedtostateorimplythatonlythatIBMproduct,program,orservicemaybeused.
Anyfunctionallyequivalentproduct,program,orservicethatdoesnotinfringeanyIBMintellectualpropertyrightmaybeusedinstead.
However,itistheuser'sresponsibilitytoevaluateandverifytheoperationofanynon-IBMproduct,program,orservice.
IBMmayhavepatentsorpendingpatentapplicationscoveringsubjectmatterdescribedinthisdocument.
Thefurnishingofthisdocumentdoesnotgrantyouanylicensetothesepatents.
Youcansendlicenseinquiries,inwriting,to:IBMDirectorofLicensingIBMCorporationNorthCastleDriveArmonk,NY10504-1785U.
S.
A.
Forlicenseinquiriesregardingdouble-byte(DBCS)information,contacttheIBMIntellectualPropertyDepartmentinyourcountryorsendinquiries,inwriting,to:IBMWorldTradeAsiaCorporationLicensing2-31Roppongi3-chome,Minato-kuTokyo106,JapanThefollowingparagraphdoesnotapplytotheUnitedKingdomoranyothercountrywheresuchprovisionsareinconsistentwithlocallaw:INTERNATIONALBUSINESSMACHINESCORPORATIONPROVIDESTHISPUBLICATION"ASIS"WITHOUTWARRANTYOFANYKIND,EITHEREXPRESSORIMPLIED,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFNON-INFRINGEMENT,MERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE.
Somestatesdonotallowdisclaimerofexpressorimpliedwarrantiesincertaintransactions,therefore,thisstatementmaynotapplytoyou.
Thisinformationcouldincludetechnicalinaccuraciesortypographicalerrors.
Changesareperiodicallymadetotheinformationherein;thesechangeswillbeincorporatedinneweditionsofthepublication.
IBMmaymakeimprovementsand/orchangesintheproduct(s)and/ortheprogram(s)describedinthispublicationatanytimewithoutnotice.
Anyreferencesinthisinformationtonon-IBMWebsitesareprovidedforconvenienceonlyanddonotinanymannerserveasanendorsementofthoseWebsites.
ThematerialsatthoseWebsitesarenotpartofthematerialsforthisIBMproductanduseofthoseWebsitesisatyourownrisk.
CopyrightIBMCorp.
2006,201049IBMmayuseordistributeanyoftheinformationyousupplyinanywayitbelievesappropriatewithoutincurringanyobligationtoyou.
Licenseesofthisprogramwhowishtohaveinformationaboutitforthepurposeofenabling:(i)theexchangeofinformationbetweenindependentlycreatedprogramsandotherprograms(includingthisone)and(ii)themutualuseoftheinformationwhichhasbeenexchanged,shouldcontact:IBMCorporationMailStationP3002455SouthRoadPoughkeepsie,NY12601-5400U.
S.
A.
Suchinformationmaybeavailable,subjecttoappropriatetermsandconditions,includinginsomecases,paymentofafee.
ThelicensedprogramdescribedinthisdocumentandalllicensedmaterialavailableforitareprovidedbyIBMundertermsoftheIBMCustomerAgreement,IBMInternationalProgramLicenseAgreementoranyequivalentagreementbetweenus.
Thisinformationcontainsexamplesofdataandreportsusedindailybusinessoperations.
Toillustratethemascompletelyaspossible,theexamplesincludethenamesofindividuals,companies,brands,andproducts.
Allofthesenamesarefictitiousandanysimilaritytothenamesandaddressesusedbyanactualbusinessenterpriseisentirelycoincidental.
COPYRIGHTLICENSE:Thisinformationcontainssampleapplicationprogramsinsourcelanguage,whichillustrateprogrammingtechniquesonvariousoperatingplatforms.
Youmaycopy,modify,anddistributethesesampleprogramsinanyformwithoutpaymenttoIBM,forthepurposesofdeveloping,using,marketingordistributingapplicationprogramsconformingtotheapplicationprogramminginterfacefortheoperatingplatformforwhichthesampleprogramsarewritten.
Theseexampleshavenotbeenthoroughlytestedunderallconditions.
IBM,therefore,cannotguaranteeorimplyreliability,serviceability,orfunctionoftheseprograms.
ProgramminginterfaceinformationThispublicationdocumentsinformationthatisNOTintendedtobeusedasProgrammingInterfacesofz/OS.
TrademarksIBM,theIBMlogo,andibm.
comaretrademarksorregisteredtrademarksofInternationalBusinessMachinesCorporationintheUnitedStates,othercountries,orboth.
IftheseandotherIBMtrademarkedtermsaremarkedontheirfirstoccurrenceinthisinformationwithatrademarksymbol(or),thesesymbolsindicateU.
S.
registeredorcommonlawtrademarksownedbyIBMatthetimethisinformationwaspublished.
Suchtrademarksmayalsoberegisteredorcommonlawtrademarksinothercountries.
AcurrentlistofIBMtrademarksisavailableontheWebat"Copyrightandtrademarkinformation"athttp://www.
ibm.
com/legal/copytrade.
shtml50OnlineWorkloadsforz/OSJavaandallJava-basedtrademarksandlogosaretrademarksofSunMicrosystems,Inc.
intheUnitedStates,othercountries,orboth.
UNIXisaregisteredtrademarkofTheOpenGroupintheUnitedStatesandothercountries.
Othercompany,product,orservicenamesmaybetrademarksorservicemarksofothers.
Notices5152OnlineWorkloadsforz/OSPrintedinUSA

RAKsmartCloud服务器,可自定义配置月$7.59

RAKsmart商家一直以来在独立服务器、站群服务器和G口和10G口大端口流量服务器上下功夫比较大,但是在VPS主机业务上仅仅是顺带,尤其是我们看到大部分主流商家都做云服务器,而RAKsmart商家终于开始做云服务器,这次试探性的新增美国硅谷机房一个方案。月付7.59美元起,支持自定义配置,KVM虚拟化,美国硅谷机房,VPC网络/经典网络,大陆优化/精品网线路,支持Linux或者Windows操作...

RAKsmart裸机云/云服务器/VPS全场7折,独立服务器限量秒杀$30/月起

适逢中国农历新年,RAKsmart也发布了2月促销活动,裸机云、云服务器、VPS主机全场7折优惠,新用户注册送10美元,独立服务器每天限量秒杀最低30.62美元/月起,美国洛杉矶/圣何塞、日本、香港站群服务器大量补货,1-10Gbps大带宽、高IO等特色服务器抄底价格,机器可选大陆优化、国际BGP、精品网及CN2等线路,感兴趣的朋友可以持续关注下。裸机云新品7折,秒杀产品5台/天优惠码:Bare-...

raksmart:年中大促,美国物理机$30/月甩卖;爆款VPS仅月付$1.99;洛杉矶/日本/中国香港多IP站群$177/月

RAKsmart怎么样?RAKsmart发布了2021年中促销,促销时间,7月1日~7月31日!,具体促销优惠整理如下:1)美国西海岸的圣何塞、洛杉矶独立物理服务器低至$30/月(续费不涨价)!2)中国香港大带宽物理机,新品热卖!!!,$269.23 美元/月,3)站群服务器、香港站群、日本站群、美国站群,低至177美元/月,4)美国圣何塞,洛杉矶10G口服务器,不限流量,惊爆价:$999.00,...

ylmfos4.0为你推荐
microcenter美国哪里可以买插头转换器刘祚天DJ这个职业怎么样?www.mywife.ccMywife-No 00357 MANAMI SAITO种子下载地址有么?求好心人给ip查询器查看自己IP的指令广告法请问违反了广告法,罚款的标准是什么梦遗姐我姐姐很漂亮,她24了,我才15,晚上我和他睡在一起,我经常挨遗精,咋办?铂金血痕花开易见落难寻,阶前愁杀葬花人;独把花锄偷洒泪,洒上空枝见血痕。是什么意思干支论坛天干地支常识?酒仙琐事如何才能成为酒仙chudian365舒思盾按摩器怎么样用起像触电
asp主机空间 动态ip的vps 免费二级域名申请 日本软银 堪萨斯服务器 omnis 10t等于多少g vmsnap3 payoneer typecho 合肥鹏博士 骨干网络 有奖调查 免费个人空间 789电视网 qq对话框 河南移动网 中国网通测速 免费网页申请 流媒体加速 更多