modeparameterdirection

parameterdirection  时间:2021-02-25  阅读:()
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

UCloud新人优惠中国香港/日本/美国云服务器低至4元

UCloud优刻得商家这几年应该已经被我们不少的个人站长用户认知,且确实在当下阿里云、腾讯云服务商不断的只促销服务于新用户活动,给我们很多老用户折扣的空间不多。于是,我们可以通过拓展选择其他同类服务商享受新人的福利,这里其中之一就选择UCloud商家。UCloud服务商2020年创业板上市的,实际上很早就有认识到,那时候价格高的离谱,谁让他们只服务有钱的企业用户呢。这里希望融入到我们大众消费者,你...

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

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

昔日数据:香港云服务器(2G防御)、湖北云服务器(100G防御),首月5折,低至12元/月

昔日数据,国内商家,成立于2020年,主要销售湖北十堰和香港HKBN的云服务器,采用KVM虚拟化技术构架,不限制流量。当前夏季促销活动,全部首月5折促销,活动截止于8月11日。官方网站:https://www.xrapi.cn/5折优惠码:XR2021湖北十堰云服务器托管于湖北十堰市IDC数据中心,母鸡采用e5 2651v2,SSD MLC企业硬盘、 rdid5阵列为数据护航,100G高防,超出防...

parameterdirection为你推荐
fontfamily这是什么字体,求解.. font-family: PahuengaCassRegular;bbsxp老大!!您好!我是初学者!请问我的bbsxp如何更改顶端左面的LOGO??依赖注入依赖注入到底是为了解决什么问题的网站联盟百度网盟是什么,怎么加入如何建立一个网站如何建立一个网站?硬盘人500G的硬盘容量是多少啊?qq怎么发邮件用QQ怎样发送文件怎么点亮qq空间图标怎么点亮QQ空间的图标ejb开发什么是EJB?idc前线穿越火线河北的服务器好卡 有人知道怎么回事嘛 知道的速回
directspace 便宜域名 20g硬盘 老左博客 css样式大全 申请个人网页 架设服务器 hkg 泉州电信 33456 万网空间购买 免费邮件服务器 smtp虚拟服务器 卡巴斯基官网下载 杭州电信宽带 葫芦机 上海联通 hosting24 海外加速 godaddy中文 更多