Here is the jcl below:
//FTP2 EXEC PGM=FTP,PARM='(EXIT=8'
//SYSIN DD DSN=&SYS..PDS(file1),DISP=SHR
// DD DSN=&PREF..AAA.txt,DISP=SHR
// DD DSN=&SYS..PDS(file2),DISP=SHR
//SYSPRINT DD SYSOUT=$
//SYSOUT DD SYSOUT=$
//**********************************************************************
//* IF .TXT IS NOT FTPED THEN SEND EMAIL notification
//* AND ABEND THE JOB
// IF ( FTP2.RC EQ 8 ) THEN
//**********************************************************************
//EMAIL2 EXEC PGM=IKJEFT1B,DYNAMNBR=50
//SYSEXEC DD DISP=SHR,DSN=CNM.P.XMITIP.EXEC
//SYSPRINT DD SYSOUT=$
//SYSTSPRT DD SYSOUT=$
//SYSTSIN DD DSN=&SYS..PDS(file3),DISP=SHR
//ABENDST EXEC PGM=TSS21200
file1: server info will be there
file 2: quit
AAA.txt contains GET a.data 'USERNAME.BBBB.TXT' (replace
file 3: Mail details
FTP error:EZA2589E Connection to server interrupted or timed out. Receiving data
EZA2590E recv error from receive_data - EDC5120I INTERRUPTED FUNCTION CALL. (errno2=0x76650291)
EZA1475I Connection with ftp01.oracle.com terminated
EZA2607W Transfer aborted due to receive error (-2)
EZA1735I Std Return Code = 16150, Error Code = 00010
Whenever it fails we are restarting the job from failed step i.e) FTP2 step. Is there any other possibilities to do change in jcl to call the step again to complete the job.