IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

What are all the activities of IEFBR14


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Mon Feb 16, 2004 8:00 pm
Reply with quote

Can anybody explain me, all the activities of IEFBR14? That means why it needed... And what it does?
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Feb 16, 2004 10:10 pm
Reply with quote

Hi priya,

In a word it does "NOTHING". icon_biggrin.gif

It is a dummy pgm that basically returns immediately to the OS that called it after putting binary zeros in register 15. That's how it got it's name: it issues a BR14 BAL intruction that returns to the caller (the OS, in this case).

I's used primarily to use the OS's alloc/dealloc routines that are invoked at ANY step initiation and termination. You can easily create and/or dellete non-VSAM datasets by merely including DD cards for each file in the IEFBR14 step.

One thing to remember is that files created this way cannot be used as input in other steps/jobs because they have not been CLOSEd and therefore don't contain a valid EOF marker; they haven't been "initialized", for want of a better term.

Of course, you can safely use them for output.

HTH, Jack.
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Tue Feb 17, 2004 8:46 am
Reply with quote

By summarizing mmwife's post....

IEFBR14

1. Clears Register 15

2. Branches the address of Register 14 (hence the name BR14) to system accumulator to revert the control back to system.

3. Pass return code as zero
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Apr 26, 2007 9:20 pm
Reply with quote

Hi,

(I'm asking this query from a very old post, I hope I'm not violatng forum rules)

MMWIFE used a term : EOF marker

above variable name is clear enough, what I can think of is -> it makes the system(OS) to understand that End Of File has reached,
Now I would like to ask the following:

1.What's the proper definition of EOF marker?

2. I think we can put EOF marker even for an empty file(I read in some manual) but in which situation sud we make this type of arrangement? &

3. what if a file does not have a EOF marker, (according to mmwife we cant use such files as input/s) then does that mean for such files the verb/s like READ will not work:

READ INPUT1
AT END (what will happen here.?, no EOF for this file)
Imperative sentence
END READ.

4. How can I find for a file whether this file is with proper EOF marker or not?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 26, 2007 9:54 pm
Reply with quote

Hello,

If the file does not have an EOF marker, the code will typically abend.

The EOF marker is internal (you don't write code to look for the "EOF value" in your program) - when program code issues a read, the "at end" condition is raised when the EOF is encountered.

It is far better to ensure that any file created has an EOF rather than try to figure this out later. One easy way to force an EOF is open the file for output, then close it without any write statements. You can also generate an EOF with IEBGENER or SORT.

In days past, simply cataloging a dataset caused the problem of no EOF which in turn caused abends (or running with incorrect data).

With SMS-managed data, an EOF is created automatically when the file is allocated.

My preference is still to make sure my files have a proper EOF - this is largely because i work on many systems and not all of them are 100% SMS-managed. It is a good thing to know that when you do something, you have not planted a time-bomb icon_smile.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Apr 27, 2007 5:53 am
Reply with quote

Hi Anju,

I'd just add these 2 minor points to Dick's reply:

1) As I recall VSAM uses an addressing mechanism to keep track of the "EOF", not a "marker"; it amounts to the same thing though. Other access methods may use something similar (not sure).

2) If you use FILE STATUS when accessing the file, you won't abend when opening an empty "uninitialized" file for input, but you'll get a status code of 35 (I think). It's easy enough to try it and display the status. Maybe, unlike me, you'll remember what it was. icon_confused.gif

BTW, check your sort manual to determine how to set the right RC for your situation if you sort a file that may be empty.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Fri Apr 27, 2007 8:15 am
Reply with quote

Hi mmwife

Quote:
One thing to remember is that files created this way cannot be used as input in other steps/jobs because they have not been CLOSEd and therefore don't contain a valid EOF marker;


does this include sort steps also??

I created a file using IEFBR14 and used it as an input to my sort step which inserts a record in to the file. ( Input and output files are the same)
And this ran successfully..

Or is this EOF marker only being used when I read the file in a program??

Or is it because the file had an EOF marker since mine is an SMS-managed system.

Quote:
With SMS-managed data, an EOF is created automatically when the file is allocated.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 27, 2007 6:12 pm
Reply with quote

Hello,

This
Quote:
Or is it because the file had an EOF marker since mine is an SMS-managed system.
is likely why it worked.

The EOF is associated with the file, not with the code that acesses it. If a file is opened/closed that will guarantee an EOF. As i mentioned before, my preference is to make sure any file i create will be readable by any process that needs to read it.

If the file was empty, and it was sorted, what was placed back into the file when the sort completed (or was the data created by the process before it became sortout)?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 27, 2007 7:07 pm
Reply with quote

Hi Dick,

One more query:

Quote:

My preference is still to make sure my files have a proper EOF -


How should one be sure about above if the dataset is not allocated in SMS environment?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 27, 2007 7:19 pm
Reply with quote

From the fine manual ......... regarding SMS.
Quote:

For sequential data sets, SMS writes a hardware EOF at the beginning of the data set at initial allocation. This prevents data integrity problems when applications try to read the data before data is written in the data set.


For non SMS managed data, I would suggest creating it with IEBGENER, using SYSUT1 as DD DUMMY, which opens the SYSUT2 DD and does not write any data to it, but then creates the EOF at dataset close.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Apr 27, 2007 8:24 pm
Reply with quote

Thanks expat.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 28, 2007 12:44 am
Reply with quote

Hi Anuj,

For
Quote:
How should one be sure about above if the dataset is not allocated in SMS environment?


Please note this from earlier:
Quote:
One easy way to force an EOF is open the file for output, then close it without any write statements. You can also generate an EOF with IEBGENER or SORT.


Please let us know if there are any questions.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 02, 2007 12:25 pm
Reply with quote

Hi Dick,

