Try the following:
000020 //MYSORT EXEC PGM=SORT,COND=(0,NE)
000021 //SORTIN DD DSN=C8112.DATA.FX,DISP=SHR
000022 //SORTOUT DD DSN=C8112.DATA.FX.SORT,
000023 // SPACE=(TRK,(100,100),RLSE),
000024 // DISP=(NEW,CATLG,DELETE),
000025 // DCB=(LRECL=61,RECFM=FB)
000026 //SYSIN DD *
000027 SORT FIELDS=COPY
000029 OUTFIL INCLUDE=(1,18,CH,EQ,C'ANDRADE,LUISA')
...
000032 END
000031 /*
000033 //SYSOUT DD SYSOUT=*
000034 //*
SORT SYSIN does not allow for "comments". Those lines you thought might have been comments really are't. They terminate the SYSIN DD statements. Basically I just got rid of:
//* SORT FIELDS=(1,18,CH,A) OU SORT=COPY
and
//* OUTREC=(39,41,1,18,19,38)
then it all works fine. Remember, a JCL comment is not a SORT comment! The stuff after a DD *
are data, not JCL source statements so JCL type commenting conventions do not work here. The DD *
is typically terminated by a line starting with: /*
.