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
Ceraus数据成立于2020年底,基于KVM虚拟架构技术;主营提供香港CN2、美国洛杉矶CN2、日本CN2的相关VPS云主机业务。喜迎国庆香港上新首月五折不限新老用户,cera机房,线路好,机器稳,适合做站五折优惠码:gqceraus 续费七五折官方网站:https://www.ceraus.com香港云内存CPU硬盘流量宽带优惠价格购买地址香港云2G2核40G不限5Mbps24元/月点击购买...
licloud官方消息:当前对香港机房的接近100台物理机(香港服务器)进行打折处理,30Mbps带宽,低至不到40美元/月,速度快,性价比高,跑绝大多数项目都是绰绰有余了。该款香港服务器自带启动、关闭、一键重装功能,正常工作日内30~60分钟交货(不包括非工作日)。 官方网站:https://licloud.io 特价香港物理服务器 CPU:e3-1230v2(4核心、8线程、3.3GH...
ucloud6.18推出全球大促活动,针对新老用户(个人/企业)提供云服务器促销产品,其中最低配快杰云服务器月付5元起,中国香港快杰型云服务器月付13元起,最高可购3年,有AMD/Intel系列。当然这都是针对新用户的优惠。注意,UCloud全球有31个数据中心,29条专线,覆盖五大洲,基本上你想要的都能找到。注意:以上ucloud 618优惠都是新用户专享,老用户就随便看看!点击进入:uclou...
parameterdirection为你推荐
中国电信互联星空怎么在中国电信网上营业厅自行开通互联星空消费权限1433端口路由器1433端口怎么开启不兼容vivo手机和软件不兼容怎么办?天天酷跑刷金币天天酷跑如何刷分刷金币?硬盘人什么叫“软盘人”和“硬盘人”?开机滚动条开机滚动条要很长时间怎么解决?神雕侠侣礼包大全神雕侠侣陈晓礼包兑换码怎么获得宕机宕机 这个词是什么意思啊二层交换机什么是二层交换机和三层交换机???微信怎么看聊天记录微信在手机上怎么查看聊天记录
主机屋 google电话 免费主机 godaddy续费优惠码 gomezpeer gspeed 网站cdn加速 免费吧 免费全能主机 linux服务器维护 国外免费asp空间 网通服务器托管 metalink 免费外链相册 登陆空间 台湾google lick 谷歌台湾 lamp架构 ledlamp 更多