You are here: Home > Knowledge Refreshers

KR editions 64 to 65


KR-64: Append datasets using IEBGENER

  • If you want to append the contents of dataset 2 to dataset 1 (and save it in dataset 1), then you can use IEBGENER as shown below. 


//APPEND EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=* 
//SYSUT1 DD DSN=TEST.DUMMY.SYSOUT2,DISP=OLD
//SYSUT2 DD DSN=TEST.DUMMY.SYSOUT,DISP=MOD
//SYSIN DD DUMMY 

  • IEBGENER is used for copying datasets (from SYSUT1 to SYSUT2). In the above case also the same happens; except that SYSUT2 is an existing dataset whose disposition is specified as MOD (thus IEBGENER will append SYSUT1 dataset to SYSUT2 and the resultant will be in SYSUT2).

  • If you want to append many more files; you can concatenate the other files in SYSUT1 (just specify DD DSN=filename one below the other).


KR-65: Source code, object code, compiler

Sometimes the following terms tend to get confusing: source code, object code, executable, load module, linker, compiler, loader, DBRM, plan, package

We'll take a closer look at each of them in the following editions.

Source code: This is the simplest one in the list; programmers generally can't code in machine language (1s and 0s) - we're more comfortable with english like words and that's why we have high-level languages (like COBOL). The code we type in COBOL is called the source code (or high-level code).

Compiler and object code: What we understand the processor doesn't understand (and vice-versa!); we need someone to convert our high-level code into lower level machine language. This is where the compiler comes in. It takes our english statements and converts them into what the machine can understand. This we call as the object code. 

To sum up; for every single program we write in high-level and compile, we get one object module. 10 programs- compile them and we'll have 10 object modules.


Go back to the main contents page