#!/bin/csh
cd ..
# original cport data to 3 readable formats

# 1992 is special because it is i4 rather than i6.
foreach t (dta sas7bdat csv)
  st cport orig/cport/scf*92.     orig/${t}/p92i4.${t} -excode/st.stcmd  -y
  st sasx  orig/cport/scf*92rw1x. orig/${t}/p92_rw1.${t} -excode/st.stcmd -y
end

foreach f (95 98 89 01 04 07 10 13 16 19)
  foreach t (dta sas7bdat csv)
    st cport orig/cport/scf*${f}.     orig/${t}/p${f}i6.${t}   -excode/st.stcmd  -y
    st sasx  orig/cport/scf*${f}rw1x. wgts/${t}/p${f}_rw1.${t} -excode/st.stcmd -y
  end
end

