# interest_post.fin include "common_functions.fin" var acctList = ["SAV001", "SAV002", "SAV003"] var rate = 4.5
While loop var count = 1 while (count <= 5) print "Iteration: " + count count = count + 1
for each acct in accounts print "Processing: " + acct finacle scripting syntax
var intAmt = calculateInterest(50000, 8.5, 30) print "Interest: " + intAmt Functions are — can be assigned to variables or passed as arguments (limited support). 7. File I/O & External Calls # Read file var lines = readFile("/data/input.txt") Write file writeFile("/data/output.txt", "Process completed") Call external REST API (Finacle 10+) var response = callAPI("GET", "https://api.example.com/rate", {}) 8. Error Handling try var bal = getAccountBalance("INVALID_ACCT") catch (err) print "Error code: " + err.code print "Message: " + err.message exit 1
for each acct in acctList try var balance = getAccountBalance(acct) if (balance > 0) var interest = calculateInterest(balance, rate, 30) postTransaction("CREDIT", acct, interest) logMessage("INFO", "Interest credited to " + acct) # interest_post
| Command | Purpose | Example | |---------|---------|---------| | getCustomerDetails(custId) | Fetch customer info | var cust = getCustomerDetails("C12345") | | getAccountBalance(acctId) | Get balance | var bal = getAccountBalance("SAV001") | | postTransaction(...) | Post a transaction | postTransaction("DEBIT", "SAV001", 1000) | | callService(serviceName, params) | Invoke Finacle service | callService("InterestCalculation", "acctId":"SAV001") | | logMessage(level, text) | Log (INFO/WARN/ERROR) | logMessage("ERROR", "Balance insufficient") | | sleep(ms) | Pause execution | sleep(2000) | 6. Functions function calculateInterest(principal, rate, days) var interest = (principal * rate * days) / 36500 return interest
catch (err) logMessage("ERROR", "Failed for " + acct + " : " + err.message) Overview Finacle scripting is used for customization, batch
Here’s a helpful review of — covering its core structure, common commands, variables, loops, conditions, and best practices. 1. Overview Finacle scripting is used for customization, batch processing, and business logic implementation within Infosys Finacle (core banking). Scripts are typically written in a proprietary scripting language resembling a mix of shell scripting and basic programming constructs . 2. Basic Syntax Rules | Element | Syntax / Example | |---------|------------------| | Comment | # This is a comment | | Statement terminator | Newline (no semicolon required) | | String literal | "Hello" or 'Hello' | | Variable assignment | var name = "Finacle" | | Print to log/output | print "Message" | | Include another script | include "common_script.fin" | 3. Variables & Data Types # String var customerName = "John Doe" Number (decimal/integer) var balance = 5000.75 Boolean var isActive = true Array (list) var accounts = ["SAV001", "CUR002", "FD003"] 💡 Variables are dynamically typed . No explicit declaration needed — var is optional in some versions, but recommended. 4. Control Structures Conditional (if-else) if (balance < 1000) print "Low balance alert" else if (balance >= 1000 && balance < 10000) print "Normal balance" else print "High balance"
By continuing to use the site, you agree to the use of cookies. More Information...
The cookie settings on this website are set to "Allow Cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings, or you click "Accept" below, then you are consenting to this. For further information, please see our Terms and Conditions, Cookie Policy and Privacy Policy.