Scott,

I wasn't sure where the best place was in this thread to reply, as like all
IEFBR14 threads it has generated a lot of conversation for a program that
does virtually nothing, so I hose your original post. My two cents worth may
already have been covered in the many replies you already have. This is my
best guess on your situation, and I'm happy to be corrected by smarter
people.

The 2001-4 abend is because the DCB attributes of the a file you are reading
do not match the actual contents of the file. That's no surprise when you
allocate an empty file with IEFBR14 because it doesn't open the file, it
just cause the space to be allocated. With or without an EOF mark you have
not changed the underlying tracks to match the DCB and so you get a S001-4
when your COBOL program tries to read it.

When you allocate the file as SYSUT2 with IEBGENER the file is actually
opened and so the DCB and track contents actually match. Ipso facto there is
no s001-4.

And finally, my memory may be a bit dodgy nowadays, but it's my recollection
that the EOF for empty datasets was introduced so that DFSMShsm and DFSMSdss
could migrate, move and copy empty datasets. When there is no EOF for a zero
empty dataset these utilities choke and spit it back. I don't think security
was an objective.

Ron

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Scott Ford
> Sent: Monday, March 12, 2012 8:00 AM
> To: [email protected]
> Subject: [IBM-MAIN] IEFBR14
> 
> All,
> 
> I just ran across something that didn't make sense or maybe I was under a
> misconception..
> 
> I created a DATASET , Qsam file , with iefbr14 , everything looked fine. A
> COBOL program goes to open the file and abends with a S001-4 , the
> resolution was to create the DATASET with a gener...never have seen this
> situation before ...has anyone else seen this one before?
> 
> Sent from my iPad
> Scott Ford
> Senior Systems Engineer
> www.identityforge.com
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send email
to
> [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to