CardDemo benchmark, in detail
What we checked, and what we missed
The details behind the public benchmark on AWS CardDemo.
Checked by running the real programs on z/OS: 57 of 58 rules confirmed
We took the rules our documents state about four CardDemo batch programs, and wrote down each one before anything ran. For each rule we built the smallest input that tests it, ran the original COBOL program on our own z/OS mainframe, and compared the output byte by byte, packed decimals included, with what the document said would happen.
| Program | What it does | Rules confirmed by running |
|---|---|---|
CBTRN02C | Posts the day's card transactions, rejects the bad ones | 20 of 20 (1 more can't be shown by output) |
CBACT04C | Calculates interest | 16 of 16 |
CBTRN03C | Prints the transaction report | 14 of 14 |
CBACT01C | Extracts accounts to three files | 7 of 8 |
The one miss: the document says an empty account file gives three empty extracts. On a file that was never loaded, the program actually stops with "ERROR OPENING ACCTFILE" (status 35).
Defects in CardDemo that the documents described, confirmed by running the program:
| Program | Input | What the program did |
|---|---|---|
CBTRN02C | Cycle credit 1,000,000,500.00, limit 1,000.00, amount 1.00 | Posted: the work field drops the top digit, so the credit limit is bypassed |
CBTRN02C | Two transactions with the same ID | Stops after the second amount was already added to the account; nothing is undone |
CBACT04C | Four accounts | The last account's interest is written as a transaction but never added to its balance |
CBACT04C | Any interest transaction | Bytes 25–100 of the description are X'00', not spaces |
CBACT01C | Cycle debit 123.45 | The extract's packed debit field is X'00…', not valid packed data |
CBTRN03C | 25 transactions | Grand total 1,235,032.58 against a true 1,234,990.16: the last amount is counted twice |
CBTRN03C | One date outside the period | The report stops there, with return code 0 and no message |
The 34 behavior questions (probes) we missed, and why
841 of 875 probes agree with the code. The 34 that don't fall into three groups:
| Why it missed | Probes | Example |
|---|---|---|
| The document describes a real defect in the code | 6 | The card update writes back the account number typed on the screen; the probe expected what the code was meant to do |
| The expected message is quoted, with more detail than the probe expects | 7 | The answer says "Update of record failed" and when it happens; the probe wanted only the message |
| Other differences in detail or reading | 21 | "Fields cleared" against "fields set to LOW-VALUES" |
See all 34, with what the code does
| Program | Question | What the code does |
|---|---|---|
COBIL00C | What happens if the transaction file browse to find the last transaction ID fails because no transactions exist at the starting position? | An error message 'Transaction ID NOT found...' is displayed and the payment is not processed. |
CODATE01 | Is the commit of a processed message guaranteed before the next message is retrieved? | Yes, a commit is performed at the start of each loop iteration, before the next message retrieval, ensuring the previous message's processing is committed. |
COCRDUPC | What happens if the record was successfully locked but the actual write/rewrite operation fails? | The message 'Update of record failed' is displayed to the user. |
COCRDUPC | What happens if the user enters an asterisk (*) in the account number field? | The asterisk is treated as a blank/empty value, and the field is cleared. |
COCRDUPC | What happens if the user enters an asterisk (*) in the card name field? | The asterisk is treated as a blank/empty value, and the card name is cleared. |
COCRDUPC | Does the system allow the user to update the account number associated with a card? | No. The account number is used as a search key and becomes read-only once card details are displayed. |
COCRDUPC | Is the cancel operation action valid when no card details have been fetched? | No. The cancel action is only valid after card details have been fetched. Before that, it is treated as an invalid key. |
COCRDUPC | When the user arrives from the card list screen and presses cancel, what happens? | The card details are re-read from the database and displayed again, effectively reverting any unsaved changes. |
COCRDSLC | What is the message shown when searching by account number alone and the account is not found in the card database? | The message 'Did not find this account in cards database' would be displayed. |
CBTRN02C | What is the format of the processing timestamp recorded on posted transactions? | The format is YYYY-MM-DD-HH.MM.SS.mm0000, where YYYY is the year, MM is the month, DD is the day, HH is the hour, MM is the minute, SS is the second, mm is milliseconds, and the remaining four digits are zeros. |
CBTRN02C | What is the key used to write posted transaction records to the transaction file? | The transaction ID from the daily transaction record is used as the key for the posted transaction file. |
COTRN01C | What header information is displayed on the View Transaction screen? | The screen displays two application title lines ('AWS Mainframe Modernization' and 'CardDemo'), the current date in MM/DD/YY format, and the current time in HH:MM:SS format. |
COTRN01C | What transaction data fields are stored in the transaction record but NOT displayed on the View Transaction screen? | The full transaction description is stored as 100 characters but the screen field only accommodates 60 characters. The merchant name is stored as 50 characters but displayed in a 30-character field. The merchant city is stored as 50 characters but displayed in a 25-character field. Additionally, there is a filler/reserved area in the record that is not displayed. |
COADM01C | When the Admin Menu is displayed for the first time in a session (initial entry), what is the state of the screen fields? | All screen fields are cleared/empty before the menu is displayed. |
COADM01C | Does the Admin Menu display menu options beyond the configured count (e.g., if only 6 options are configured, are slots 7-10 populated)? | No, only the configured number of options (6) are populated on the screen; the remaining slots are left empty. |
COBSWAIT | Does the program perform any data transformation or calculation on the input value? | No, the program does not transform or calculate the input value. It uses the input directly as the wait duration in centiseconds. |
COBSWAIT | What application domain does this utility belong to? | This utility belongs to the CardDemo application, which is a credit card management system. It serves as a general-purpose wait/delay utility within that application. |
COPAUS0C | What account-related summary information is displayed on the Authorization Summary screen? | The screen displays: approved authorization count, declined authorization count, credit balance, cash balance, approved authorization amount, declined authorization amount, credit limit, and cash credit limit. |
COPAUS0C | How is the authorization date formatted for display? | The date is formatted as MM/DD/YY, where the first two characters of the original date become the year (YY), the next two become the month (MM), and the last two become the day (DD). |
COPAUS0C | What happens when the account record is not found in the account master data? | An error message is displayed indicating that the account was not found in the account file, and the screen is redisplayed with the error. |
COPAUS0C | What happens when the customer record is not found in the customer master data? | An error message is displayed indicating that the customer was not found in the customer file, and the screen is redisplayed with the error. |
COPAUS0C | What data is passed to the Authorization Detail screen when a user selects a record? | The system passes the selected authorization's key, the originating program name, the originating transaction identifier, and sets the context to indicate a fresh entry into the detail screen. |
COPAUS0C | Does the system validate whether the Account ID exists before attempting to look up authorization data? | Yes. The system first looks up the account in the cross-reference data, then the account master, and then the customer master. Only after these succeed does it attempt to retrieve authorization summary and detail data. |
COPAUS0C | What information does each authorization row's selection field store in the session for later use? | Each row stores the authorization key of the displayed record in the session. When the user selects a row, the corresponding authorization key is used to identify which record to view in detail. |
COACTUPC | What fields become editable once account details are displayed for update? | The following fields become editable: account status, credit limit, cash credit limit, current balance, current cycle credit, current cycle debit, open date (year/month/day), expiry date (year/month/day), reissue date (year/month/day), date of birth (year/month/day), account group, SSN (all three parts), FICO score, first name, middle name, last name, address line 1, address line 2, city, state, zip code, phone number 1 (all three parts), phone number 2 (all three parts), government ID, EFT account ID, and primary cardholder indicator. The account number and customer number remain read-only. The country field also remains read-only. |
COACTUPC | How does the system compare old and new values to detect changes? Is the comparison case-sensitive? | For most text fields (names, addresses, group ID, government ID, primary holder indicator, active status), the comparison is case-insensitive — values are converted to uppercase before comparing. For numeric fields, dates, SSN, phone numbers, FICO score, and EFT account ID, the comparison is exact/case-sensitive. |
COACTUPC | What happens if the system cannot lock the account record for update? | The message 'Could not lock account record for update' is displayed, and the update is not performed. |
COACTUPC | What happens if the system cannot lock the customer record for update? | The message 'Could not lock customer record for update' is displayed, and the update is not performed. |
COACTUPC | What happens if another user changed the account or customer data between when it was fetched and when the update is attempted? | The system detects the concurrent modification and displays the message 'Record changed by some one else. Please review'. The update is not performed, and the user is shown the current (updated by the other user) details to review. |
COACTUPC | How are currency values (credit limit, cash credit limit, current balance, etc.) displayed on the screen? | Currency values are formatted with a sign, comma-separated thousands, and two decimal places (e.g., '+1,234,567.89'). |
CORPT00C | What validation is performed on the Start Date Year in a Custom report? | The year must be numeric. If it is not numeric, the message 'Start Date - Not a valid Year...' is displayed. |
CORPT00C | What validation is performed on the End Date Year in a Custom report? | The year must be numeric. If it is not numeric, the message 'End Date - Not a valid Year...' is displayed. |
CBACT01C | What special business rule applies to the current cycle debit amount when writing to the sequential output file? | If the current cycle debit from the input account record is zero, it is replaced with a fixed value of 2525.00 in the output record. |
CBACT01C | What fields from the input account record are NOT carried over to the sequential output file? | The address/zip code field from the input account record is not included in the sequential output file. |
The 11 LegacyCodeBench programs that didn't pass, and why
189 of 200 programs pass. The other 11 fail one check only, and score 100% on business rules, data structures, control flow and external calls.
The check they fail is the benchmark's behavior check, which does not run the program: for each "if X, then Y" sentence in the document, it looks for a matching IF or variable in the code. These 11 are small utility programs with 2 to 10 such sentences each, so one or two unmatched sentences fail the program. Most of the unmatched sentences describe what happens outside the program ("if it is removed from the CICS definitions, the open has no effect"), so there is no IF to find. Others are sentence pieces the checker read as a variable name ("placed in the message" looked for a variable PLACED). In none of the 11 did the checker find a sentence that contradicts the code.
| Program | Sentences not matched | Example: the text the checker read from our document | What the checker said |
|---|---|---|---|
COBSWAIT | 1 of 2 | If the value is not 8 numeric digits, the delay is unpredictable, since nothing validates it. | No conditional found checking UNPREDICTABLE |
MAINPGM | 3 of 6 | …if either is renamed, withdrawn, or given a different parameter list, this program fails or shows di… | No conditional found checking either |
SVERSONP | 1 of 3 | …bytes gets storage next to it overwritten, because the program does not check the length of the para… | No assignment found for bytes |
BDS0804 | 2 of 3 | …when the program is compiled. This lets the same program process any compatible name file without a… | No conditional found checking CASE |
DBANKIOP | 2 of 6 | If the program is missing or returns a different value, callers that branch on the access method wou… | No conditional found checking BRANCH |
CBSTM03B | 2 of 7 | …placed in the 1… | No assignment found for PLACED |
OPENFIL | 10 of 10 | If it is not run, or if it fails, the banking transactions cannot reach their files. | No conditional found checking BANKING |
SCASHDRV | 0 of 2 (no sentence failed; both were only partly matched) | ATM-FUNC-GET-ACCOUNTS is set to TRUE (value '20' of ATM-IP00-FUNCTION), ATM-IP00-USERID is set to 'B… | ATM-FUNC-GET-ACCOUNTS exists in source |
CLOSEFIL | 4 of 6 | If the definition is renamed or removed, the close fails. | No conditional found checking definition |
UBNKPLT1 | 1 of 4 | …written to transient… | No assignment found for transient |
UBNKPLT2 | 1 of 4 | If it is removed or renamed without updating the PLT, startup processing may report a missing progra… | No conditional found checking REPORT |