Skip to main content

Deep Dive: Remaining Modules

1. Shipping / Document Tracking (pwrpclos + doctrac)

Narrative

The Shipping module manages post-closing operations: tracking required documents per loan and tracking shipment tasks per trade. It ensures all required documents are received, reviewed, and shipped before investor delivery deadlines.

Document Tracking Workflow

Business Rules

  • Default documents are determined by product type, investor, guarantor, and counterparty
  • Documents come from 4 sources: pscat_products_documents_rel, pscat_trades_documents_rel, pscat_guar_doc_relation, pscat_trade_cntrprtys_doc_rel
  • Initial status per document type is configured via n_cst_document_tracking.of_get_initial_status_for_document()
  • Default document retrieval runs only once per session (ib_allow_default_doc_retrieval = FALSE after first run)
  • Batch mode supports updating statuses across multiple loans simultaneously

Shipment Task Tracking

  • Tracks shipping tasks per trade (not per loan)
  • Tasks have statuses and target dates
  • Shared UI component uo_tab_tracking handles both document (dt) and shipment (st) tracking via context parameter

Data Model

TablePurpose
pscat_loans_documents_relationLoan-to-document status tracking (PK: loan_id + document_name + status + status_date)
pscat_documentsDocument definitions
pscat_document_typesDocument type categories
pscat_document_status_relationValid status transitions
pscat_products_documents_relDefault documents by product
pscat_trades_documents_relDefault documents by trade
pscat_guar_doc_relationDefault documents by guarantor
pscat_trade_cntrprtys_doc_relDefault documents by counterparty

2. Bid Packaging (bid_pkg)

Narrative

The Bid Packaging module supports bulk loan sales by creating bid packages, soliciting investor bids, and selecting winning bids. Pools of loans are offered to multiple investors who submit competing prices.

Bid Packaging Workflow

Business Rules

  • Bid packages reference pools marked with bulk_sale_flag = 'y'
  • Each package can have multiple investor bids
  • Bid components: bid_price, bid_msr_price, price_adjustment, handling_fees
  • Weighted average price computed across instruments in the package
  • Run analysis uses the same pricing engine infrastructure as Best Execution

Data Model

TablePurpose
rmcat_bidpkg_investor_bidsInvestor bid prices per package (PK: package_name + investor_id + profile_name)
rmcat_bidpkg_investor_instBid instrument details (PK: package_name + investor_id + bid_price_component + instrument_name + profile_name)
d_bulk_packaging_investorsInvestors eligible for bulk packaging
d_list_open_pools_for_bid_pkgAvailable pools for packaging

3. Import/Export (import + app_extf)

Narrative

The Import module loads loan and entity data into PowerSeller from external sources (files, databases, XML). The Export module writes data out in 11 formats. Both use configurable mapping systems to translate between external and internal field names.

Import Validation Pipeline

Export Formats

FormatExtensionNotes
CSV.csvConfigurable separator/delimiter
DBase3.dbfLegacy format
Excel8.xlsExcel 97-2003
XLSX.xlsxExcel 2007+
HTML.htmlTable format
PDF.pdfReport format
PSR.psrPowerBuilder saved report
SQL Insert.sqlINSERT statements
Text.txtFixed-width or delimited
XML.xmlCustom XML structure
XSL-FO.foFormatting objects

ULDD/XML Import-Export

  • Supports MISMO 3.0, ULDD Phase 4a/5, Ginnie Mae PDD 3.0
  • Uses .NET interop (nvo_ddxmlPowerSeller.DDXml.dll)
  • Staging tables: psuldd_*
  • Maps: FRE ULDD 4A/5, FNM ULDD 4A/5, GNM PDD 3.0

4. Archive (archive)

Narrative

The Archive module manages data lifecycle by moving aged records from active tables to archive tables, and optionally restoring or purging them.

Archive/Restore/Purge Workflow

Archive Contexts

