Here's a DFSORT job that will do what I think you're asking for. As Dick says, you don't have to show us your actual data ... you can just make up some similar data. The better and sooner you can explain what you want, the more likely you are to get help.
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//SORTOUT DD DSN=... output file (FB)
//SYSIN DD *
OPTION COPY,VLSCMP
INCLUDE COND=(14,1,CH,EQ,C'I',OR,
(14,1,CH,EQ,C'S',AND,19,1,CH,NE,C'T'))
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,5:14,1,6:C'0',7:C'0',5X)),
IFTHEN=(WHEN=(5,1,CH,EQ,C'S'),OVERLAY=(6:C'1')),
IFTHEN=(WHEN=NONE,OVERLAY=(7:C'1'))
OUTFIL NODETAIL,REMOVECC,VTOF,BUILD=(5,8),
TRAILER1=(TOT=(6,1,ZD,TO=ZD,LENGTH=8),/,
TOT=(7,1,ZD,TO=ZD,LENGTH=8))
/*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB)
//SORTOUT DD DSN=... output file (FB)
//SYSIN DD *
OPTION COPY,VLSCMP
INCLUDE COND=(14,1,CH,EQ,C'I',OR,
(14,1,CH,EQ,C'S',AND,19,1,CH,NE,C'T'))
INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,5:14,1,6:C'0',7:C'0',5X)),
IFTHEN=(WHEN=(5,1,CH,EQ,C'S'),OVERLAY=(6:C'1')),
IFTHEN=(WHEN=NONE,OVERLAY=(7:C'1'))
OUTFIL NODETAIL,REMOVECC,VTOF,BUILD=(5,8),
TRAILER1=(TOT=(6,1,ZD,TO=ZD,LENGTH=8),/,
TOT=(7,1,ZD,TO=ZD,LENGTH=8))
/*