JCL for backing up non-empty files JCL for backing up non-empty files weberm (Programmer) (OP) 23 Apr 11 15:20 I have some JCL that used IDCAMS to make backups of ASCII load files. Is there a way for the JCL to test the file and skip making a back up if the file is empty? RE: JCL for backing up non-empty files TysonLPrice (Programmer) 25 Apr 11 05:10 I've been off the mainframe for almost ten years but if you do a copy like IDCAMS, IEBGENER, or something like that they return a value if the file is empty. One of those utilities and using CONDCODE checking you could check to run the copy or not. RE: JCL for backing up non-empty files randy700 (Programmer) 25 Apr 11 09:40 weberm,Are you looking for something like this?CODE//*STEP01 CHECK FOR DATA TO FTP//*//STEP01 EXEC PGM=FILECHK4,PARM=16//SYSOUT DD SYSOUT=*//FILECHK DD DSN=PRD1.LVL6.FILENAME.#14,DISP=OLD//*//FCHK1 IF (STEP01.RC = 0) THEN//STEP02 EXEC PGM=FTP,PARM='-v (EXIT '//SYSMDUMP DD SYSOUT=*//SYSPRINT DD SYSOUT=*//OUTPUT DD SYSOUT=*//NETRC DD DSN=PROD.LVL6.CTLLIB(FT0)//INPUT DD DSN=PROD.LVL6.RPTLIB(FT6)//*//FCHKEND1 ENDIF//* Randy RE: JCL for backing up non-empty files papadba (MIS) 18 May 11 16:49 How does this relate to COBOL?One way to do what you want is to set up the JCL to have 2 steps per file. The first step determines if the file is empty and sets the Return Code (COND CODE). This does not need to read the entire file. . .The second step executes conditionally and copies the file to wherever it needs to go.What is an "ascii load file"?