Professional Documents
Culture Documents
Scripting1 (Baps)
Scripting1 (Baps)
• Geetha
UET
Agenda
Scripting Introduction
Scripting Syntax
Scripting Userhooks
Introduction
This is the directory where all the scripts should exist. The
application will look for this directory
$TBA_PROD_ROOT/cust/01/INFENG/scripts
If the script is not available in this directory, it will pick the script from
the directory $TBA_PROD_ROOT/prodbase/INFENG/scripts
If the script is also not available in this directory also, the default
logic (if available) will be applied as specified in each case.
Terminology
• Repository
• Userhook
• Comparison operators like „==„, „<=„, „>=„, „<„, „>‟, „!=„ can be used.
These return values „1‟ if TRUE and 0 if FALSE.
e.g. Sv_a > sv_b
• UNARY OPERATOR
eg: sv_a = -sv_b. ( can be used only on number types)
Scripting Syntax
Control Structures
• IF ( Condition) THEN
statements
ELSE
statements
ENDIF
• WHILE (condition)
statements
DO
GOTO GOSUB
Syntax:
GOTO LabelName
GOSUB LabelName
Calling another script
A script can be called from another script.
Syntax:
Call scriptname
Or
Start scriptname
Exiting a Script
• A Class is a set of name & Value pairs i.e Field name and Field value
of a particular Type
The variable can be a scratch pad variable (sv_a) or a string (“update upr set
UESR_LOGGED_ON_FLG=‘N’ where session_id = 'xxxx'”).
Userhooks
DBCURSOROPEN
Syntax:
sv_a=BANCS.OUTPARAM.DB_CURSOR_NUMBER
sv_b=urhk_dbcursorfetch(sv_a)
for fetching all records from the cursor this userhook shall be place in
loop.
Userhooks
DBCURSORCLOSE
Syntax:
sv_a=BANCS.OUTPARAM.DB_CURSOR_NUMBER
sv_b=urhk_dbcursorclose(sv_a)
Syntax:
sv_r =urhk_b2k_printRepos(variable)
Userhooks
Get Account Details
Syntax:
sv_a =urhk_getAcctDetailsInRepository(variable)
• BANCS.OUTPARAM.acctSolId
• BANCS.OUTPARAM.acctName
• BANCS.OUTPARAM.custId
• BANCS.OUTPARAM.acctCloseflg(Y/N)
• BANCS.OUTPARAM.ledgerNumber
• BANCS.OUTPARAM.AvailableAmt
• BANCS.OUTPARAM.FullAvailableAmt
Userhooks
Syntax:
sv_a=urhk_getCustomerDetails(variable)
BANCS.OUTPARAM.CustName
BANCS.OUTPARAM.CustMaritalStatus
BANCS.OUTPARAM.NumOfAccounts
BANCS.OUTPARAM.CustMembershipDate
BANCS.OUTPARAM.DateOfBirth
BANCS.OUTPARAM.CustPermAddr1
BANCS.OUTPARAM.CustPermAddr2
Userhooks
Get the Scheme Details
Syntax:
sv_a =urhk_getSchemeDetailsInRepository(Variable)
BANCS.OUTPARAM.SchemeDescription
BANCS.OUTPARAM.DefaultInstrumentType
BANCS.OUTPARAM.DefaultClearingTranCode
BANCS.OUTPARAM.NewAccountDuration
BANCS.OUTPARAM.SchemeType
BANCS.OUTPARAM.MinPostingWorkClass
Userhooks
Validating the Account
syntax:
sv_a=urhk_valAcctNumber(variable)
input to this function is account number(FORACID)
Eg:
<--start
trace on
sv_a==“TD_41_01”
sv_b ==urhk_valAcctNumber(sv_a)
print(sv_b)
trace off
end-->
Userhooks
Validation of SOLID
syntax:
sv_a =urhk_B2k_valSolId(“Sol_id”)
eg:
<--start
trace on
sv_e =urhk_B2k_valSolId(“102”)
print(sv_e)
trace off
end -- >
Userhooks
Syntax:
Sv_a=urhk_B2k_valRefCode(variable)
<-- start
trace on
BANCS.INPARAM.date1=“10_12_2009”
BANCS.INPARAM.date2=“10_12_2008”
sv_e=urhk_B2k_dateDiff(“”)
print(BANCS.OUPARAM.dateDiff)
trace off
end-- >
Thank You
“The contents of this document are proprietary and confidential to Infosys Technologies Ltd. and may not be disclosed in whole or in part at any time, to any third party
without the prior written consent of Infosys Technologies Ltd.”
© 2007 Infosys Technologies Ltd. All rights reserved. Copyright in the whole and any part of this document belongs to Infosys Technologies Ltd. This work may not be used,
sold, transferred, adapted, abridged, copied or reproduced in whole or in part, in any manner or form, or in any media, without the prior written consent of Infosys
Technologies Ltd.