IBMOperationalDecisionManagerVersion8Release0GettingStartedTutorialsNoteBeforeusingthisinformationandtheproductitsupports,readtheinformationin"Notices"onpage35.
Thiseditionappliestoversion8,release5,modification1ofOperationalDecisionManagerandtoallsubsequentreleasesandmodificationsuntilotherwiseindicatedinneweditions.
CopyrightIBMCorporation2008,2012.
USGovernmentUsersRestrictedRights–Use,duplicationordisclosurerestrictedbyGSAADPScheduleContractwithIBMCorp.
ContentsTutorials1Tutorial:Creatingacopybook-basedrulesetforzRuleExecutionServerforz/OS1Beforeyoustart2Task1:Importinganexistingruleproject.
.
.
.
4Task2:GeneratingaXOMfromaCOBOLcopybook5Task3:CreatingaBOMfromtheCOBOLXOM.
6Task4:Declaringrulesetparameters7Task5:AddingBOMmethodsandmappingthemtotheXOM.
8Task6:Creatingaruleflow10Task7:Writingactionrules11Task8:Preparingforruleexecution13Step1:CreateaRuleAppproject13Step2:DeploytheXOMandRuleApptozRuleExecutionServerforz/OS13Step3:Viewthedeployedartifacts.
.
.
.
14Task9:BuildingyourCOBOLapplication.
.
.
14Task10:ExecutingtheCOBOLprogram.
.
.
.
15Tutorial:SharingaBOMbetweenJavaandCOBOLapplications15Beforeyoustart16Task1:Importinganexistingruleproject.
.
.
17Task2:ConfiguringtheBOMforCOBOLcopybookgeneration18Task3:CreatingaRuleAppproject19Task4:DeployingtheXOMandRuleApp.
.
.
20Task5:BuildingyourCOBOLapplication.
.
.
20Task6:ExecutingtheCOBOLapplication.
.
.
21Tutorial:GeneratingCOBOLcodefromacopybook-basedruleproject21Beforeyoustart22Task1:Importinganexistingruleproject.
.
.
24Task2:GeneratingaXOMfromaCOBOLcopybook25Task3:CreatingaBOMfromtheCOBOLXOM25Task4:Declaringrulesetparameters26Task5:ImplementingBOMmethodsinCOBOL27Task6:Creatingaruleflow30Task7:Writingactionrules31Task8:Preparingforruleexecution32DecisionCentertutorials34Notices35Trademarks37Index39CopyrightIBMCorp.
2008,2012iiiivIBMOperationalDecisionManager:GettingStartedTutorialsTutorialsDevelopyourtechnicalskillswithtutorialsforOperationalDecisionManagerforz/OS.
TutorialsinstalledwithDecisionServerRulesonadistributedplatformalsodemonstratesomefeaturesthatareapplicabletotheRuleExecutionServerruntimeonz/OS.
TheDecisionServerRulestutorialsarepre-configuredtorunonthesampleserver.
However,thesameusertasksarerelevantwhenyoudeployyourrulestoz/OS,andadministerRuleExecutionServeronWebSphereApplicationServerforz/OS.
Therefore,thefollowingtutorialsandtaskscanbeofinteresttoyou.
Note:Youcaninstallthesampleserveronadistributedplatformandfollowthetutorialsonthatcomputer.
YoucandeploythetutorialapplicationsonaninstanceofWebSphereApplicationServerforz/OSandfollowthetasksthatapplytobothenvironments,oryoucansimplyreadthedocumentationtounderstandthetasksandfindoutwhatstepsareinvolved.
Table1.
TutorialsunderDecisionServerRulesthatarealsorelevantonz/OSTutorialTasksManagingRuleAppsTask1(Steps2-5),Task3,andTask4ExecutingahostedtransparentdecisionserviceonJavaTasks2-7DebuggingaremoteRuleExecutionServerapplicationTasks1-4ThefollowingtutorialsarespecifictoDecisionServerforz/OS.
Tutorial:Creatingacopybook-basedrulesetforzRuleExecutionServerforz/OSInRuleDesigner,youcanuseaCOBOLcopybookasthebasisforyourXOM,anddeployyourrulesettozRuleExecutionServerforz/OSsothatyoucanexecuteitfromaCOBOLapplication.
WhatyouwilllearnAfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
Inthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedreszminiloanIfyoualreadyhavearuleprojectnamedreszminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddtworulepackages:eligibilityandvalidationCopyrightIBMCorp.
2008,20121vAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andmapthemtotheXOMvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvDeployyourrulesforruleexecutioninaCOBOLapplicationonz/OSTimerequiredThistutorialtakesaboutonehourtocomplete.
BeforeyoustartInthistopic,findoutwhatyouneedtoknowbeforeyoustartthetutorial.
RuleDesignerprovidesfeaturesthatyoucanusetoabstractCOBOLdatastructurestoaBusinessObjectModel(BOM).
WithaBOM,youcanwriterulesinmorenaturallanguagethanyoucanusingtheCOBOLstructuresandnamingdirectly.
AfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
ThecompanywantstosharerulescontainedintheCOBOLapplicationwithotherbusinessapplications,andmanagethechangesmadetotheserules.
ThecompanydecidestomigratethebusinesslogictoaBRMSbyprioritizingthemostcommonlysharedrules.
Therulesthatarechosendefinecustomereligibility.
Thissetofrulescalculatestheincomeverificationandminimumcreditamount.
Duringexecution,therulespassamessagetothemainprogramtonotifytheresultoftheinitialvalidation.
Inareallifescenario,youidentifyorcreateaCOBOLcopybookcontainingtheCOBOLdataitemsrequiredforthebusinessrules.
Youthenusethiscopybookasabasisforcreatingyourexecutionobjectmodel(XOM).
Inthistutorial,youusethesampleCOBOLcopybookprovided,HBRLDAT1.
cpy.
TheHBRLDAT1.
cpycopybookcontainsthefollowingdataitems:01Borrower.
05namePICX(20).
05creditScorePIC9(10).
05yearlyIncomePIC9(10).
05agePIC9(3).
88teenagerVALUE0THRU17.
88adultVALUE18THRU60.
88retiredVALUE61THRU150.
01Loan.
05amountPIC9(10).
05yearlyInterestRatePIC99.
05yearlyRepaymentPIC9(10).
05effectDatePICX(8).
05approvedPICX.
05messageCountPIC9(2).
05messagesPICX(60)OCCURS0TO99TIMESDEPENDINGONmessageCount.
Fromthiscopybook,youwillgeneratearulesettobedeployedonzRuleExecutionServerforz/OS.
2IBMOperationalDecisionManager:GettingStartedTutorialsStartthistutorial:"Task1:Importinganexistingruleproject"onpage4.
WhatyouwilllearnAfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
Inthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedreszminiloanIfyoualreadyhavearuleprojectnamedreszminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddtworulepackages:eligibilityandvalidationvAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andmapthemtotheXOMvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvDeployyourrulesforruleexecutioninaCOBOLapplicationonz/OSTimerequiredThistutorialtakesaboutonehourtocomplete.
SoftwarerequirementsTousethistutorialyoumusthaveRuleDesignerinstalledonWindowsorLinux.
ThistutorialusesRuleDesigneronWindows.
YoumustalsohaveaninstanceofzRuleExecutionServerforz/OSinstalledandconfiguredonz/OS.
Note:YoucanalsowriteandmanagerulesusingDecisionCenter.
However,thistutorialdoesnotincludetasksusingDecisionCenter.
WhatyouneedtoknowTofollowthistutorial,youmustbefamiliarwithcertainaspectsrelatingtoyourinstallation:vYoumusthaveabasicunderstandingoftheEnterpriseCOBOLprogramminglanguage,knowhowtomakecallsfromaCOBOLprogram,andknowhowtobuildaCOBOLapplication.
vYoumustknowwheretodeployyourRuleApps.
YourzRuleExecutionServerforz/OSsystemadministratorhasconfiguredthelocationwhereyourRuleAppsandXOMsmustbedeployed,eitheronthefilesystemorinaDB2database.
Ifyoudonotknowthelocation,contactyoursystemadministrator.
vYoumustalsobefamiliarwithRuleDesignerandunderstandsomebasicBusinessRuleManagementSystem(BRMS)termsandconcepts,suchas:–Executionobjectmodel(XOM)–Businessobjectmodel(BOM)Tutorials3–Verbalization–RuleApp–Ruleset–Rulesetparameter–BusinessActionLanguage–RuleflowYoucanfindallthesetermsintheGlossary.
ForinformationaboutspecialconsiderationsforruleexecutioninCOBOLapplications,seeCOBOLconsiderationsforruleapplicationdevelopment.
Important:ThistutorialisonlyavailableinAmericanEnglish.
Theruleprojectcontainingtherulestoimportinthistutorialisonlyprovidedintheen_USlocale.
Ifen_USisnotyourdefaultlocale,youcanusethesamplesconsoleshortcut:FromtheStartmenu,clickAllPrograms>IBM>>SampleServer>SamplesConsole(en_US).
DirectorystructureAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/cobolstartresz,whereistheDecisionServerinstallationdirectory.
ThistutorialprovidesasampleCOBOLcopybooknamedHBRLDAT1.
cpyforyoutouse.
Thecopybookisstoredin:v/studio/tutorials/cobol/cobolstartresz/start/reszminiloan-execution/copy/HBRLDAT1.
cpy.
Startthistutorial:"Task1:Importinganexistingruleproject.
"Task1:ImportinganexistingruleprojectTofocusonthemainpurposeofthetutorial,youimportanexistingruleprojectratherthancreateone.
Thistutorialprovidesanexistingruleproject,reszminiloan,whichhasaCOBOLcopybookfromwhichyouwanttogeneratearulesettobedeployedonzRuleExecutionServerforz/OS.
Ifyoualreadyhavearuleprojectwiththesamename,switchtoanewworkspacebeforestartingthistask.
Toimportanexistingruleproject:1.
Ifnecessary,switchtoanewworkspace:a.
InRuleDesigner,ontheFilemenu,clickSwitchWorkspace>Other.
b.
OntheWorkspaceLauncherpage,intheWorkspacefield,changethenameofthecurrentworkspacetoanewworkspacename.
c.
ClickOK.
2.
Toimportaruleprojectfromthesamplesconsole,clickWindow>OpenPerspective>Other.
3.
IntheOpenPerspectivedialog,clickSamplesConsole,andthenclickOK.
4IBMOperationalDecisionManager:GettingStartedTutorialsTheSamplesandTutorialsviewisdisplayed.
4.
Inthisperspective,expandtheRuleDesignersectionifnecessary,andthenclickTutorials>Cobol>Creatingacopybook-basedruleprojectforzRulesExecutionServerforZ.
5.
Understart,clickImportprojects.
ThereszminiloanruleprojectisaddedtothelistofprojectsintheRuleExplorer.
Note:Bydefault,therulesinthistutorialareexecutedusingtheclassicruleengine.
Ifyouwanttousethedecisionengineinstead,seeChoosingabuildmodeandDecisionengine.
Task2:GeneratingaXOMfromaCOBOLcopybookToexecuteyourrulesinaCOBOLapplication,youuseaCOBOLcopybookasthebasisforyourXOM.
ACOBOLXOMprovidesthenecessaryCOBOL-to-JavamappingsothatyoucanexecuteyourrulesinaCOBOLapplication.
TogenerateaCOBOLXOM:1.
IntheDesignpartoftheRuleProjectMap,clickImportXOMandthenselectCOBOLExecutionObjectModel.
Note:YouusetheRuleProjectMaptoviewthestatusofgoalsandtasksinaruleproject.
Todisplayit,selectWindow>ShowView>Other>RuleDesigner>RuleProjectMap.
Alternatively,right-clickyourruleprojectandthenselectProperties>COBOLManagement>COBOLExecutionObjectModel.
2.
OnthePropertiespage,intheCOBOLExecutionObjectModelpane,clickAdd.
3.
OntheImportCOBOLXOMpage,intheExecutionObjectModelNamefield,typeanamefortheXOM.
Forexample,rezminiloan-xom.
4.
ClickAdd.
5.
OntheSelectCobolCopybookpage,clickFileSystemandthennavigatetotheHBRLDAT1copybook.
See"Beforeyoustart"onpage2forthecopybooklocation.
6.
SelectHBRLDAT1.
cpy,andthenclickOpen.
7.
InthePackagenamefield,typeapackagename,forexample,xom.
ClickOK.
8.
OntheImportCOBOLXOMpage,clickNexttodisplayasummaryofthedefaultJavatypesandclassattributesderivedfromeachCOBOLiteminthecopybook.
9.
ChangeapprovedfromtypeStringtoboolean,usingthetypeconverter:a.
ExpandtheLoanitem.
b.
Right-clicktherowthatcontainstheapproveddataitemandthenclickAddconverter.
c.
OntheConfigureConverterSettingspage,selectthebooleanconverter.
d.
ForthebooleanTruevalue,typeTandfortheFalsevalue,typeF.
e.
ClickOK.
Tutorials5Attention:IfyouchangethedefaultmappingsandthensubsequentlyreimporttheXOM,youloseyourconfiguredvalues.
10.
ClickFinishtoclosethepageandcreatetheCOBOLXOM.
YouseethenewXOMonthePropertiespageintheCOBOLExecutionObjectModelpane.
11.
ClickOKtoclosethePropertieswindow.
NoticethefollowingadditionintheRuleExplorerview:arezminiloanJavaXOMproject.
Task3:CreatingaBOMfromtheCOBOLXOMYoucreateaBOMinRuleDesignerbasedonyourCOBOLXOM.
Inthistask,youcreateaBOMinRuleDesigner,basedontheCOBOLXOMyoucreatedintheprevioustask.
TocreateaBOMfromtheCOBOLXOM:1.
IntheDesignpartoftheRuleProjectmap,clickCreateBOM.
Alternatively,intheRuleExplorerview,selectthebomfolderinyourruleprojectandthen,ontheFilemenu,clickNew>BOMEntry.
2.
IntheNewBOMEntrywizard,intheNamefield,acceptthedefaultnamefortheBOMentry:model.
3.
MakesurethattheoptionCreateaBOMentryfromaXOMisselectedandthenclickNext.
4.
OntheNewBOMEntryscreen,intheChooseaXOMentryfield,clickBrowseXOM,selectplatform:/rezminiloan,andthenclickOK.
5.
UnderSelectclasses,selectthexompackage.
Whenyouselectthepackage,youautomaticallyselectalltheclassesitcontains.
6.
ClickNext.
OntheBOMVerbalizationpage,selecttheAllMethodscheckbox.
Thisoptionmakessurethatallthemethodsareverbalized,inadditiontotheelementsyoualreadyselected.
7.
ClickFinish.
IntheRuleExplorerview,thebomfoldercontainsanewBOMentry.
8.
IntheRuleExplorer,double-clickbom>modeltoopentheBOMEditor.
9.
IntheBOMEditor,expandthexompackage.
YouseethattheBOMhastwoclassestomatchtheBorrowerandLoanclassesintheXOM.
10.
Double-clicktheBorrowerclasstoviewthedefaultverbalization:borrower.
ThedefaultverbalizationfortheLoanclassisloan.
Note:ThedefaultverbalizationisinAmericanEnglish.
IfyouareworkinginalocalizedversionofRuleDesigner,youcanverbalizetheBorrowerandLoanclassesinthelanguageofyourlocale,usingtheEditTermdialog.
6IBMOperationalDecisionManager:GettingStartedTutorialsTodisplaytheEditTermdialog,intheRuleExplorerdouble-clicktheclassormemberyouwanttomodify.
IntheVerbalizationsectionoftheBOMEditor,clickEdit.
Task4:DeclaringrulesetparametersRulesetparametersdefinethedatathatissentbetweentheCOBOLcallingprogramandtheRuleApp.
RulesetparametersprovidethemeanstoexchangedatabetweenyourCOBOLapplicationandtheRuleApp.
Youdefinerulesetparametersbyname,type,anddirection.
Inthistutorial,youwanttomakeadecisiononthestatusofaloan,soyoucreaterulesetparametersfortheBorrowerandLoanclasses.
YoumustusetheINdirectionfortheborrowerparameter.
ThevalueoftheborrowerparameterisprovidedasinputfromtheCOBOLclientapplicationonexecution.
ThedirectionfortheloanparametermustbeIN_OUT.
ThevalueoftheloanparameterissetbytheINvaluepassedbytheclientandthenupdatedbytheengineonthewayout.
Theupdatedvalueisreturnedtotheclient.
Note:YoucannotusetheOUTparameterdirectionwithzRuleExecutionServerforz/OS.
Todeclarerulesetparameters:1.
IntheDesignpartoftheRuleProjectmap,clickDefineparameters.
Alternatively,intheRuleExplorer,right-clickyourruleprojectandthenclickProperties.
2.
InthetypefilterpaneofthePropertiesdialog,selectRulesetParameters.
3.
OntheRulesetParameterspage,selecttheEnabletypecheckforCOBOLXOMcheckbox.
ThisselectionfilterstherulesetparametertypesyoucanuseforaruleprojectthathasaCOBOLXOM.
4.
Todefinetheborrowerparameter,clickAddandthenchangethedefaultvaluesasfollows:a.
IntheNamecolumn,typeborrower.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheBorrowertypeintheMatchingtypesbox.
Thexom.
BorrowertypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,selecttheINdirection.
d.
IntheVerbalizationcolumn,typetheborrower.
5.
Todefinetheloanparameter,clickAdd.
Yourrulesetparametersettingslooklikethis:NameTypeDirectionDefaultValueVerbalizationborrowerxom.
BorrowerINtheborrowerloanxom.
LoanIN_OUTtheloana.
IntheNamecolumn,typeloan.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheLoantypeintheMatchingtypesbox.
Tutorials7Thexom.
LoantypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,usethedefaultIN_OUTdirection.
d.
IntheVerbalizationcolumn,typetheloan.
6.
ClickOKtosaveyourrulesetparameters.
Task5:AddingBOMmethodsandmappingthemtotheXOMYouaddBOMmethodstoaBOMclasstohelpverbalizeyourrules.
TokeeptheXOMsynchronizedwiththeBOM,youmustmapthenewBOMmethodstotheXOM.
Youusemethodstospecifyconditionsandactionsinyourrules.
YoucreatemethodsinRuleDesigner.
WhenyouaddmethodstotheBOM,youcreatemembersintheBOMthatarenotdefinedintheXOM.
Thismismatchcreateserrorsinyourruleproject.
Toavoidthismismatch,youmapthenewmethodstotheXOM,usingtheBOMEditor.
Note:YoumustnotmakeanychangesdirectlyintheXOM.
Inthistask,youaddthefollowingmethods,verbalizethem,andthenapplyBOMtoXOMmapping.
ClassMethodDescriptionLoanpublicvoidaddMessage(Stringmsg)Defineswhatisneededtopassinformationfromtherules.
LoanpublicvoidrejectIdentifieswhethertheloanapplicationwasrejected.
BorrowerpubliclongcomputeIncomeAfterTaxComputestheincomeoftheborrower,aftertax.
ToaddBOMmethodsandmapthemtotheXOM:1.
StartbyaddingtheaddMessagemethod.
IntheOutlineview,expandthemodelpackageandthendouble-clicktheLoanclass.
2.
OntheClasspageoftheBOMeditor,intheMemberssection,clickNew.
3.
OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypeaddMessageMethodtypeTypevoid4.
Onthesamepage,clickAddandthencompletetheMethodArgumentdialogasfollows.
FieldDataentryNameTypemsgTypeTypejava.
lang.
String5.
ClickOKtoclosetheMethodArgumentdialog,andthenclickFinish.
8IBMOperationalDecisionManager:GettingStartedTutorialsOntheClasspageoftheBOMeditor,theMemberslistnowincludestheaddMessagemethod.
6.
Double-clicktheaddMessagemethod,andintheMemberVerbalizationsectionoftheBOMEditor,clickCreatetoviewthedefaultverbalization:add{0}tothemessagesof{this}Youarenotgoingtochangethisverbalization.
7.
ScrolldowntotheBOMtoXOMmappingsectionoftheBOMEditorandthenclickthearrownexttotheBodyfieldtoopentheBOMtoXOMMappingeditor.
8.
TypethefollowingJavacode:this.
messages.
add(msg);9.
Saveyourwork.
10.
AddtherejectmethodtotheLoanclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTyperejectMethodtypeTypevoidYoudonotaddparametersforthismethod.
ThefollowingtableshowsyouwhattoenterfortheverbalizationandtheBOMtoXOMmapping.
VerbalizationBOMtoXOMmappingAcceptthedefaultverbalization,reject{this}this.
approved=false;.
11.
AddthecomputeIncomeAfterTaxmethodtotheBorrowerclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypecomputeIncomeAfterTaxMethodtypeTypelongYoudonotaddparameterstothismethod.
ThefollowingtableshowsyouwhattoenterfortheverbalizationandtheBOMtoXOMmapping.
VerbalizationBOMtoXOMmappingChangetheverbalizationtotheincomeaftertaxof{this}if(this.
yearlyIncomeRulePackage.
b.
IntheNewRulePackagewizard,inthePackagefield,typevalidationandthenclickFinish.
ThenewvalidationrulepackagedisplaysintheRuleExplorer.
c.
Createanotherpackageandnameiteligibility.
Yourruleprojectnowcontainstwopackagesforstoringyourrules.
2.
Tocreatetheruleflow,intheRuleExplorer,selectyourruleprojectandthenclickNewRuleflowontheRuleDesignertoolbar.
3.
IntheNewRuleflowdialog,intheNamefield,typemainflowandthenclickFinish.
TheRuleflowEditoropens,displayingtheDiagrampage.
4.
ClickthestartnodeintheRuleflowpaletteandthenclicktheDiagrampage.
5.
ClicktheCreatearuletaskiconinthepaletteandthenclicktheDiagrampage.
Anewruletaskiscreated.
6.
ClickthenewruletaskandthenmakethefollowingentriesonthePropertiestab:vChangetheIDtovalidationvForRuleExecution>Algorithm,selectSequential7.
OnthePropertiestab,clickRuleSelectionandthenclickEdit.
8.
IntheSelectRulesdialog,usethearrowbuttontomovethevalidationpackagetothesidepaneandthenclickOK.
9.
Createasecondruletasknamedeligibilityandthensetitspropertiesasforthevalidationtask.
10.
MovetheeligibilitypackagetothesidepaneoftheSelectRulesdialogandthenclickOK.
10IBMOperationalDecisionManager:GettingStartedTutorials11.
Addanendnodetotheruleflow.
12.
UsingtheCreateatransitioniconinthepalette,createthefollowingtransitions:vFromthestartpointtothevalidationtaskvFromthevalidationtasktotheeligibilitytaskvFromtheeligibilitytasktotheendpoint13.
AligntheruleflowbyclickingtheLayoutAllNodesicon.
14.
Savetheruleflow.
Yourruleflowlookslikethis.
Task7:WritingactionrulesYouwriterulesusingdedicatededitorsandtheBusinessActionLanguage(BAL).
Inthistask,youwritefiveactionrulesandputthemintotherelevantpackage.
YoucanwriterulesinRuleDesigner,orinDecisionCenter.
IfyouuseDecisionCenter,makesurethatyousynchronizewithRuleDesignerbeforeyoudoso.
YoucreatethefollowingrulesinRuleDesignertotheeligibilityandvalidationpackages:PackagenameRulenameeligibilityMinimumCreditScoreMinimumAmountMinimumNetIncomevalidationMaximumAgeReqMaximumAmountTutorials11Note:Ifyouareworkinginalocalizedversionoftheproduct,makesurethatyouhaveverbalizedtheBorrowerandLoanclassesinthelanguageforyourlocalebeforeyoustartwritingrules.
Tocreatetheactionrules:1.
CreatetheMinimumCreditScorerule:a.
Intheruleproject,right-clicktheeligibilitypackageandthenclickNew>ActionRule.
b.
IntheNamefield,typeMinimumCreditScore.
c.
ClickFinish.
ThenewactionruledisplaysintheRuleExplorerviewandtheIntelliruleEditoropens.
Youcanswitchtotheguidededitorifyouprefer.
2.
Writetheeligibility.
MinimumCreditScoreruleasfollows:ifthecreditscoreof'theborrower'islessthan200thenadd"Creditscorebelow200"tothemessagesof'theloan';reject'theloan';3.
Intheeligibilitypackage,addthefollowingrules:NameRuleMinimumAmountiftheyearlyrepaymentof'theloan'ismorethantheyearlyincomeof'theborrower'*0.
3thenadd"ToobigDebt-To-Incomeratio"tothemessagesof'theloan';reject'theloan';MinimumNetIncomeiftheincomeaftertaxof'theborrower'islessthan24000thenadd"Theyearlyincomeislowerthanthebasicrequest"tothemessagesof'theloan';reject'theloan';4.
Inthevalidationpackage,addthefollowingrules:NameRuleMaximumAgeReqiftheageof'theborrower'ismorethan65thenadd"Theageexceedsthemaximum.
"tothemessagesof'theloan';reject'theloan';MaximumAmountiftheamountof'theloan'ismorethan1000000thenadd"Theloancannotexceed1000000"tothemessagesof'theloan';reject'theloan';5.
Saveyourwork.
12IBMOperationalDecisionManager:GettingStartedTutorialsRelatedinformation:RuleauthoringforCOBOLcompatibilityTask8:PreparingforruleexecutionToprepareforruleexecution,youmustcreateaRuleAppprojectandthendeploytheRuleAppandtheXOMtothezRuleExecutionServerforz/OSpersistenceonz/OS.
Step1:CreateaRuleAppprojectYoucreateaRuleAppprojectinRuleDesigner.
YoumustcreateaRuleAppprojecttocontaintherulesetsthatyouwanttoexecute.
TocreateaRuleAppproject:1.
InRuleDesigner,intheDeployandIntegratepartoftheRuleProjectMap,clickCreateRuleAppproject.
Alternatively,ontheFilemenu,clickNew>Project,selectRuleAppProjectandthenclickNext.
2.
IntheNewRuleAppProjectwizard,intheProjectnamefield,typethisnameforyourruleproject:reszminiloanApp.
3.
MakesurethattheUsedefaultlocationcheckboxisselected.
4.
ClickNext.
YourruleprojectisshownasselectedontheRuleProjectstab.
Note:Inthistutorialyouincludealltherulesintheruleproject.
Forlargeruleprojects,youmightwanttousetherulesetextractortoextractonlycertainsetsofrules.
Inthiscase,youclickAddandthenselecttheruleextractoroption.
5.
ClickFinish.
TheRuleAppprojectiscreatedandisaddedtothelistofprojectsintheRuleExplorer.
TheRuleAppprojecteditoropensautomatically.
LeavetheRuleAppprojecteditoropen,asyouusetheDeployoptioninthenextstep.
Step2:DeploytheXOMandRuleApptozRuleExecutionServerforz/OSYoudeployyourartifactssothatyoucanexecutetherulesetonz/OS.
TobeabletoexecuteyourrulesetwithzRuleExecutionServerforz/OS,youmustdeploytheCOBOLXOMandyourRuleApptozRuleExecutionServerforz/OS.
TodeploytheXOMandRuleApp:1.
IntheRuleAppprojecteditor,intheDeploymentpane,clickDeploytodeploytheRuleApptooneormoreRuleExecutionServerinstances.
2.
FortheRuleApp,acceptthedefaultIncrementRuleAppmajorversionandthenclickNext.
3.
SelectCreateatemporaryRuleExecutionServerconfigurationandenterthefollowingdetails:vURL:http://your.
server.
address:PORT/resTutorials13vLogin:resAdminvPassword:resAdmin4.
ClickFinish.
YourartifactsaredeployedtozRuleExecutionServerforz/OS.
YoucannowlogintothezRuleExecutionServerforz/OSconsoleandviewthem.
Step3:ViewthedeployedartifactsUsethezRuleExecutionServerforz/OSconsoletoviewthedeployedRuleAppandXOM.
LogintothezRuleExecutionServerforz/OSconsoleandusetheNavigatorpanetoviewthedeployedRuleAppandXOM.
Toviewyourdeployedartifacts:1.
OpenthezRuleExecutionServerforz/OSconsoleusingthefollowingURL:http://your.
server.
address:PORT/res2.
Attheloginprompt,enterthefollowinglogindetails:vLogin:resAdminvPassword:resAdmin3.
ClicktheExplorertab.
4.
IntheNavigatorpane,clickResourcestoviewthedeployedXOM.
5.
IntheNavigatorpane,clickRuleAppstoviewthedeployedRuleApp.
Task9:BuildingyourCOBOLapplicationToexecuteyourruleset,youcalltheRuleAppfromyourCOBOLapplicationandpasstherulesetparameterstotheruleenginerunninganinstanceofzRuleExecutionServerforz/OS.
ThistutorialincludesacodesamplethatyoucanusetocallaRuleAppfromaCOBOLapplication.
Thefollowingprocedureexplainseachpartoftheclientcodeandthestepstofollow.
TobuildyourCOBOLapplication:1.
CopyinthezRuleExecutionServerforz/OSruntimecopybooks:01WS-REASON-CODES.
COPYHBRC.
COPYHBRWS.
HBRCcontainsconstantsthatyoucanuseinyourapplication.
HBRWScontainstheworkingstoragestructureusedforcallingHBRCONN,HBRRULE,andHBRDISC.
2.
Addtherulesetparameters:MOVELENGTHOFBorrowertoHBRA-RA-DATA-LENGTH(1)MOVE"borrower"toHBRA-RA-PARAMETER-NAME(1)SETHBRA-RA-DATA-ADDRESS(1)toaddressofBorrowerMOVELENGTHOFLoanTOHBRA-RA-DATA-LENGTH(2)COMPUTEWS-MAX-TABLE-LEN=LENGTHOFMessages*99ADDWS-MAX-TABLE-LENTOHBRA-RA-DATA-LENGTH(2)MOVE"loan"toHBRA-RA-PARAMETER-NAME(2)SETHBRA-RA-DATA-ADDRESS(2)toaddressofLoan3.
Specifytherulesettocall:MOVE""toHBRA-CONN-RULEAPP-PATH4.
ConnecttozRuleExecutionServerforz/OS:14IBMOperationalDecisionManager:GettingStartedTutorialscall"HBRCONN"usingHBRA-CONN-AREA5.
Calltherulesetandcheckthereturncodes:call"HBRRULE"usingHBRA-CONN-AREAIFHBRA-CONN-COMPLETION-CODE=HBR-CC-OKTHENDISPLAY"Successfulcall"ELSEDISPLAY"Error"HBRA-CONN-COMPLETION-CODEHBRA-CONN-REASON-CODE6.
DisconnectfromzRuleExecutionServerforz/OS:call"HBRDISC"usingHBRA-CONN-AREAYoucanfindasampleprogramfortheCOBOLapplicationin/studio/tutorials/cobol/cobolstartresz/answer/reszminiloan-execution/cobol/MINITUT1.
cbl,whereistheDecisionServerinstallationdirectory.
Task10:ExecutingtheCOBOLprogramYouexecutetheCOBOLprogramusingJCL.
YoucanfindaprebuiltversionofthetutorialwithyourDecisionServerinstallationonz/OS:v++HBRWORKDS++.
SHBRJCL(HBRMTUT1),theJCLusedtoexecutetheCOBOLprogramv++HBRWORKDS++.
SHBRCOBS(HBRMTUT1),theCOBOLprogramusedtoinvoketheruleexecutionv++HBRWORKDS++.
SHBRCOBC(HBRLDAT1),theCOBOLcopybookToexecutetheprogram:1.
SubmitthesampleJCL.
2.
Checktheoutput.
Theoutputshouldlooksomethinglikethis:EXECUTIONRESULTBorrowerName:JohnLoanApproved:FRejectmessages:Theageexceedsthemaximum.
Youhavenowcompletedthetutorial.
Tutorial:SharingaBOMbetweenJavaandCOBOLapplicationsThistutorialshowsyouhowtouseRuleDesignertoconfigureaJavaBOMforCOBOLstructuressothatyoucandeployyourrulesettozRuleExecutionServerforz/OSandexecuteitfromaCOBOLapplication.
WhatyouwilllearnInthistutorial,youdevelopthefollowingskills:vImportingaJava-basedruleprojectintoyourworkspacevEnablingthebusinessobjectmodel(BOM)forCOBOLcopybookgenerationTutorials15vGeneratingaCOBOLcopybookfromtheBOMvCustomizingthedefaultJavatoCOBOLmappingvDeployingyourrulesforruleexecutioninaCOBOLapplicationonz/OS.
TimerequiredThistutorialshouldtakeapproximately60minutestofinish.
BeforeyoustartFindoutwhatyouneedtoknowbeforeyoustartthetutorial.
Note:ThistutorialisavailableonlyinAmericanEnglish.
Theruleprojectcontainingtherulestoimportinthistutorialisonlyprovidedintheen_USlocale.
Ifen_USisnotyourdefaultlocale,youcanusethesamplesconsoleshortcuttochangethelocale.
FromtheStartmenu,clickAllPrograms>IBM>package_group>SampleServer>SamplesConsole(en_US).
ThedefaultpackagegroupisOperationalDecisionManager8.
5.
1.
AfictitiousloancompanywantstousebusinessrulestovalidateloanapplicationsandexecutethemineitheraJavaenvironment,orusingaCOBOLapplicationrunningonz/OS.
Thecompanyusesbusinessrulestodefinecustomereligibilityforloanapplications.
TheruleprojectsthatthecompanycurrentlyusescontainBOMsbasedonaJavaXOM.
TheydeploytherulestoRuleExecutionServeronWebSphereApplicationServerforz/OS,toexecuteinaJavaenvironment.
ThecompanynowwantstosharetheJavaruleprojectswithCOBOLapplicationsrunningonz/OS,andmanagethechangesmadetotheserules.
ToshareruleswithCOBOLapplications,theymustaddthenecessaryCOBOLstructurestotheBOMandgenerateaCOBOLcopybook.
Withthesestructuresintheruleproject,thecompanydeploystheRuleAppstozRuleExecutionServerforz/OSsothattheCOBOLapplicationcancalltherulesetsandexecutetherules.
WhatyouwilllearnInthistutorial,youdevelopthefollowingskills:vImportingaJava-basedruleprojectintoyourworkspacevEnablingthebusinessobjectmodel(BOM)forCOBOLcopybookgenerationvGeneratingaCOBOLcopybookfromtheBOMvCustomizingthedefaultJavatoCOBOLmappingvDeployingyourrulesforruleexecutioninaCOBOLapplicationonz/OS.
TimerequiredThistutorialshouldtakeapproximately60minutestofinish.
SoftwarerequirementsYoumusthaveRuleDesignerinstalledonWindowsorLinux.
ThistutorialusesRuleDesigneronWindows.
YoumustalsohaveaninstanceofzRuleExecutionServerforz/OSinstalledandconfiguredonz/OS.
16IBMOperationalDecisionManager:GettingStartedTutorialsAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/bomstartrez,whereistheDecisionServerforz/OSinstallationdirectory.
ThistutorialprovidesasampleruleprojectnamedSharingZMiniloanforyoutouse.
Theruleprojectisstoredinthefollowingdirectory:/studio/tutorials/cobol/bomstartrez/start.
WhatyouneedtoknowTofollowthistutorial,youmustbefamiliarwithcertainaspectsrelatingtoyourinstallation:vYoumusthaveabasicunderstandingoftheEnterpriseCOBOLprogramminglanguage,knowhowtomakecallsfromaCOBOLprogram,andknowhowtobuildaCOBOLapplication.
vYoumustknowwheretodeployyourRuleApps.
YourzRuleExecutionServerforz/OSsystemadministratorhasconfiguredthelocationwhereyourRuleAppsandXOMsmustbedeployed,eitheronthefilesystemorinaDB2database.
Ifyoudonotknowthelocation,contactyoursystemadministrator.
vYoumustalsobefamiliarwithRuleDesignerandunderstandsomebasicBusinessRuleManagementSystem(BRMS)termsandconceptssuchas:–Executionobjectmodel(XOM)–Businessobjectmodel(BOM)–RuleApp–RuleApparchive–Ruleset–Rulesetparameter.
YoucanfindthesetermsintheGlossary.
IfyouwanttosharerulesbetweenJavaandCOBOLapplications,itisimportanttounderstandhowJavastructuresmaptoCOBOLstructures,andanylimitationsthatapply.
Formoreinformation,seeGuidelinesforsharingaBOMandHandlingdatatypedifferencesbetweenJavaandCOBOLinthedistributedplatformpartofthisinformationcenter.
DirectorystructureAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/bomstartresz,whereistheDecisionServerinstallationdirectory.
ThistutorialprovidesasampleruleprojectnamedSharingZMiniloanforyoutouse.
Theruleprojectisstoredinthefollowingdirectory:v/studio/tutorials/cobol/bomstartresz/start.
Startthistutorial:"Task1:Importinganexistingruleproject.
"Task1:ImportinganexistingruleprojectTofocusonthemainpurposeofthetutorial,youimportanexistingruleprojectratherthancreateone.
Thistutorialprovidesanexistingruleproject,SharingZMiniloan,whichhasaBOMgeneratedfromaJavaXOM.
Ifyoualreadyhavearuleprojectwiththesamename,switchtoanewworkspacebeforestartingthistask.
Tutorials171.
Ifnecessary,switchtoanewworkspace:a.
InRuleDesigner,ontheFilemenu,clickSwitchWorkspace>Other.
b.
OntheWorkspaceLauncherpage,intheWorkspacefield,changethenameofthecurrentworkspacetoanewworkspacename.
c.
ClickOK.
2.
Toimportaruleprojectfromthesamplesconsole,clickWindow>OpenPerspective>Other.
3.
IntheOpenPerspectivedialog,clickSamplesConsole,andthenclickOK.
TheSamplesandTutorialsviewdisplays.
4.
ExpandtheRuleDesignersectionifnecessary,andthenclickTutorials>COBOL>CreatingaBOM-basedrulesetforzRuleExecutionServerforz/OS.
5.
Understart,clickImportprojects.
TheSharingZMiniloanruleprojectisaddedtothelistofprojectsintheRuleExplorer.
Task2:ConfiguringtheBOMforCOBOLcopybookgenerationBeforeyoucanuseaJavaBOMtogenerateaCOBOLcopybook,youmustmakeyourBOMentriescompatiblewithCOBOLcode.
Iftheyarenotcompatible,thecopybookyougeneratefromtheBOMisinvalid.
ToconfiguretheBOMforcopybookgeneration:1.
InRuleExplorer,right-clicktheruleprojectSharingZMiniloanandthenselectProperties>COBOLManagement>COBOLEnabledBOM.
2.
OntheCOBOLEnabledBOMpage,clickAdd.
3.
IntheSelectBOMentrydialog,clickmodel,andthenclickOK.
Thetableunder"ConfiguretypesettingforCOBOLitems"showstheproposedmappingbetweentheJavastructuresintheBOMandtheCOBOLstructures:NameJavaTypeCOBOLPicture/DateFormatGeneratedCOBOLItemxom.
Borrower-ageintS9(10)agePICS9(10).
-creditScorelongS9(18)creditScorePICS9(18).
-namejava.
lang.
StringX(20)namePICX(20)VALUESPACE.
-yearlyIncomelongS9(18)yearlyIncomePICS9(18).
xom.
Loan-amountlongS9(18)amountPICS9(18).
-approvedbooleanXapprovedPICX.
88BoolValueValue'T'.
-effectDatejava.
util.
Date9(8)[yyyyMMdd]effectDatePIC9(8).
-messagesjava.
util.
ListX(20)messagesPICX(20)OCCURS10TIMES.
-yearlyInterestRateshortS9(5)yearlyInterestRatePICS9(5).
18IBMOperationalDecisionManager:GettingStartedTutorialsNameJavaTypeCOBOLPicture/DateFormatGeneratedCOBOLItem-yearlyRepaymentlongS9(18)yearlyRepaymentPICS9(18).
ChangethedefaultlengthformessagesfromX(20)toX(60).
4.
ClickFinish.
TheCOBOLenabledBOMisgenerated.
5.
BackontheCOBOLEnabledBOMpage,clickManage.
6.
OntheCopybookGenerationpage,specifythenameandpathofthecopybooktobegenerated.
a.
Clickthedefaultcopybookname.
Abuttonwiththreedotsappears.
b.
ClickthebuttontodisplaytheSelectCOBOLCopybookpage.
c.
ClickBrowse,andthenspecifythefollowingcopybooknameandpath:/SharingZMiniloan-execution/copy/HBRLDAT2.
cpyinplaceofthedefaultnameandpath.
7.
ClickOK.
8.
UndertheTopLevelObjectcolumnoftheCopybookGenerationpage,accepttheJavatypesxom.
Borrowerandxom.
Loanasthetopleveldataitemsinthecopybook.
9.
UndertheItemNamecolumn,acceptthenamesborrowerandloancorrespondingtotheJavatypes.
WhenyougeneratetheCOBOLcopybook,thesearethenamesgiventothetopleveldataitems.
10.
ClickNexttomovetoacopybookpreview.
11.
ClickFinish.
12.
ClickOKtoclosethePropertiesforSharingZMiniloandialog.
Task3:CreatingaRuleAppprojectYoucreateaRuleAppprojecttocontaintherulesetsthatyouwanttoexecute.
1.
InRuleDesigner,intheDeployandIntegratepartoftheRuleProjectMap,clickCreateRuleAppproject.
2.
IntheNewRuleAppProjectwizard,intheProjectnamefield,typethisnameforyourruleproject:SharingZMiniloan-App.
3.
MakesurethattheUsedefaultlocationcheckboxisselected.
4.
ClickNext.
YourruleprojectisshownasselectedontheRuleProjectstab.
Note:Inthistutorial,youincludealltherulesintheruleproject.
Forlargeruleprojects,youmightwanttousetherulesetextractortoextractonlycertainsetsofrules.
Inthiscase,youclickAddandthenselecttheruleextractoroption.
5.
ClickFinish.
TheRuleAppprojectiscreatedandisaddedtothelistofprojectsintheRuleExplorer.
TheRuleAppprojecteditoropensautomatically.
LeavetheRuleAppprojecteditoropen,asyouusetheDeployoptioninthenextstep.
Tutorials19Task4:DeployingtheXOMandRuleAppYoudeployyourartifactssothatyoucanexecutetherulesetonz/OS.
TobeabletoexecuteyourrulesetwithzRuleExecutionServerforz/OS,youmustdeploytheCOBOLXOMandyourRuleApptozRuleExecutionServerforz/OS1.
IntheRuleAppprojecteditor,intheDeploymentpane,clickDeployaRuleApptooneormoreRuleExecutionServers.
2.
FortheRuleApp,acceptthedefaultIncrementRuleAppmajorversionandthenclickNext.
3.
SelectCreateatemporaryRuleExecutionServerconfigurationandenterthefollowingdetails:vURL:http://your.
server.
address:PORT/resvLogin:resAdminvPassword:resAdmin4.
ClickFinish.
UndertheConsoletab,youcancheckwhetheryourartifactshavebeensuccessfullydeployedtoRuleExecutionServer.
Ifso,youcanlogintotheRuleExecutionServerconsoleandviewthem.
Task5:BuildingyourCOBOLapplicationToexecuteyourruleset,youcalltheRuleAppfromyourCOBOLapplicationandpasstherulesetparameterstotheruleenginethatisrunninginsideaninstanceofzRuleExecutionServerforz/OS.
ThistutorialincludesacodesamplethatyoucanusetocallaRuleAppfromaCOBOLapplication.
Thefollowingprocedureexplainseachpartoftheclientcodeandthestepstofollow.
YoucanfindthesampleCOBOLapplicationin/studio/tutorials/cobol/bomstartrez/answer/SharingZMiniloan-execution/cobol/HBRMTUT2.
COBOLwhereistheDecisionServerinstallationdirectory.
1.
CopyinthezRuleExecutionServerforz/OSruntimecopybooks:01WS-REASON-CODES.
COPYHBRC.
COPYHBRWS.
HBRCcontainsconstantsthatyoucanuseinyourapplication.
HBRWScontainstheworkingstoragestructureusedforcallingHBRCONN,HBRRULE,andHBRDISC.
2.
Addtherulesetparameters:MOVELENGTHOFBorrowertoHBRA-RA-DATA-LENGTH(1)MOVE"Borrower"toHBRA-RA-PARAMETER-NAME(1)SETHBRA-RA-DATA-ADDRESS(1)toaddressofBorrowerMOVELENGTHOFLoantoHBRA-RA-DATA-LENGTH(2)MOVE"Loan"toHBRA-RA-PARAMETER-NAME(2)SETHBRA-RA-DATA-ADDRESS(2)toaddressofLoan3.
Specifytherulesettocall:MOVE''toHBRA-CONN-RULEAPP-PATH4.
ConnecttozRuleExecutionServerforz/OS:call'HBRCONN'usingHBRA-CONN-AREA5.
Calltherulesetandcheckthereturncodes:20IBMOperationalDecisionManager:GettingStartedTutorialscall'HBRRULE'usingHBRA-CONN-AREAIFHBRA-CONN-COMPLETION-CODE=HBR-CC-OKTHENDISPLAY'Successfulcall'ELSEDISPLAY'Error'HBRA-CONN-COMPLETION-CODEHBRA-CONN-REASON-CODE6.
DisconnectfromzRuleExecutionServerforz/OS:call'HBRDISC'usingHBRA-CONN-AREATask6:ExecutingtheCOBOLapplicationYouexecutetheCOBOLapplicationusingJCL.
YoucanfindaprebuiltversionofthetutorialwithyourDecisionServerinstallationonz/OS:v++HBRWORKDS++.
SHBRJCL(HBRMTUT2),theJCLusedtoexecutetheCOBOLprogramv++HBRWORKDS++.
SHBRCOBS(HBRMTUT2),theCOBOLprogramusedtoinvoketheruleexecutionv++HBRWORKDS++.
SHBRCOBC(HBRLDAT2),theCOBOLcopybookwhere++HBRWORKDS++representsthehigh-levelqualifierassignedtotheworkingdatasets.
1.
SubmitthesampleJCL.
2.
Checktheoutput.
Theoutputshouldlooksomethinglikethis:EXECUTIONRESULTBorrowerName:JohnLoanApproved:FRejectmessages:Theageexceedsthemaximum.
Youhavenowcompletedthetutorial.
Tutorial:GeneratingCOBOLcodefromacopybook-basedruleprojectInRuleDesigner,youcanwriterulesagainstnativeCOBOLdatastructures,andgenerateCOBOLcodeforruleexecution.
Note:TheCOBOLcodegenerationfeatureisdeprecatedinV8.
5.
1.
InV8.
5.
1,theCOBOLcodegenerationuserinterfaceisnotdisplayedinRuleDesignerbydefault.
Tocompletethistutorial,youmustenabletheinterfacemanually.
TodisplaytheCOBOLcodegenerationuserinterfaceinRuleDesigner,addthefollowingparameterinthefile/eclipse.
ini:-Dcobol.
code.
gen=trueWhatyouwilllearnInthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedcodegenminiloanTutorials21Ifyoualreadyhavearuleprojectnamedcodegenminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vAddtworulepackages:eligibilityandvalidationvCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andimplementtheminCOBOLvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvGenerateCOBOLcodefromtheruleproject,inpreparationforruleexecutioninyourEnterpriseCOBOLapplicationTimerequiredThistutorialtakesaboutonehourtocomplete.
BeforeyoustartInthistopic,findoutwhatyouneedtoknowbeforeyoustartthetutorial.
RuleDesignerprovidesfeaturestobridgethegapbetweentwodistinctprogramminglanguages.
COBOLisastructuredprogramminglanguageandJavaisanobject-orientedprogramminglanguage.
AfictitiousloancompanyusesalargeCOBOLapplicationrunningonz/OStovalidateloanapplications.
Inthistutorial,thecompanydecidestousebusinessrulestotestcustomereligibilityfortheirloans.
ThecompanywantstosharerulescontainedintheCOBOLapplicationwithotherbusinessapplications,andmanagethechangesmadetotheserules.
ThecompanydecidestomigratethebusinesslogictoaBRMSbyprioritizingthemostcommonlysharedrules.
Therulesthatarechosendefinecustomereligibility.
Thissetofrulescalculatestheincomeverificationandminimumcreditamount.
Duringexecution,therulespassamessagetothemainprogramtonotifytheresultoftheinitialvalidation.
Inareallifescenario,youidentifyorcreateaCOBOLcopybookcontainingtheCOBOLdataitemsrequiredforthebusinessrules.
Youthenusethiscopybookasabasisforcreatingyourexecutionobjectmodel(XOM).
Inthistutorial,youusethesampleCOBOLcopybookprovided,miniloan.
cpy.
Theminiloan.
cpycopybookcontainsthefollowingdataitems:01Borrower.
05namePICX(20).
05creditScorePIC9(10).
05yearlyIncomePIC9(10).
05agePIC9(3).
88teenagerVALUE0THRU17.
88adultVALUE18THRU60.
88retiredVALUE61THRU150.
01Loan.
05amountPIC9(10).
05yearlyInterestRatePIC99.
05yearlyRepaymentPIC9(10).
05effectDatePICX(8).
05approvedPICX.
05messageCountPIC9(2).
22IBMOperationalDecisionManager:GettingStartedTutorials05messagesPICX(60)OCCURS0TO99TIMESDEPENDINGONmessageCount.
Fromthiscopybook,youwillgeneratenativeCOBOLcodetoexecuteruleswithinanEnterpriseCOBOLapplication.
Startthistutorial:"Task1:Importinganexistingruleproject"onpage24.
WhatyouwilllearnInthistutorial,youlearnhowtoperformthesetasks:vImportanexistingruleprojectnamedcodegenminiloanIfyoualreadyhavearuleprojectnamedcodegenminiloaninyourworkspace,eitherswitchtoadifferentworkspaceorchooseadifferentname.
vAddtworulepackages:eligibilityandvalidationvCreateaXOMfromthesampleCOBOLcopybookprovidedwiththistutorialvCreateaBOMbasedontheXOMvAddmethodstotheBOMsothatyoucanspecifyconditionsandactionsinyourrules,andimplementtheminCOBOLvAddaruleflowtocontrolruleexecutionvWriteasetofrulesvGenerateCOBOLcodefromtheruleproject,inpreparationforruleexecutioninyourEnterpriseCOBOLapplicationTimerequiredThistutorialtakesaboutonehourtocomplete.
SoftwarerequirementsTousethistutorialyoumusthaveRuleDesignerinstalledonWindowsorLinux.
Note:YoucanalsowriteandmanagerulesusingDecisionCenter.
However,thistutorialdoesnotincludetasksusingDecisionCenter.
WhatyouneedtoknowTofollowthistutorial,youmusthaveabasicunderstandingoftheEnterpriseCOBOLprogramminglanguage,knowhowtobuildaCOBOLcopybook,andhowtocompile,link,andexecuteaCOBOLprogram.
YoumustalsobefamiliarwithRuleDesignerandunderstandsomebasicBusinessRuleManagementSystem(BRMS)termsandconcepts,suchas:vExecutionobjectmodel(XOM)vBusinessobjectmodel(BOM)vVerbalizationvRulesetvRulesetparametervBusinessActionLanguagevRuleflowTutorials23YoucanfindallthesetermsintheGlossary.
ForinformationaboutspecialconsiderationsforruleexecutioninCOBOLapplications,seeCOBOLconsiderationsforruleapplicationdevelopment.
ThistutorialisonlyavailableinAmericanEnglish.
Theruleprojectcontainingtherulestoimportinthistutorialisonlyprovidedintheen_USlocale.
Ifen_USisnotyourdefaultlocale,youcanusethesamplesconsoleshortcut:FromtheStartmenu,clickAllPrograms>IBM>>SampleServer>SamplesConsole(en_US).
DirectorystructureAllthefilesforthistutorialarecontainedinthefollowingdirectory:/studio/tutorials/cobol/cobolcodegen,whereistheDecisionServerinstallationdirectory.
ThistutorialprovidesasampleCOBOLcopybooknamedminiloan.
cpyforyoutouse.
Thecopybookisstoredin:/studio/tutorials/cobol/cobolcodegen/start/codegenminiloan-execution/copy/miniloan.
cpyStartthistutorial:"Task1:Importinganexistingruleproject.
"Task1:ImportinganexistingruleprojectTofocusonthemainpurposeofthetutorial,youimportanexistingruleprojectratherthancreateone.
Thistutorialprovidesanexistingruleproject,namedcodegenminiloan,whichhasacopybookfromwhichyouwanttogenerateCOBOLcode.
Ifyoualreadyhavearuleprojectwiththesamename,switchtoanewworkspacebeforestartingthistask.
Toimportanexistingruleproject:1.
Ifnecessary,switchtoanewworkspace:a.
InRuleDesigner,ontheFilemenu,clickSwitchWorkspace>Other.
b.
OntheWorkspaceLauncherpage,intheWorkspacefield,changethenameofthecurrentworkspacetoanewworkspacename.
c.
ClickOK.
2.
Toimportaruleprojectfromthesamplesconsole,clickWindow>OpenPerspective>Other.
3.
IntheOpenPerspectivedialog,clickSamplesConsole,andthenclickOK.
TheSamplesandTutorialsviewisdisplayed.
4.
Inthisperspective,expandtheRuleDesignersectionifnecessary,andthenclickTutorials>COBOL>GeneratingCOBOLcodefromacopybook-basedruleproject.
5.
Understart,clickImportprojects.
ThecodegenminiloanruleprojectisaddedtothelistofprojectsintheRuleExplorer.
24IBMOperationalDecisionManager:GettingStartedTutorialsTask2:GeneratingaXOMfromaCOBOLcopybookToexecuteyourrulesinaCOBOLapplication,youuseaCOBOLcopybookasthebasisforyourXOM.
ACOBOLXOMprovidesthenecessaryCOBOLtoJavamappingsothatyoucanexecuteyourrulesinaCOBOLapplication.
TogenerateaCOBOLXOM:1.
IntheDesignpartoftheRuleProjectMap,clickImportXOMandthenselectCOBOLExecutionObjectModel.
Alternatively,right-clickyourruleprojectandthenselectProperties>COBOLManagement>COBOLExecutionObjectModel.
OnthePropertiespage,intheCOBOLExecutionObjectModelpane,clickAdd.
2.
OntheImportCOBOLXOMpage,intheExecutionObjectModelNamefield,typeanamefortheXOM.
Forexample,codegenminiloan-xom.
3.
ClickAdd.
4.
IntheCOBOLCopybookpage,clickFileSystemandthennavigatetotheminiloancopybook.
See"Beforeyoustart"onpage22forthecopybooklocation.
5.
Selectminiloan.
cpy,andthenclickOK.
6.
ClickOK.
7.
OntheImportCOBOLXOMpage,clickNexttodisplayasummaryofthedefaultJavatypesandclassattributesderivedfromeachCOBOLiteminthecopybook.
8.
ChangeapprovedfromtypeStringtoboolean,usingthetypeconverter:a.
ExpandtheLoanitem.
b.
Right-clicktherowthatcontainstheapproveddataitemandthenclickAddconverter.
c.
OntheConfigureConverterSettingspage,selectthebooleanconverter.
d.
ForthebooleanTruevalue,typeTandfortheFalsevalue,typeF.
e.
ClickOK.
Attention:IfyouchangethedefaultmappingsandthensubsequentlyreimporttheXOM,youloseyourconfiguredvalues.
9.
ClickFinishtoclosetheConfigureCOBOLXOMMappingpageandcreatetheCOBOLXOM.
YouseethenewXOMonthePropertiespageintheCOBOLExecutionObjectModelwindow.
10.
ClickOKtoclosethePropertieswindow.
NoticethefollowingadditionintheRuleExplorerview:aminiloanJavaXOMproject.
Task3:CreatingaBOMfromtheCOBOLXOMYoucreateaBOMinRuleDesignerbasedonyourCOBOLXOM.
Tutorials25Inthistask,youcreateaBOMinRuleDesigner,basedontheCOBOLXOMyoucreatedintheprevioustask.
TocreateaBOMfromtheCOBOLXOM:1.
IntheDesignpartoftheRuleProjectmap,clickCreateBOM.
Alternatively,intheRuleExplorerview,selectthebomfolderinyourruleprojectandthen,ontheFilemenu,clickNew>BOMEntry.
2.
IntheNewBOMEntrywizard,intheNamefield,acceptthedefaultnamefortheBOMentry:model.
3.
MakesurethattheoptionCreateaBOMentryfromaXOMisselectedandthenclickNext.
4.
OntheNewBOMEntryscreen,intheChooseaXOMentryfield,clickBrowseXOM,selectcodegenminiloan-xom,andthenclickOK.
5.
UnderSelectclasses,selectthexompackage.
Whenyouselectthepackage,youautomaticallyselectalltheclassesitcontains.
6.
ClickNext.
OntheBOMverbalizationpage,selecttheAllMethodscheckbox.
Thisoptionmakessurethatallthemethodsareverbalized,inadditiontotheelementsyoualreadyselected.
7.
ClickFinish.
IntheRuleExplorerview,thebomfoldercontainsanewBOMentry.
8.
IntheRuleExplorer,double-clickbom>modeltoopentheBOMEditor.
9.
IntheBOMEditor,expandthexompackage.
YouseethattheBOMhastwoclassestomatchtheBorrowerandLoanclassesintheXOM.
10.
Double-clicktheBorrowerclasstoviewthedefaultverbalization:borrower.
ThedefaultverbalizationfortheLoanclassisloan.
Note:ThedefaultverbalizationisinAmericanEnglish.
IfyouareworkinginalocalizedversionofRuleDesigner,youcanverbalizetheBorrowerandLoanclassesinthelanguageofyourlocale,usingtheEditTermdialog.
TodisplaytheEditTermdialog,intheRuleExplorerdouble-clicktheclassormemberyouwanttomodify.
IntheVerbalizationsectionoftheBOMEditor,clickEdit.
Task4:DeclaringrulesetparametersRulesetparametersdefinethedatathatissentbetweenthegeneratedCOBOLprogramandtheCOBOLcallingprogram.
RulesetparametersprovidethemeanstoexchangedatabetweenthegeneratedCOBOLprogramandthecallingapplication.
Youdefinerulesetparametersbyname,type,anddirection.
Inthistutorial,youmakeadecisiononthestatusofaloan,soyoucreaterulesetparametersfortheBorrowerandLoanclasses.
YoumustusetheIN_OUTdirectionforbothparameters.
ThevalueoftheIN_OUTparameterisprovidedasinputtothe26IBMOperationalDecisionManager:GettingStartedTutorialscallingapplicationonexecution.
Itcanbemodifiedbythecallingapplicationandprovidedasoutputatexecutioncompletion.
Note:YoucanuseonlytheIN_OUTparameterforCOBOLcodegeneration.
Todeclarerulesetparameters:1.
IntheDesignpartoftheRuleProjectmap,clickDefineparameters.
Alternatively,intheRuleExplorer,right-clickyourruleprojectandthenclickProperties.
2.
InthetypefilterpaneofthePropertiesdialog,selectRulesetParameters.
3.
OntheRulesetParameterspage,selecttheEnabletypecheckforCOBOLXOMcheckbox.
ThisselectionfilterstherulesetparametertypesyoucanuseforaruleprojectthathasaCOBOLXOM.
4.
Todefinetheborrowerparameter,clickAddandthenchangethedefaultvaluesasfollows:a.
IntheNamecolumn,typeborrower.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheBorrowertypeintheMatchingtypesbox.
Thexom.
BorrowertypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,usethedefaultIN-OUTdirection.
d.
IntheVerbalizationcolumn,typetheborrower.
5.
Todefinetheloanparameter,clickAdd.
Yourrulesetparametersettingslooklikethis:NameTypeDirectionDefaultValueVerbalizationborrowerxom.
BorrowerIN_OUTtheborrowerloanxom.
LoanIN_OUTtheloana.
IntheNamecolumn,typeloan.
b.
IntheTypecolumn,clickthe.
.
.
buttontodisplaytheTypesdialog,andthendouble-clicktheLoantypeintheMatchingtypesbox.
Thexom.
LoantypeisdisplayedintheTypecolumn.
c.
IntheDirectioncolumn,keepthedefaultIN_OUTdirection.
d.
IntheVerbalizationcolumn,typetheloan.
6.
ClickOKtosave.
Task5:ImplementingBOMmethodsinCOBOLYouaddBOMmethodstoaBOMclasstohelpverbalizeyourrules.
YouthenmapthemtotheXOMtokeeptheXOMsynchronizedwiththeBOM,andimplementthemethodsinCOBOLsothatthegeneratedCOBOLprogramcancallthemethods.
Youusemethodstospecifyconditionsandactionsinyourrules.
YoucreatemethodsinRuleDesigner.
WhenyouaddmethodstotheBOM,youcreatemembersintheBOMthatarenotdefinedintheXOM.
Thismismatchcreateserrorsinyourruleproject.
Toavoidthismismatch,youmapthenewmethodstotheXOM,usingtheBOMEditor.
Tutorials27Note:YoudonotmakeanychangesdirectlyintheXOM.
YoumustalsoimplementthemethodsinCOBOLsothat,whenyougeneratetheCOBOLprogramtoexecutetherules,thegeneratedCOBOLprogramcancallthemethods.
Inthistask,youaddthefollowingmethodstoyourclasses,verbalizethem,mapthemtotheXOM,andthenimplementtheminCOBOL.
TheorderinwhichyoumapthemethodsorimplementtheminCOBOLisnotimportant.
ClassMethodDescriptionLoanpublicvoidaddMessage(Stringmsg)Defineswhatisneededtopassinformationfromtherules.
LoanpublicvoidrejectIdentifieswhetherornottheloanapplicationwasrejected.
BorrowerpubliclongcomputeIncomeAfterTaxComputesthenetincomeoftheborrower.
ToimplementCOBOLmethods:1.
StartbyaddingtheaddMessagemethod.
IntheRuleExplorer,expandtheBOMmodelandthendouble-clicktheLoanclass.
2.
OntheClasspageoftheBOMeditor,intheMemberssection,clickNew.
3.
OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypeaddMessageMethodtypeTypevoid4.
IntheNewMemberdialog,ontheMemberpage,clickAddandthencompletetheMethodArgumentdialogasfollows.
FieldDataentryNameTypemsgMethodtypeTypejava.
lang.
String5.
ClickOK.
6.
ClickFinishtoclosetheNewMemberdialog.
OntheClasspageoftheBOMeditor,theMemberslistnowincludestheaddMessagemethod.
7.
Double-clicktheaddMessagemethod,andintheMemberVerbalizationsectionoftheBOMEditor,clickCreatetoviewthedefaultverbalization:add{0}tothemessagesof{this}Youarenotgoingtochangethisverbalization.
8.
ScrolldowntotheBOMtoXOMmappingsectionoftheBOMEditorandthentypethefollowingJavacode:this.
messages.
add(msg);28IBMOperationalDecisionManager:GettingStartedTutorials9.
IntheCOBOLMethodsection,clickCreateamappedmethod.
ThisoptiongeneratestheCOBOLdatatypedefinitionsforthemethodanddisplaysthemintheMappedMethodtable.
10.
ChangethedefaultlengthformsgfromX(20)toX(60).
11.
IntheCOBOLMethodBodyEditor,typethefollowingCOBOLcodetoimplementthemethod.
COMPUTEmessageCount=messageCount+1MOVE{msg}TOmessages(messageCount)12.
Saveyourwork.
13.
AddtherejectmethodtotheLoanclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTyperejectMethodtypeTypevoidYoudonotaddparameterstothismethod.
Thefollowingtableshowsyouwhattoenterfortheverbalization,BOMtoXOMmapping,andCOBOLimplementation.
VerbalizationBOMtoXOMmappingCOBOLmethodAcceptthedefaultverbalization:reject{this}.
Typethefollowingcode:this.
approved=false;Implementamappedmethod:MOVE"F"TOapproved14.
AddthecomputeIncomeAfterTaxmethodtotheBorrowerclassandthensaveit:OntheMemberpageoftheNewMemberdialog,makethefollowingentries.
FieldDataentryTypeSelectMethodNameTypecomputeIncomeAfterTaxMethodtypeTypelongYoudonotaddparameterstothismethod.
Thefollowingtableshowsyouwhattoenterfortheverbalization,BOMtoXOMmapping,andCOBOLimplementation.
VerbalizationBOMtoXOMmappingCOBOLmethodChangetheverbalizationtotheincomeaftertaxof{this}.
Typethefollowingcode:if(this.
yearlyIncomeRulePackage.
b.
IntheNewRulePackagewizard,inthePackagefield,typevalidationandthenclickFinish.
ThenewvalidationrulepackagedisplaysintheRuleExplorer.
c.
Createanotherpackageandnameiteligibility.
Yourruleprojectnowcontainstwopackagesforstoringyourrules.
2.
Tocreatetheruleflow,intheRuleExplorer,selectyourruleprojectandthenclickNewRuleflowontheRuleDesignertoolbar.
3.
IntheNewRuleflowdialog,intheNamefield,typemainflowandthenclickFinish.
TheRuleflowEditoropens,displayingtheDiagrampage.
4.
ClickthestartnodeintheRuleflowpaletteandthenclicktheDiagrampage.
5.
ClicktheCreatearuletaskiconinthepaletteandthenclicktheDiagrampage.
Anewruletaskiscreated.
6.
ClickthenewruletaskandthenmakethefollowingentriesonthePropertiestab:vChangetheIDtovalidationvForRuleExecution>Algorithm,selectSequential7.
OnthePropertiestab,clickRuleSelectionandthenclickEdit.
8.
IntheSelectRulesdialog,usethearrowbuttontomovethevalidationpackagetothesidepaneandthenclickOK.
9.
Createasecondruletasknamedeligibilityandthensetitspropertiesasforthevalidationtask.
10.
MovetheeligibilitypackagetothesidepaneoftheSelectRulesdialogandthenclickOK.
30IBMOperationalDecisionManager:GettingStartedTutorials11.
Addanendnodetotheruleflow.
12.
UsingtheCreateatransitioniconinthepalette,createthefollowingtransitions:vFromthestartpointtothevalidationtaskvFromthevalidationtasktotheeligibilitytaskvFromtheeligibilitytasktotheendpoint13.
AligntheruleflowbyclickingtheLayoutAllNodesicon.
14.
Savetheruleflow.
Yourruleflowlookslikethis.
Task7:WritingactionrulesYouwriterulesusingdedicatededitorsandtheBusinessActionLanguage(BAL).
Inthistask,youwritefiveactionrulesandputthemintotherelevantpackage.
YoucanwriterulesinRuleDesigner,orinDecisionCenter.
IfyouuseDecisionCenter,makesurethatyousynchronizewithRuleDesignerbeforeyoudoso.
YoucreatethefollowingrulesinRuleDesignertotheeligibilityandvalidationpackages:PackagenameRulenameeligibilityMinimumCreditScoreMinimumAmountMinimumNetIncomevalidationMaximumAgeReqMaximumAmountTutorials31Note:Ifyouareworkinginalocalizedversionoftheproduct,makesurethatyouhaveverbalizedtheBorrowerandLoanclassesinthelanguageforyourlocalebeforeyoustartwritingrules.
Tocreatetheactionrules:1.
CreatetheMinimumCreditScorerule:a.
Intheruleproject,right-clicktheeligibilitypackageandthenclickNew>ActionRule.
b.
IntheNamefield,typeMinimumCreditScore.
c.
ClickFinish.
ThenewactionruledisplaysintheRuleExplorerviewandtheIntelliruleEditoropens.
Youcanswitchtotheguidededitorifyouprefer.
2.
Writetheeligibility.
MinimumCreditScoreruleasfollows:ifthecreditscoreof'theborrower'islessthan200thenadd"Creditscorebelow200"tothemessagesof'theloan';reject'theloan';3.
Intheeligibilitypackage,addthefollowingrules:NameRuleMinimumAmountiftheyearlyrepaymentof'theloan'ismorethantheyearlyincomeof'theborrower'*0.
3thenadd"ToobigDebt-To-Incomeratio"tothemessagesof'theloan';reject'theloan';MinimumNetIncomeiftheincomeaftertaxof'theborrower'islessthan24000thenadd"Theyearlyincomeislowerthanthebasicrequest"tothemessagesof'theloan';reject'theloan';4.
Inthevalidationpackage,addthefollowingrules:NameRuleMaximumAgeReqiftheageof'theborrower'ismorethan65thenadd"Theageexceedsthemaximum.
"tothemessagesof'theloan';reject'theloan';MaximumAmountiftheamountof'theloan'ismorethan1000000thenadd"Theloancannotexceed1000000"tothemessagesof'theloan';reject'theloan';5.
Saveyourwork.
Relatedinformation:RuleauthoringforCOBOLcompatibilityTask8:PreparingforruleexecutionToprepareforruleexecution,yougeneratetheCOBOLprogramforruleexecution.
32IBMOperationalDecisionManager:GettingStartedTutorialsInthistask,yougeneratetheCOBOLcodethatwillbeusedtoexecutetheruleswithinanEnterpriseCOBOLapplication.
ThistaskdescribeshowtogeneratethecodeinRuleDesigner,butyoucanuseDecisionCenter,oryoucanuseanAnttask.
ForinformationaboutgeneratingtheCOBOLcodeusingDecisionCenterorAnt,seeGeneratingCOBOLcode,andGeneratingCOBOLcodeusingAnt.
Note:Theselinkspointtothedistributedplatformpartofthisinformationcenter.
YoucanusetheCICSusageoptiontogenerateaCOBOLprogramthatcanrunwithCICSchannelsandcontainers.
YouconfiguretheCICSchannelandcontainernamesinRuleDesigner.
ThistaskdescribesthebasicstepsforgeneratingtheCOBOLcodeanddoesnotcovertheCICSusageoption.
ForinformationaboutconfiguringthegeneratedcodeforCICS,seeGeneratingCOBOLcodeinRuleDesignerinthedistributedplatformpartofthisinformationcenter.
TogeneratetheCOBOLcodeinRuleDesigner:1.
IntheRuleExplorer,right-clickthecodegenminiloanprojectandthenclickCOBOLCodeGeneration>GenerateCOBOLCode.
2.
IntheGenerateCOBOLCodewizard,intheCOBOLProgramIDfield,typeminirule.
3.
IntheOutputfilefield,specifywhereyouwanttostorethegeneratedCOBOLcode:vTostorethecodeinyourworkspace,clickWorkspaceandthen,ontheSaveAspage,selecttheparentfolderandtypeafilename.
vTostorethecodeinyourfilesystem,clickFileSystem,navigatetotherequireddirectory,typeafilenameintheFilenamefieldandthenclickOpen.
Forexample:/codegenminiloan/batch/minicbl.
cbl,whereisyourworkingdirectory.
4.
ClickFinish.
TheCOBOLcodegeneratorgeneratesaCOBOLprogramcontainingyourruleprojectrulesets,convertedtoCOBOLcode.
5.
AttheCOBOLcodegeneratedsuccessfullyprompt,clickOK.
6.
Navigatetoyouroutputfileandhavealookatthecodeyouhavegenerated.
ThistutorialprovidesafilecontainingasampleCOBOLprogramthatwasgeneratedagainstthecodegenminiloandatausedinthistutorial.
7.
Ifyouwanttocompareyouroutputfilewiththesampleoutputfile,openthesamplefilein:/tutorials/cobol/cobolcodegen/answer/codegenminiloan-execution/cobol/minirule.
cbl,whereistheRuleDesignerinstallationdirectory.
Note:Thesampleoutputfilerelatesonlytoen_USlocale.
Omitthisstepifyouareworkinginadifferentlocale.
Tutorials33Inareallifescenario,youpasstheCOBOLprogramtothez/OSapplicationandcompileitwiththecallingprogram.
Itisthenreadyfortestingandexecution.
Whenyouexecutetheprogramgeneratedfromthistutorial,yougetthefollowingresult:EXECUTIONRESULTBorrowerName:JohnLoanApproved:FRejectmessages:Theageexceedsthemaximum.
Themaincallingprogramforthistutorialisminimain.
cbl.
Youcanseethisfilein/tutorials/cobol/cobolcodegen/answer/codegenminiloan-execution/cobol/minimain.
cbl.
Youhavenowcompletedthetutorial.
DecisionCentertutorialsDevelopyourskillswithtutorialsforDecisionCenter.
TutorialsinstalledwithDecisionCenteronadistributedplatformdemonstratefeaturesthatarealsoapplicableonz/OS.
TheDecisionCentertutorialsarepre-configuredtorunonthesampleserver.
However,thesameusertasksarerelevantwhenyouauthorandtestyourrulesonz/OS,andadministerDecisionCenteronWebSphereApplicationServerforz/OS.
Therefore,thefollowingtutorialsandtaskscanbeofinteresttoyou.
Note:Youcaninstallthesampleserveronadistributedplatformandfollowthetutorialsonthatcomputer.
YoucandeploythetutorialapplicationsonaninstanceofWebSphereApplicationServerforz/OSandfollowthetasksthatapplytobothenvironments,oryoucansimplyreadthedocumentationtounderstandthetasksandtofindoutwhatstepsareinvolved.
Table2.
TutorialsunderDecisionCenterthatarealsorelevantonz/OSTutorialTasksEditingactionrulesanddecisiontablesTasks1-3UsingsmartfoldersandqueriesTasks1-4AnalyzingrulesTasks1-6TestingasetofrulesTasks1-4ManagingreleasesTasks1-3ImplementingpermissionsTasks1-534IBMOperationalDecisionManager:GettingStartedTutorialsNoticesThisinformationwasdevelopedforproductsandservicesofferedintheU.
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:IBMUnitedKingdomLaboratories,MailPoint151,HursleyPark,Winchester,Hampshire,EnglandSO212JNForlicenseinquiriesregardingdouble-bytecharacterset(DBCS)information,contacttheIBMIntellectualPropertyDepartmentinyourcountryorsendinquiries,inwriting,to:IntellectualPropertyLicensingLegalandIntellectualPropertyLawIBMJapan,Ltd.
19-21,Nihonbashi-Hakozakicho,Chuo-kuTokyo103-8510,JapanThefollowingparagraphdoesnotapplytotheUnitedKingdomoranyothercountrywheresuchprovisionsareinconsistentwithlocallaw:INTERNATIONALBUSINESSMACHINESCORPORATIONPROVIDESTHISPUBLICATION"ASIS"WITHOUTWARRANTYOFANYKIND,EITHEREXPRESSORIMPLIED,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFNON-INFRINGEMENT,MERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE.
Somestatesdonotallowdisclaimerofexpressorimpliedwarrantiesincertaintransactions,therefore,thisstatementmaynotapplytoyou.
Thisinformationcouldincludetechnicalinaccuraciesortypographicalerrors.
Changesareperiodicallymadetotheinformationherein;thesechangeswillbeincorporatedinneweditionsofthepublication.
IBMmaymakeimprovementsand/orchangesintheproduct(s)and/ortheprogram(s)describedinthispublicationatanytimewithoutnotice.
Anyreferencesinthisinformationtonon-IBMWebsitesareprovidedforconvenienceonlyanddonotinanymannerserveasanendorsementofthoseCopyrightIBMCorp.
2008,201235websites.
ThematerialsatthosewebsitesarenotpartofthematerialsforthisIBMproductanduseofthosewebsitesisatyourownrisk.
IBMmayuseordistributeanyoftheinformationyousupplyinanywayitbelievesappropriatewithoutincurringanyobligationtoyou.
Licenseesofthisprogramwhowishtohaveinformationaboutitforthepurposeofenabling:(i)theexchangeofinformationbetweenindependentlycreatedprogramsandotherprograms(includingthisone)and(ii)themutualuseoftheinformationwhichhasbeenexchanged,shouldcontact:IBMUnitedKingdomLaboratories,MailPoint151,HursleyPark,Winchester,Hampshire,EnglandSO212JNSuchinformationmaybeavailable,subjecttoappropriatetermsandconditions,includinginsomecases,paymentofafee.
ThelicensedprogramdescribedinthisdocumentandalllicensedmaterialavailableforitareprovidedbyIBMundertermsoftheIBMCustomerAgreement,IBMInternationalProgramLicenseAgreementoranyequivalentagreementbetweenus.
Anyperformancedatacontainedhereinwasdeterminedinacontrolledenvironment.
Therefore,theresultsobtainedinotheroperatingenvironmentsmayvarysignificantly.
Somemeasurementsmayhavebeenmadeondevelopment-levelsystemsandthereisnoguaranteethatthesemeasurementswillbethesameongenerallyavailablesystems.
Furthermore,somemeasurementsmayhavebeenestimatedthroughextrapolation.
Actualresultsmayvary.
Usersofthisdocumentshouldverifytheapplicabledatafortheirspecificenvironment.
Informationconcerningnon-IBMproductswasobtainedfromthesuppliersofthoseproducts,theirpublishedannouncementsorotherpubliclyavailablesources.
IBMhasnottestedthoseproductsandcannotconfirmtheaccuracyofperformance,compatibilityoranyotherclaimsrelatedtonon-IBMproducts.
Questionsonthecapabilitiesofnon-IBMproductsshouldbeaddressedtothesuppliersofthoseproducts.
Thisinformationcontainsexamplesofdataandreportsusedindailybusinessoperations.
Toillustratethemascompletelyaspossible,theexamplesincludethenamesofindividuals,companies,brands,andproducts.
Allofthesenamesarefictitiousandanysimilaritytothenamesandaddressesusedbyanactualbusinessenterpriseisentirelycoincidental.
COPYRIGHTLICENSE:Thisinformationcontainssampleapplicationprogramsinsourcelanguage,whichillustrateprogrammingtechniquesonvariousoperatingplatforms.
Youmaycopy,modify,anddistributethesesampleprogramsinanyformwithoutpaymenttoIBM,forthepurposesofdeveloping,using,marketingordistributingapplicationprogramsconformingtotheapplicationprogramminginterfacefortheoperatingplatformforwhichthesampleprogramsarewritten.
Theseexampleshavenotbeenthoroughlytestedunderallconditions.
IBM,therefore,cannotguaranteeor36IBMOperationalDecisionManager:GettingStartedTutorialsimplyreliability,serviceability,orfunctionoftheseprograms.
Thesampleprogramsareprovided"ASIS",withoutwarrantyofanykind.
IBMshallnotbeliableforanydamagesarisingoutofyouruseofthesampleprograms.
Eachcopyoranyportionofthesesampleprogramsoranyderivativework,mustincludeacopyrightnoticeasfollows:(yourcompanyname)(year).
PortionsofthiscodearederivedfromIBMCorp.
SamplePrograms.
CopyrightIBMCorp.
_entertheyearoryears_.
TrademarksIBM,theIBMlogo,andibm.
comaretrademarksorregisteredtrademarksofInternationalBusinessMachinesCorp.
,registeredinmanyjurisdictionsworldwide.
OtherproductandservicenamesmightbetrademarksofIBMorothercompanies.
AcurrentlistofIBMtrademarksisavailableontheWebat"Copyrightandtrademarkinformation"atwww.
ibm.
com/legal/copytrade.
shtml.
LinuxisaregisteredtrademarkofLinusTorvaldsintheUnitedStates,othercountries,orboth.
Microsoft,Windows,andtheWindowslogoaretrademarksofMicrosoftCorporationintheUnitedStates,othercountries,orboth.
UNIXisaregisteredtrademarkofTheOpenGroupintheUnitedStatesandothercountries.
JavaandallJava-basedtrademarksandlogosaretrademarksorregisteredtrademarksofOracleand/oritsaffiliates.
Notices3738IBMOperationalDecisionManager:GettingStartedTutorialsIndexAactionrule11,31BBOMcreating6,26BOMmethodsimplementing8implementinginCOBOL27BOMtoXOMmapping8,27businessobjectmodel(BOM)creatingfromCOBOLXOM6,26CCOBOLapplicationexecutingtheruleset14,20COBOLapplicationexecution21COBOLcodegeneration33COBOLprogramexecution15COBOLXOMfromCOBOLcopybook5,25Ddeclaringrulesetparameters7,26deployingartifacts13,20EexecutingaCOBOLapplication21executingaCOBOLprogram15executingaruleset14,20GgeneratingCOBOLcode33Mmarshallerdeploying20Rruleexecution13creatingaRuleApp13deployingartifacts13viewingdeployedartifacts14rulepackage11,31RuleAppprojectdeploying20RuleApp,creating13ruleflowscreating10,30rulesetexecutionCOBOLapplication14,20rulesetparametersdeclaring,intutorial7,26Vviewingdeployedartifacts14XXOMdeploying20CopyrightIBMCorp.
2008,20123940IBMOperationalDecisionManager:GettingStartedTutorialsPrintedinUSA
v5net当前对香港和美国机房的走优质BGP+CN2网络的云服务器进行7折终身优惠促销,每个客户进线使用优惠码一次,额外有不限使用次数的终身9折优惠一枚!V5.NET Server提供的都是高端网络线路的机器,特别优化接驳全世界骨干网络,适合远程办公、跨境贸易、网站建设等用途。 官方网站:https://v5.net/cloud.html 7折优惠码:new,仅限新客户,每人仅限使用一次 9...
六一云 成立于2018年,归属于西安六一网络科技有限公司,是一家国内正规持有IDC ISP CDN IRCS电信经营许可证书的老牌商家。大陆持证公司受大陆各部门监管不好用支持退款退现,再也不怕被割韭菜了!主要业务有:国内高防云,美国高防云,美国cera大带宽,香港CTG,香港沙田CN2,海外站群服务,物理机,宿母鸡等,另外也诚招代理欢迎咨询。官网www.61cloud.net最新直销劲爆...
2021年各大云服务商竞争尤为激烈,因为云服务商家的竞争我们可以选择更加便宜的VPS或云服务器,这样成本更低,选择空间更大。但是,如果我们是建站用途或者是稳定项目的,不要太过于追求便宜VPS或便宜云服务器,更需要追求稳定和服务。不同的商家有不同的特点,而且任何商家和线路不可能一直稳定,我们需要做的就是定期观察和数据定期备份。下面,请跟云服务器网(yuntue.com)小编来看一下2021年国内/国...
parameterdirection为你推荐
ghostxp3GHOST系统 ghostxp3 ghostxp2 ghostxp1 三者有什么区别?微信如何建群微信怎么建立群手机区号打电话怎么加区号?中小企业信息化信息化为中小企业发展带来了哪些机遇godaddygodaddy域名怎样使用硬盘人电脑对人有多大辐射?开机滚动条电脑开机滚动条要走好几次数据库损坏数据库坏了怎么办创维云电视功能创维电视怎么用,我买了个创维云电视,现在不知道怎么用手机往电视上传照片,谁能解答以下,ejb开发什么是EJB?它是干什么的?和JAVA,JSP有关系吗?他们各有什么特点和用途?
linux虚拟主机 长沙服务器租用 免费顶级域名 lamp安装 国外私服 web服务器架设软件 七夕快乐英文 域名接入 网游服务器 申请免费空间和域名 游戏服务器出租 阿里云邮箱登陆地址 工信部icp备案查询 重庆联通服务器托管 xshell5注册码 SmartAXMT800 沈阳idc 百度新闻源申请 远程登录 vim 更多