Skip to content

Instantly share code, notes, and snippets.

@donovan-duplessis
Created September 6, 2013 07:47
Show Gist options
  • Save donovan-duplessis/6460751 to your computer and use it in GitHub Desktop.
Save donovan-duplessis/6460751 to your computer and use it in GitHub Desktop.
# Report Transform Configuration File - Multi Manager TransactionFiles
# Import mappings from specified file
[include]
file = /admin/etc/rt_multimanager_mappingstab
# Format time from hh:mm to hhmm00
[format_valtime]
regex = s/^(\d\d):(\d\d)$/${1}${2}00/
format = "%06d"
# Remove leading spaces in header and detail fields
[format_trimspace_begin]
regex = s/^\s*//
header = true
preformat = true
# Remove trailing spaces in header and detail fields
[format_trimspace_end]
regex = s/\s*$//
header = true
preformat = true
# Remove negative sign from field
[format_abs]
regex = s/-(.*)/${1}/
[filter_ABSA_tt]
regex = /^I$/
# Filter lines starting with MONEY MARKET
[filter_money_market]
regex = /^MONEY MARKET/
# Filter lines starting with FUTURES
[filter_futures]
regex = /^FUTURES/
# Filter lines starting with OPTIONS
[filter_options]
regex = /^OPTIONS/
# Filter lines starting with Derivatives
[filter_derivatives]
regex = /^Derivatives/
# fileter lines that only contain spaces
[filter_blank_line]
regex = /^\s*$/
# - Copy the output file to configured directory
# - Create a corresponding trigger file in directory
[copy_fixed]
trigger = true
directory = /TRANS/MULTIM/FIXED
[calc_ficalc]
expr = eval {
expr = if ( <2> =~ /^(1|2)$/ ) {
expr = $temp = <0> - <1> ;
expr = return sprintf("%.2f", $temp);
expr = } else {
expr = return <0> ;
expr = }
expr = };
precalc = false
# OASIS Transaction File : OA<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_OA]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_oasis = 3
trantype_oasis = 2
abs = 9,11,13
copy = fixed
# Catalyst Transaction File : CA<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_CA]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_catalyst = 3
trantype_catalyst = 2
abs = 9,11,13
copy = fixed
# Coronation Transaction File : CO<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_CO]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_coronation = 3
trantype_coronation = 0|2:2
abs = 9,11,13
copy = fixed
# Salient Transaction File : SA<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_SA]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12
portfolio_salient = 3
trantype_salient = 0|2:2
abs = 9,11,13
ficalc = 11,12,2:11
copy = fixed
# ABSA Transaction File : AB<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
# - Exclude Transaction Type 'I'
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_AB]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( ABSA_tt:2 or blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_absa = 3
trantype_absa = 0|2:2
abs = 9,11,13
copy = fixed
# Cadiz Transaction File : CD<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_CD]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_cadiz = 3
trantype_cadiz = 0|2:2
abs = 9,11,13
copy = fixed
# Old Mututal Transaction File : OM<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Remove first column
# - Ensure amount fields hold absolute values
[report_OM]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14
portfolio_oldmutual = 4
trantype_oldmutual = 1|3:3
trantype_oldmutual_mtm = 1|3|10:3
map_in_order = trantype_oldmutual_mtm,trantype_oldmutual
removecol = 0,
abs = 10,12,14
copy = fixed
# Prescient Transaction File : PR<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
#- Exclude Money Market, Futures and Options transaction types
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_PR]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 or futures:0 or money_market:0 or options:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_prescient = 3
trantype_prescient = 0|2:2
abs = 9,11,13
copy = fixed
# Investec Transaction File : IN<yymmdd>.CSV
# - Remove leading/trailing spaces in all fields
# - Exclude all blank lines
# - Map portoflio codes to correct Hiport portofilio code
# - Map transaction types to correct Hiport transaction code
# - Ensure amount fields hold absolute values
[report_IN]
filename = ${basename}.CSV
header = false
skiptop = 1
prefilter = ( ! ( blank_line:0 ) )
trimspace_begin = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
trimspace_end = 0,1,2,3,4,5,6,7,8,9,10,11,12,13
portfolio_investec = 3
trantype_investec = 0|2:2
abs = 9,11,13
ficalc = 11,12,2:11
copy = fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment