IEFBR14

Last updated

IEFBR14 is an IBM mainframe utility program. It runs in all IBM mainframe environments derived from OS/360, including z/OS. It is a placeholder that returns the exit status zero, similar to the true command on UNIX-like systems. [1]

Contents

Purpose

Allocation (also called Initiation)

On OS/360 and derived mainframe systems, most programs never specify files (usually called datasets) directly, but instead reference them indirectly through the Job Control Language (JCL) statements that invoke the programs. These data definition (or "DD") statements can include a "disposition" (DISP=...) parameter that indicates how the file is to be managed whether a new file is to be created or an old one re-used; and whether the file should be deleted upon completion or retained; etc.

IEFBR14 was created because while DD statements can create or delete files easily, they cannot do so without a program to be run due to a certain peculiarity of the Job Management system, which always requires that the Initiator actually execute a program, even if that program is effectively a null statement. [2] The program used in the JCL does not actually need to use the files to cause their creation or deletion the DD DISP=... specification does all the work. Thus a very simple do-nothing program was needed to fill that role.

IEFBR14 can thus be used to create or delete a data set using JCL.

Deallocation (also called Termination)

A secondary reason to run IEFBR14 was to unmount devices (usually tapes or disks) that had been left mounted from a previous job, perhaps because of an error in that job's JCL or because the job ended in error. In either event, the system operators would often need to demount the devices, and a started task DEALLOC was often provided for this purpose.

Simply entering the command

S DEALLOC

at the system console would run the started task, which consisted of just one step. However, due to the design of Job Management, DEALLOC must actually exist in the system's procedure library, SYS1.PROCLIB, lest the start command fail.

Also, all such started tasks must be a single jobstep as the "Started Task Control" (STC) module within the Job Management component of the operating system only accepts single-step jobs, and it fails all multi-step jobs, without exception.

//STEP01    EXEC PGM=IEFBR14

Parsing and validation

At least on z/OS, branching off to execute another program would cause the calling program to be evaluated for syntax errors at that point. [1]

Naming

The "IEF" derives from a convention on mainframe computers that programs supplied by IBM were grouped together by function or creator and that each group shared a three-letter prefix. In OS/360, the first letter was almost always "I", and the programs produced by the Job Management group (including IEFBR14) all used the prefix "IEF". Other common prefixes included "IEB" for dataset utility programs, "IEH" for system utility programs, and "IEW" for program linkage and loading. [3] Other major components were (and still are) "IEA" (Operating System Supervisor) and "IEC" (Input/Output Supervisor).

As explained below, "BR 14" was the essential function of the program, to simply return to the operating system. This portion of a program name was often mnemonic for example, IEBUPDTE was the dataset utility (IEB) that applied updates (UPDTE) to source code files, and IEHINITT was the system utility (IEH) that initialized (INIT) magnetic tape labels (T).

As explained further in "Usage" below, the name "BR14" comes from the IBM assembler-language instruction "Branch (to the address in) Register 14", which by convention is used to "return from a subroutine". Most early users of OS/360 were familiar with IBM Assembler Language and would have recognized this at once.

Usage

Example JCL would be :

//IEFBR14JOBACCT,'DELETE DATASET',MSGCLASS=J,CLASS=A//STEP0001EXECPGM=IEFBR14//DELDD    DD DSN=xxxxx.yyyyy.zzzzz,//DISP=(MOD,DELETE,DELETE),UNIT=DASD

To create a Partitioned Data Set:

//TZZZ84RJOBNOTIFY=&SYSUID,MSGCLASS=X//STEP01EXECPGM=IEFBR14//DD1       DD DSN=TKOL084.DEMO,DISP=(NEW,CATLG,DELETE),//DCB=(RECFM=FB,LRECL=80,BLKSIZE=80,DSORG=PO),//SPACE=(TRK,(1,1,1),RLSE),//UNIT=SYSDA

Implementation

IEFBR14 consisted initially of a single instruction a "Branch to Register" 14. The mnemonic used in the IBM Assembler was BR and hence the name: IEF BR 14. BR 14 is identically equivalent to BCR 15,14 (Branch Always [ mask = 15 = always ] to the address contained in general purpose register 14). BR is a pseudo instruction for BCR 15. The system assembler accepts many cases of such pseudo-instructions, as logical equivalents to the canonical System/360 instructions. The canonical instance of BR 14 is BCR 15,14.

