Alissa, With the below job I could produce the same.
//STEP0002 EXEC PGM=SORT
//SORTIN DD *
AAA
BBB
CCC
/*
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(1,3,CH,EQ,C'AAA'),BUILD=(1,3)),
IFTHEN=(WHEN=(1,3,CH,EQ,C'BBB'),BUILD=(3X,1,3)),
IFTHEN=(WHEN=(1,3,CH,EQ,C'CCC'),BUILD=(6X,1,3))
/*
Please let me know if this is incorrect and the disadvantages.
Thanks for your time.