ContextActive TablesArchive TablesDescription
shippedpscat_tradespsarc_trades + relatedTrade settlement data
doctracpscat_loans_documents_relationpsarc_loans_documents_relationDocument tracking
loan_modloan_modificationspsarc_loan_modificationsLoan modifications
exp_optionExpired option tradesArchive tablesExpired options
bestexBestEx analysis resultsArchive tablesPricing analysis
inquiryInquiry resultsArchive tablesRate sheet inquiries
notionalNotional resultsArchive tablesNotional analysis
riskpricesRisk pricesrmarc_pricesHistorical prices

Business Rules

  • Table structures are verified before archive/restore (synced if mismatched)
  • Unsettled trades are excluded from shipped archive (logged in excluded records)
  • Archive uses date-based WHERE clauses
  • Primary key columns are auto-detected for cursor/WHERE generation

5. Security (security + app_sec + app_cyph)

Narrative

The Security module implements group-based role-based access control (RBAC), site licensing, user management, and encryption for sensitive configuration data.

RBAC Model

Access Control Rules

  • Admin user gets full access to everything
  • secadmin user gets full access to security-related menus
  • Regular users get access via group membership
  • n_cst_user_security.of_get_menu_access(menu_name, user_name) returns 'w', 'r', or 'n'
  • n_cst_user_security.of_get_control_access(control_id, user_name) returns same levels
  • ib_override_security flag can bypass security checks

Licensing

  • Site information in pxcat_site_info (company, modules, user_limit, expiration, site_key)
  • Module licensing: Risk Manager, Data Manager, Secondary Manager, Post Closing, App Runner
  • Concurrent user limits enforced via pxcat_user_registrations
  • Plugin licensing: per-plugin expiration dates in pxcat_site_plugins

Encryption

  • Custom hash-based substitution cipher in n_cst_encryption
  • of_encrypt_value() / of_decrypt_value() for application-level encryption
  • Optional machine binding (machine name embedded in encrypted value)
  • SQL Server EncryptByPassPhrase / DecryptByPassPhrase for database-level encryption of plugin configs

Login Flow

  • Standard login: username + password
  • Integrated security: Windows authentication
  • Admin recovery: GoldKey master password
  • Password history: pxcat_password_history tracks changes
  • Login attempts: logged for audit

6. Macros (app_macr)

Narrative

The Macro module provides automation capabilities, allowing users to define and schedule batch operations across all PowerSeller modules.

Macro System

Macro Module Types

ModuleOperations
Data ManagerDatabase import, file export/import, process pipeline, reports, stored procedure, SQL file, email report, XML export/import, VMD data pipeline
Risk ManagerRisk analysis, risk analytics, store prior risk results
Secondary ManagerPools, unpool, pricing best execution, rate sheet inquiry/notional, set futures dates, best efforts process/settle, reservation import, update issue date principal balance
DDEDDE pricing execution
Loan EligibilityLoan eligibility analysis
PluginsCustom plugin modules (from pxcat_macro_module_plugins)

Business Rules

  • of_user_has_access_to_module(module_name) checks both service licensing and menu access
  • Macro groups can run at specified times and intervals
  • Command-line support: -exit (exit after run), -start (auto-start), -interval (repeat interval)
  • Macros execute in the sequence defined within the group

7. Reports (reports)

Narrative

The Reports module provides DataWindow-based reporting with print preview and batch printing capabilities.

Key Reports

ReportDescription
Risk Position Reconciliation SummaryAggregated risk exposure by profile/segment
Risk Position Reconciliation DetailDetailed position breakdown
Cumulative Value Change (SEC 105/109)Regulatory reporting for cumulative value changes
Cost of HedgingAnalysis of hedging costs over time
Cross RatiosCross-instrument ratio analysis

Reporting Infrastructure

  • Reports are DataWindow objects (.srd) with embedded SQL, bands, and formatting
  • n_cst_reports handles report execution, formatting, and output
  • Reports accessible from every module's menu via w_pick_multiple_reports_sheet
  • Batch printing support via w_modal_print_mod_win_batch
  • Reports can be triggered via the macro system for automated execution
  • f_print_report_header generates standard report headers

Data Sources

  • Risk reports use rmcat_risk_pos_recon and related tables
  • Pipeline reports use loan and related tables
  • Trade reports use pscat_trades and related tables
  • Reports can use VMD queries for custom data retrieval