The linkage convention for OS/360 and its descendants requires that a program be invoked with register 14 containing the address to return control to when complete, and register 15 containing the address at which the called program is loaded into memory; at completion, the program loads a return code in register 15, and then branches to the address contained in register 14. But, initially IEFBR14 was not coded with these characteristics in mind, as IEFBR14 was initially used as a dummy control section, one which simply returned to the caller, not as an executable module.

The original version of the program did not alter register 15 at all as its original application was as a placeholder in certain load modules which were generated during Sysgen (system generation), not as an executable program, per se. Since IEFBR14 was always invoked by the functional equivalent of the canonical BALR 14,15 instruction, the return code in register 15 was always non-zero. Later, a second instruction was to be added to clear the return code so that it would exit with a determinate status, namely zero. Initially, programmers were not using all properties of the Job Control Language, anyway, so an indeterminate return code was not a problem. However, subsequently programmers were indeed using these properties, so a determinate status became mandatory. This modification to IEFBR14 did not in any way impact its original use as a placeholder.

The machine code for the modified program is:

        SR    R15,R15  put zero completion code into register 15         BR    R14      branch to the address in register 14 (which is actually an SVC 3 instruction in the Communications Vector Table)

The equivalent machine code, eliminating the BR for clarity, is:

        SR    R15,R15  put zero completion code into register 15         SVC   3        issue EXIT SVC to terminate the jobstep

This makes perfect sense as the OS/360 Initiator initially "attaches" the job-step task using the ATTACH macro-instruction (SVC 42), and "unwinding" the effect of this ATTACH macro (it being a Type 2 SVC instruction) must be a complementary instruction, namely an EXIT macro (necessarily a Type 1 SVC instruction, SVC 3).

See also

Related Research Articles

<span class="mw-page-title-main">MVS</span> Operating system for IBM mainframes

Multiple Virtual Storage, more commonly called MVS, is the most commonly used operating system on the System/370, System/390 and IBM Z IBM mainframe computers. IBM developed MVS, along with OS/VS1 and SVS, as a successor to OS/360. It is unrelated to IBM's other mainframe operating system lines, e.g., VSE, VM, TPF.

z/OS 64-bit operating system for IBM mainframes

z/OS is a 64-bit operating system for IBM z/Architecture mainframes, introduced by IBM in October 2000. It derives from and is the successor to OS/390, which in turn was preceded by a string of MVS versions. Like OS/390, z/OS combines a number of formerly separate, related products, some of which are still optional. z/OS has the attributes of modern operating systems but also retains much of the older functionality originated in the 1960s and still in regular use—z/OS is designed for backward compatibility.

<span class="mw-page-title-main">System call</span> Way for programs to access kernel services

In computing, a system call is the programmatic way in which a computer program requests a service from the operating system on which it is executed. This may include hardware-related services, creation and execution of new processes, and communication with integral kernel services such as process scheduling. System calls provide an essential interface between a process and the operating system.

In computing, Interactive System Productivity Facility (ISPF) is a software product for many historic IBM mainframe operating systems and currently the z/OS and z/VM operating systems that run on IBM mainframes. It includes a screen editor, the user interface of which was emulated by some microcomputer editors sold commercially starting in the late 1980s, including SPF/PC.

Time Sharing Option (TSO) is an interactive time-sharing environment for IBM mainframe operating systems, including OS/360 MVT, OS/VS2 (SVS), MVS, OS/390, and z/OS.

Virtual Storage Access Method (VSAM) is an IBM direct-access storage device (DASD) file storage access method, first used in the OS/VS1, OS/VS2 Release 1 (SVS) and Release 2 (MVS) operating systems, later used throughout the Multiple Virtual Storage (MVS) architecture and now in z/OS. Originally a record-oriented filesystem, VSAM comprises four data set organizations: key-sequenced (KSDS), relative record (RRDS), entry-sequenced (ESDS) and linear (LDS). The KSDS, RRDS and ESDS organizations contain records, while the LDS organization simply contains a sequence of pages with no intrinsic record structure, for use as a memory-mapped file.

Job Control Language (JCL) is a name for scripting languages used on IBM mainframe operating systems to instruct the system on how to run a batch job or start a subsystem. The purpose of JCL is to say which programs to run, using which files or devices for input or output, and at times to also indicate under what conditions to skip a step. Parameters in the JCL can also provide accounting information for tracking the resources used by a job as well as which machine the job should run on.

