RE: When the input file is empty you would always want...
In the cobol code, chk if the i/p file is empty. If yes, then pass '4' to the variable RETURN-CODE and GOBACK. Also make sure that the return code of all other steps of the JCL executing this pgm should be less than 4. Thus the RC of the step for i/p file check will become the MAXCC for the entire pgm.
RE: When the input file is empty you would always want...
after open/read/close the file, you can check the file-status. (define status-variables in working storage) Dependent on this value (will be set automatic), you can set Returncode.
BUT: I guess, it´s easier to define in internal returncode by yourself. Than make a senseful errorhandling. Otherwise it can happen sth beside your empty file and then the system´s returncode will be overwritten. So program does not end with MAXCC = 4 although your inputfile is empty.