That is NOT necessarily true. I will try and make a long story short.
In the nine or so years I was at one company that managed to (at least once a 
year) to end up getting someone else's data (to be precise another jobs data) 
in a so called empty data set. Yes that's right same lrecl, granted a lot of 
the Datasets had the same lrecl has other Datasets. I would receive a phone 
call in the middle of the night telling me the system was Fu@@'d up and I 
needed to come down and fix it. The first few times I went down and did problem 
determination and found bad data in the file from yesterday's runs. After a few 
times I would get the call and immediately call the VP and explain what was 
going on so he didn't get rudely called down (like I was). 

I repeatedly wrote memo's explaining what had happened and what had to be done 
(major rewrite of production JCL) estimated cost of JCL to convert to SMS so 
the system would write the EOF at deallocation time. I made the case for SMS on 
that alone.

Ed

Sent from my iPad

On Jul 14, 2011, at 9:15 PM, Quasar Chunawalla <[email protected]> 
wrote:

> Hi,
> 
> Well, at my shop they'd use the old IEBPTPCH - the print and punch utility to 
> check if there's data in the file.
> 
> Sets a RC=04, I Believe if the dataset happens to be empty.
> 
> Thank you very much,
> Quasar Chunawala
> 
> Sent on my BlackBerry® from Vodafone
> 
> -----Original Message-----
> From: Ed Gould <[email protected]>
> Sender: IBM Mainframe Discussion List <[email protected]>
> Date:         Thu, 14 Jul 2011 10:19:52 
> To: <[email protected]>
> Reply-To: IBM Mainframe Discussion List <[email protected]>
> Subject: Re: How to control in an JCL that a file is empty or not exist ?
> 
> John,
> 
> It depends. Iefbr14 itself does not open close the data set so no EOF is 
> written, except if it's a SMS dataset AND the right parameter in IGDSMSxx 
> parmlib member.
> 
> Ed
> 
> Sent from my iPad
> 
> On Jul 14, 2011, at 8:01 AM, "McKown, John" <[email protected]> 
> wrote:
> 
>> You say "in JCL". The only way that I can think of, off hand, is to run an 
>> IEFBR14 step at the beginning of the job similar to:
>> 
>> //STEP0001 EXEC PGM=IEFBR14
>> //DD1 DD DSN=first.file,DISP=(MOD,CATLG),
>> // UNIT=SYSDA,SPACE=(TRK,1),
>> // DCB=(...dcb parameters,DSORG=PS)
>> //DD2 DD DSN=second.file,DISP=(MOD,CATLG),
>> // UNIT=SYSDA,SPACE=(TRK,1),
>> // DCB=(...dcb parameters,DSORG=PS)
>> 
>> As I understand it anymore, if the dataset does not exist, this will 
>> allocate it, catalog it, AND write an EOF record on it. If the dataset 
>> already exists, it just allocates it, but does nothing else. The writing of 
>> the EOF record for a new allocation may require that the dataset be SMS 
>> managed. I forget if that is still a requirement. We do this all the time 
>> here. 
>> 
>> --
>> John McKown 
>> Systems Engineer IV
>> IT
>> 
>> Administrative Services Group
>> 
>> HealthMarkets(r)
>> 
>> 9151 Boulevard 26 * N. Richland Hills * TX 76010
>> (817) 255-3225 phone * 
>> [email protected] * www.HealthMarkets.com
>> 
>> Confidentiality Notice: This e-mail message may contain confidential or 
>> proprietary information. If you are not the intended recipient, please 
>> contact the sender by reply e-mail and destroy all copies of the original 
>> message. HealthMarkets(r) is the brand name for products underwritten and 
>> issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake 
>> Life Insurance Company(r), Mid-West National Life Insurance Company of 
>> TennesseeSM and The MEGA Life and Health Insurance Company.SM
>> 
>>> -----Original Message-----
>>> From: IBM Mainframe Discussion List 
>>> [mailto:[email protected]] On Behalf Of Hilario G.
>>> Sent: Thursday, July 14, 2011 7:40 AM
>>> To: [email protected]
>>> Subject: How to control in an JCL that a file is empty or not exist ?
>>> 
>>> Hello folks,
>>> 
>>> I have several batch processes that contain empty files or 
>>> files that do not exist. 
>>> 
>>> I need to control the execution of certain programs based on 
>>> the existence of these files (including files created empty).
>>> 
>>> I try to used IDCAMS but didn't work in my tests. 
>>> 
>>> Thank you very much everyone. 
>>> 
>>> ----------------------------------------------------------------------
>>> For IBM-MAIN subscribe / signoff / archive access instructions,
>>> send email to [email protected] with the message: GET IBM-MAIN INFO
>>> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>>> 
>>> 
>> 
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: GET IBM-MAIN INFO
>> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to