In computing, position-independent code (PIC) or position-independent executable (PIE) is a body of machine code that, being placed somewhere in the primary memory, executes properly regardless of its absolute address. PIC is commonly used for shared libraries, so that the same library code can be loaded at a location in each program's address space where it does not overlap with other memory in use by, for example, other shared libraries. PIC was also used on older computer systems that lacked an MMU, so that the operating system could keep applications away from each other even within the single address space of an MMU-less system.

In the context of IBM mainframe computers in the S/360 line, a data set or dataset is a computer file having a record organization. Use of this term began with, e.g., DOS/360, OS/360, and is still used by their successors, including the current z/OS. Documentation for these systems historically preferred this term rather than file.

This article discusses support programs included in or available for OS/360 and successors. IBM categorizes some of these programs as utilities and others as service aids; the boundaries are not always consistent or obvious. Many, but not all, of these programs match the types in utility software.

The Job Entry Subsystem (JES) is a component of IBM's MVS mainframe operating systems that is responsible for managing batch workloads. In modern times, there are two distinct implementations of the Job Entry System called JES2 and JES3. They are designed to provide efficient execution of batch jobs.

Work Flow Language, or WFL ("wiffle") is the process control language for the Burroughs large systems, including the Unisys ClearPath/MCP series, and their operating system Master Control Program. Developed soon after the B5000 in 1961, WFL is the ClearPath equivalent of the Job Control Language (JCL) on IBM mainframes and the shell scripts of Unix-like operating systems. Unlike JCL, WFL is a high-level structured language complete with subroutines with arguments and high-level program control flow instructions. WFL programs are compiled to binary executables like any other MCP subject.

The IBM Basic assembly language and successors is a series of assembly languages and assemblers made for the IBM System/360 mainframe system and its successors through the IBM Z.

In IBM mainframe operating systems, basic partitioned access method (BPAM) is an access method for libraries, called partitioned datasets (PDSes) in IBM terminology. BPAM is used in OS/360, OS/VS2, MVS, z/OS, and others.

A Supervisor Call instruction (SVC) is a hardware instruction used by the System/360 family of IBM mainframe computers up to contemporary zSeries, the Amdahl 470V/5, 470V/6, 470V/7, 470V/8, 580, 5880, 5990M, and 5990A, and others; Univac 90/60, 90/70 and 90/80, and possibly others; the Fujitsu M180 (UP) and M200 (MP), and others; and is also used in the Hercules open source mainframe emulation software. It causes an interrupt to request a service from the operating system. The system routine providing the service is called an SVC routine. SVC is a system call.

In IBM mainframe operating systems, such as OS/360, MVS, z/OS, a Data Control Block (DCB) is a description of a dataset in a program. A DCB is coded in Assembler programs using the DCB macro instruction. High level language programmers use library routines containing DCBs.

The history of IBM mainframe operating systems is significant within the history of mainframe operating systems, because of IBM's long-standing position as the world's largest hardware supplier of mainframe computers. IBM mainframes run operating systems supplied by IBM and by third parties.

<span class="mw-page-title-main">OS/360 and successors</span> Operating system for IBM S/360 and later mainframes

OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB and Input/Output Control System (IOCS) packages for the IBM 7090/7094 and even more so by the PR155 Operating System for the IBM 1410/7010 processors. It was one of the earliest operating systems to require the computer hardware to include at least one direct access storage device.

System Modification Program/Extended (SMP/E), the proprietary version of System Modification Program (SMP), "is a tool designed to manage the installation of software products on [a] z/OS system and to track the modifications" to those products.

TERSE is an IBM archive file format that supports lossless compression. A TERSE file may contain a sequential data set, a partitioned data set (PDS), partitioned data set extended (PDSE), or a large format dataset (DSNTYPE=LARGE). Any record format (RECFM) is allowed as long as the record length is less than 32 K. Records may contain printer control characters.

References

Trombetta, Michael & Finkelstein Sue Carolyn (1985). "OS JCL and utilities". Addison Wesley. page 152.

  1. 1 2 "IBM Knowledge Center". www.ibm.com. IBM Corporation. 2010. Retrieved 2016-12-26.
  2. Schmidt, Sebastian (2004-04-24). "True in a Nutshell Appendix: IEFBR14". www.miketaylor.org.uk. Mike Taylor. Retrieved 2016-12-27.
  3. Bagwell, David (2005-08-09). "True in a Nutshell Appendix: IEFBR14: Clarification". www.miketaylor.org.uk. Mike Taylor. Retrieved 2016-12-27.