Scénario de test & Cas d'usage
Creation of a small, irregularly spaced 'FREE' format MPS table.
| 1 | DATA casuser.mps_irregular; INFILE DATALINES; INPUT id line $80.; DATALINES; |
| 2 | 1 NAME PORTFOLIO |
| 3 | 2 ROWS |
| 4 | 3 N RETURN |
| 5 | 4 L RISK |
| 6 | 5 COLUMNS |
| 7 | 6 ASSET_A RETURN 0.05 |
| 8 | 7 ASSET_A RISK 0.02 |
| 9 | 8 ASSET_B RETURN 0.08 |
| 10 | 9 ASSET_B RISK 0.12 |
| 11 | 10 RHS |
| 12 | 11 LIMIT RISK 0.05 |
| 13 | 12 ENDATA |
| 14 | ; |
| 15 | RUN; |
| 1 | |
| 2 | PROC CAS; |
| 3 | optimization.convertMps / |
| 4 | DATA={name='mps_irregular'} FORMAT='FREE' casOut={name='mps_clean_portfolio', replace=true}; |
| 5 | |
| 6 | RUN; |
| 7 | |
| 8 | QUIT; |
| 9 |
| 1 | |
| 2 | PROC CAS; |
| 3 | SIMPLE.summary / TABLE='mps_clean_portfolio'; |
| 4 | |
| 5 | RUN; |
| 6 | |
| 7 | QUIT; |
| 8 |
The action should succeed because 'FREE' format is designed to handle variable whitespace. The output table 'mps_clean_portfolio' should be correctly structured, normalizing the input irregularities.