optimization convertMps

Legacy Mainframe Migration - Fixed Format Support

Scénario de test & Cas d'usage

Business Context

A manufacturing company is migrating an old production planning optimization model from a mainframe system to SAS Viya. The legacy system exports the linear programming problem in the strict 'Fixed' MPS format (specific column alignment). The goal is to ensure the converter correctly parses this rigid format into a usable CAS table for the solver.
Data Preparation

Creation of a CAS table simulating a raw MPS file in 'FIXED' format (strict column positioning).

Copied!
1DATA casuser.mps_fixed_source; INFILE DATALINES truncover; INPUT id line $char80.; DATALINES;
21 NAME PROD_MIX
32 ROWS
43 N PROFIT
54 L MACHINE_A
65 L MACHINE_B
76 COLUMNS
87 WIDGET1 PROFIT 5.0
98 WIDGET1 MACHINE_A 2.0
109 WIDGET1 MACHINE_B 1.0
1110 WIDGET2 PROFIT 3.0
1211 WIDGET2 MACHINE_A 1.0
1312 WIDGET2 MACHINE_B 4.0
1413 RHS
1514 TIME_AVL MACHINE_A 100.0
1615 TIME_AVL MACHINE_B 150.0
1716 ENDATA
18;
19RUN;

Étapes de réalisation

1
Execution of the conversion action specifying the FIXED format.
Copied!
1 
2PROC CAS;
3optimization.convertMps /
4DATA={name='mps_fixed_source'} FORMAT='FIXED' casOut={name='mps_converted_fixed', replace=true};
5 
6RUN;
7 
8QUIT;
9 
2
Verification of the output table structure (checking if 7 columns were generated).
Copied!
1 
2PROC CAS;
3TABLE.tableInfo / TABLE='mps_converted_fixed';
4 
5RUN;
6 
7QUIT;
8 

Expected Result


The action should successfully parse the fixed-width strings. The resulting 'mps_converted_fixed' table must contain the standard 7-column MPS schema, ready for the solveLp action.