javivi,
Use the following DFSORT JCL which will give you the desired results. Step0100 will set a return code of 4 when your input file does not have '*' records. step0200 will ONLY run when you don't have '*' records.
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your input file,DISP=SHR
//SORTOUT DD DSN=Your Output file,
// DISP=(New,CATLG,DELETE),
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
OPTION COPY,NULLOUT=RC4
INCLUDE COND=(125,1,CH,EQ,C'*')
//*
//STEP0200 EXEC PGM=SORT,COND=(0,EQ,STEP0100)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your Output file from step0100,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,BUILD=(80X),
HEADER1=('ON ',DATE=(4MD-),' WE HAVE NO ERRORS.')
//*