On 05/05/2015 10:28 AM, Scott Ford wrote:
All,

Since I started this "question", so how is "one" to check for the existence
of datasets if we can't really trust IEFBR14 ? Yeah, I can write an
Assembler routine, by why, when BR14 is supposed to work...I have staging
datasets we use to build our product, my first step is the IEFBR14 , to
delete these datasets if they exist, if not fine give me a return code I
can test for and proceed on with the other steps.

Regards,
<SNIPPAGE>

I use it to delete data sets and then to allocate data sets to have a known starting point for tests, installs, etc.

In days gone by, the VTOC DSCB1 for the new data set did not get the DCB information when using IEFBR14. So I would use IDCAMS to write EOD to them to get an OPEN/CLOSE that would put the DCB info out there.

An new function/feature, apparently in ALLOC, allows the DCB information gets merged to the VTOC when you use IEFBR14.

In the case of a JES3 install, where things are required to be done via IDCAMS, I use IEFBR14 with COND=ONLY and DDs to "create" the data sets that IDCAMS will create, so that I don't have to have a CREATE JOB. Reason: JES3 Setup will kill the JOB (JCL ERROR) if it sees a DSN in the JOB that it can't find in the VTOC (exception is TAPE). It assumes the DSN will be there if it sees a STEP that "creates it" before it is needed.

The COND=ONLY says that this step can ONLY be executed if an ABEND occurred before it. But JES3 Setup ignores COND (well, I assume it still does since I haven't done this for 3 years now). So JES3 setup sees that there is a step to create the DSNs, and sees their usage, and lets it go past.

The HSM stuff has been added fairly recently (to me, any how, since I've been doing this stuff since the late '70s).

So there are various reasons for using IEFBR14.

However, your trick of DISP=(NEW,DELETE) will get zinged on a system that is running things that ask for DASD work space, unless you have pools for workspace different from "perm" allocation. And even then it can happen if another JOB that is running asks for more extents or allocates a data set.

I think you are better off to do all your allocations in the first or second STEP so that you know you will have your space, or the JOB fails due to allocation "errors".

Just my 2 cents.

Regards,
Steve Thompson

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

Reply via email to