IEFBR14

IEFBR14 is a tool, which is used in IBM mainframe operating systems since OS/360 when file operations are to be conducted by the JCL. It is a program which control immediately returns to the caller (RETURN, in assembly language BR 14 for Branch registers) without hitting any actions themselves.

The purpose of IEFBR14 is, the syntactic requirements of JCL to meet. Every job must be at least one step, and each step must contain at least one EXEC statement.

One popular application is, by JCL to delete or create files:

/ / DELETE EXEC PGM = IEFBR14 / / DD DSN = DUMMY1 FILE.TO.DELETE, / / DISP = ( MOD, DELETE), / / SPACE = (TRK, (1,1) ) / / DD DSN = Dummy2 EINE.NEUE.DATEI, DISP = (NEW, CATLG ), / / AVGREC = M, SPACE = (100, (10,10) ) In the first DD statement one has to JES, a Data Set FILE.TO.DELETE to create, if it does not already exist, and delete again after calling IEFBR14 same. In the second DD a new file is permanently applied.

The program consists of two machine instructions ( 1 set return code 0; 2 jump back ).

Implementation

IEFBR14 considered as textbook example of the fact that even seemingly trivial programs may include errors. The first deliveries of the program put the return value is not 0, which hampered queries the Condition Code consecutive steps:

IEFBR14 START          BR 14, return addr in R14 - branch at it          END This error was corrected by incorporating the instruction SR 15.15 (SR stands for Subtract register):

IEFBR14 START          SR 15.15; Zero out register 15          BR 14, return addr in R14 - branch at it          END However, this version had a problem as the END statement did not take to the entry point reference. This was fixed with the third version of the program:

IEFBR14 START          SR 15.15; Zero out register 15          BR 14, return addr in R14 - branch at it          END IEFBR14 To simplify the analysis of dumps, further modifications have been made:

IEFBR14 START          USING IEFBR14, 15; Establish addressability          BR GO; Skip over our name          DC AL1 (L' ID ) Length of name ID DC C'IEFBR14 ', Name Itself          DS 0H; Force alignment GO SR 15.15; Zero out register 15          BR 14, return addr in R14 - branch at it          END IEFBR14 see also

  • IEFBR15
407542
de