I read your replies very carefully icon_biggrin.gif , so the below quote was also unable to hide himself from my eyes icon_cool.gif

Quote:
One easy way to force an EOF is open the file for output, then close it without any write statements. You can also generate an EOF with IEBGENER or SORT.


Actually, I was thinking about 3.2 option of ISPF. If one allocate a file using 3.2 option of ISPF in a Non-SMS environment then how will one be sure about the EOF marker?

I am Mainframe user of current generation so I am not aware about whether ISPF was available in Non-SMS environment or not & I put the right question..!!(above one).

(Sometimes I think, if I could get the opprotunity to sit with people like you & you can tell me the story of Mainframes progress mixed with your personal experiences..then, I think, it would been be the best experience for me on this earth...ah dreams are always so pleasent.)
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 12:33 pm
Reply with quote

To allocate a dataset in a non SMS environment you need access to a specific SMS STORCLAS.

Confused ? - You need an SMS STORCLAS to write a non SMS dataset icon_sad.gif

The selected STORCLAS tells SMS to ignore its ACS routines and to allocate a null STORCLAS to the dataset, thus making the dataset non SMS managed.

This is usually protected within the SMS ACS routines, only available to selected users, thus stopping the "user ordinaire" from allocating non SMS managed datasets.
Back to top
View user's profile Send private message
Vijay_ml

New User


Joined: 20 Mar 2007
Posts: 7
Location: India

PostPosted: Wed May 02, 2007 1:52 pm
Reply with quote

How we can acess the uncatlg files?
To be more clear if any dataset have been created with (disp=,keep,keep)
so how we going to acess those files for some other processing.
Back to top
View user's profile Send private message
Vijay_ml

New User


Joined: 20 Mar 2007
Posts: 7
Location: India

PostPosted: Wed May 02, 2007 1:54 pm
Reply with quote

How we can acess the uncatlg files?
To be more clear if any dataset have been created with (disp=,keep,keep)
so how we going to acess those files for some other processing.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 02, 2007 2:08 pm
Reply with quote

Vijay_ml wrote:
How we can acess the uncatlg files?
To be more clear if any dataset have been created with (disp=,keep,keep)
so how we going to acess those files for some other processing.

First question Why have you appended your question onto a totally unrelated thread ?

Second question Have you searched this forum for any references to uncatalogued datasets, because the answer to your question has been posted quite recently.

Is your shop SMS managed ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 02, 2007 7:07 pm
Reply with quote

Hello,

Vijay, first - find the volser on which it was created (if you know someone who knows how to use the SMF data, you can find the VOLSER from SMF, if you cannot use SMF and you don't have the output from the job that created the file, you may find it using LISTVTOC - ) - then catalog the file or delete it. Uncataloged datasets are not your friend icon_smile.gif

Anuj, ISPF has been around for a very long time. If you use "3.2", and your dasd is non-SMS, you will have the "unusable file" problem. Your best bet is to proactively create the file with a valid EOF (posted earlier).

Good luck and we're here if there are questions icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 02, 2007 8:49 pm
Reply with quote

Thanks Dick.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 02, 2007 10:35 pm
Reply with quote

You're welcome icon_smile.gif
Back to top
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Thu May 03, 2007 12:26 pm
Reply with quote

expat wrote:
To allocate a dataset in a non SMS environment you need access to a specific SMS STORCLAS.

Confused ? - You need an SMS STORCLAS to write a non SMS dataset icon_sad.gif


Not really correct. To create a NON-SMS managed dataset it needs to have attributes that cause the STORAGE CLASS ACS routine to not set a l storclass.

Some shops implement this by code in the ACS routine like this:
Code:
IF &STORCLASS='NONSMS' THEN SET STORCLAS=''


But there are many other ways that the ACS routines can also have a
Code:
THEN SET STORCLAS=''


For instance it may just be coded that if you specify a certain (NONSMS) volser in your jcl then the acs code will honour the allocation. eg
Code:
IF &ANYVOL='SYS%%%' THEN SET STORCLAS=''
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu May 03, 2007 2:51 pm
Reply with quote

Quote:
Not really correct.

Of course it is correct, in every occurence the STORCLAS is set to '' icon_rolleyes.gif
Back to top
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Tue May 08, 2007 8:31 am
Reply with quote

Well expat, I just showed how it can be done without using any STORCLAS, so it isn't correct.

Any dataset that has NO STORCLAS set becomes non-SMS managed.

So it can be done without you needing access to any specific SMS STORCLAS. The ACS routines just have to be coded correctly.

By using:
Code:
IF &ANYVOL='SYS%%%' THEN SET STORCLAS=''

you can bypass the need...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 08, 2007 12:23 pm
Reply with quote

Yeah, but it's all site specific isn't it.

I never allow a non SMS allocation except to the chosen few, i.e. Storage, sysprogs, ( and dare I say it, even a couple of trusted JCLMs ).

I've always set it up that to be non SMS managed it must pass the filter for accepted users to STORCLAS=NONSMS, and of course filtered by DSN.

The way that you have shown - maybe there's more code to it - would allow ANYONE to allocate non SMS. Something I've found to be a real pain in past when people find out that they can - they almost certainly will - grab space anywhere.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 08, 2007 7:22 pm
Reply with quote

Hello,

And then they often complain when their data is either relocated or removed.

For my $.02, following the storage management standards should be a condition of continued employment. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts TWS - ETT File triggering does not wo... IBM Tools 4
No new posts Query on IEFBR14 with GDG JCL & VSAM 4
No new posts To know activities on db2 tables DB2 4
No new posts IEFBR14 to delete tape without tape m... JCL & VSAM 4
No new posts parm values in IEFBR14 JCL & VSAM 15
Search our Forums:

Back to Top