Nightly.exeThe Nightly application is an overnight process. You should run this program in a scheduled process or manually from the command line. In either case, you need to attach valid user information to the invocation of the nightly program. For example, if you were typing in a DOS command shell, you could type: Nightly.exe "USER NAME"=admin PASSWORD=mypass Other parameters for the Nightly include:
A user may not run afs:TRADE unless Nightly has run for the day before. Nightly UserIf Nightly User is set on the System Defaults form [V2003.02.28]
Note that it is possible for the DBLIB client (as set in the BDE Administrator) to create multiple connections to the database. This can cause Nightly to fail even in the login is only used for Nightly. It is best to set the CDLIB client if the Nightly User feature is used. See CTLib vs. DBLib for more details. Historical Database BackupIf your system maintains historical information, the Nightly program will dump a backup copy of the complete database on the first processing day of each month. These backups can be reloaded (on demand) into a parallel database for use by reports. In addition, on a quarterly basis, the Nightly program automatically reloads the parallel database to synchronize it with the online system. Ticket activityTickets are posted on both a trade date and a settlement date basis. Some trades settle same-day and are posted to both sides immediately when the user saves the trade in afs:TRADE. All trades which were executed on a prior day but settle today must be posted before active trading begins.
Put and variable rate resetThe Nightly program compiles a list of all actively owned securities that change periodically due to put and/or variable rate considerations. As long as you fill in all necessary information up front and keep your benchmark rate tables up to date, the system should roll these values forward without any additional intervention. This stage occurs before position processing, so the new values are compiled into the system averages and cumulations. Cash Logging (>= V2002.11.8.0)If the table postlog is in the database, the Nightly will write a record for each cash adjustment made. These adjustments include settling tickets, coupon payments, maturing positions, cash ticket posting, Position resetThe position reset procedure serves two purposes: It removes items that have reached their final maturity dates, and it resets certain information for positions that remain. In addition, it handles closed positions where both trade_qty and settle_qty reach 0 because they are not always removed dynamically during the trading day (for reasons that are discussed below).
Daily Cleanup (>= V2002.11.8.0)Removes records from various tables. This section is driven by a number of [Nightly] ini values. Set TCKQUEUE_KEEP_DAYS to indicate number of tckqueue records to keep or zero to keep all records (default = 7). Set FIXEVENT_KEEP_DAYS to indicate number of fixevent records to keep or zero to keep all records (default = 7). Set AFSEVENT_KEEP_DAYS to indicate number of afsevent records to keep or zero to keep all records (default = 0). Daily Backup (>= V2002.11.8.0)Nightly will backup the afstrade database if the BACKUP_SERVER_DIRECTORY value is set. The Backup process consists of three distinct functions.
Position HistoryThis process builds position history records for the current day, assigning the current price to the history record (to cover the case where an outside process was used to update the product price history). It also assigns values to Unrealized P&L, Accrued Interest, and Accreted Interest. This process only runs if the database contains the histposn table. SYSDFLTS updateIn the sysdflts table, sets current_day to today and previous day to the day before today. afs:TRADE uses the value in current_day when determining if a user can run afs:TRADE. If current_day is less than the database server's current day, the user may not run afs:TRADE. Updating database statisticsBecause several of the database tables are very dynamic, Sybase Adaptive Server indexes can become outdated so that they are not used and potentially causing a full table scan when an index should be used. This module resets the internal statistics for all indexes for the following tables:
To use this module, add the following statement to the Nightly section of the
afstrade.ini file: See Also
Revision Notes
|