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

虎跃云-物理机16H/32G/50M山东枣庄高防BGP服务器低至550元每月!

虎跃科技怎么样?虎跃科技(虎跃云)是一家成立于2017年的国内专业服务商,专业主营云服务器和独立服务器(物理机)高防机房有着高端华为T级清洗能力,目前产品地区有:山东,江苏,浙江等多地区云服务器和独立服务器,今天虎跃云给大家带来了优惠活动,为了更好的促销,枣庄高防BGP服务器最高配置16核32G仅需550元/月,有需要的小伙伴可以来看看哦!产品可以支持24H无条件退款(活动产品退款请以活动规则为准...

小渣云(36元/月)美国VPS洛杉矶 8核 8G

小渣云 做那个你想都不敢想的套餐 你现在也许不知道小渣云 不过未来你将被小渣云的产品所吸引小渣云 专注于一个套餐的商家 把性价比 稳定性 以及价格做到极致的商家,也许你不相信36元在别人家1核1G都买不到的价格在小渣云却可以买到 8核8G 高配云服务器,并且在安全性 稳定性 都是极高的标准。小渣云 目前使用的是美国超级稳定的ceranetworks机房 数据安全上 每5天备份一次数据倒异地 支持一...

妮妮云(30元),美国300G防御 2核4G 107.6元,美国高速建站 2核2G

妮妮云的来历妮妮云是 789 陈总 张总 三方共同投资建立的网站 本着“良心 便宜 稳定”的初衷 为小白用户避免被坑妮妮云的市场定位妮妮云主要代理市场稳定速度的云服务器产品,避免新手购买云服务器的时候众多商家不知道如何选择,妮妮云就帮你选择好了产品,无需承担购买风险,不用担心出现被跑路 被诈骗的情况。妮妮云的售后保证妮妮云退款 通过于合作商的友好协商,云服务器提供2天内全额退款,超过2天不退款 物...

ylmfos4.0为你推荐
kaixin.com开心网。www.kaixin.com是什么时间出来的。广东GDP破10万亿想知道广东城市的GDP排名同ip网站查询同ip地址站点查询 我本地怎么查询不了rawtools照片上面的RAW是什么意思,为什么不能到PS中去编辑长尾关键词挖掘工具大家是怎么挖掘长尾关键词的?777k7.comwww.777tk.com.怎么打不 开partnersonline国内有哪些知名的ACCA培训机构www4399com4399小游戏 请记住本站网站 4399.urlwww.gogo.com祺笑化瘀祛斑胶囊效果。www.k8k8.com谁能给我几个街污网站我去自己学
哈尔滨服务器租用 如何注册网站域名 如何查询ip地址 私人服务器 网页背景图片 标准机柜尺寸 湖南服务器托管 个人空间申请 ca4249 什么是刀片服务器 合租空间 赞助 91vps 免费吧 美国堪萨斯 学生服务器 阿里云邮箱登陆 稳定空间 如何登陆阿里云邮箱 免备案cdn加速 更多