; Do not change filenames or add or remove FILEI/FILEO statements using an editor. Use Cube/Application Manager.
RUN PGM=MATRIX MSG='Create STATDATA DBF file'
FILEO RECO[1] = "{SCENARIO_DIR}\output\STATDATA_{alt}{year}.DBF",
 FORM=10.0, FIELDS=TAZ,STNODE,STNUM, FORM=10.2, FIELDS=STMAXD,STPKSP,STPKCS1,STPKCS2,STWALKPR,STWALKKR,FORM=5.0, FIELDS=TSTYPE, CFORM=30, FIELDS=STNAME
FILEI RECI = "{SCENARIO_DIR}\output\STATION_{alt}{year}.DAT",
 SORT=TAZ,
   STATION=1-4, STATNODE=5-10, TAZ=11-16, DRV=17-22, SPACES=23-28,
   A1=29-34, A2=35-40, B1=41-46, B2=47-52, C1=54-55, NAME(C)=56-85

RO.TAZ=RI.TAZ
RO.STNODE=RI.STATNODE
RO.STNUM=RI.STATION
RO.STMAXD=RI.DRV
RO.STPKSP=RI.SPACES
RO.STPKCS1=RI.A1
RO.STPKCS2=RI.A2
RO.STWALKPR=RI.B1
RO.STWALKKR=RI.B2
RO.TSTYPE=RI.C1
RO.STNAME=RI.NAME

WRITE RECO=1

ENDRUN
