Main Program: Return to calling program. (Might be the operating system, and job will end.) STOP RUN terminates the run unit, and deletes all dynamically called programs in the run unit and all programs link-edited with them. (It does not delete the main program.) In a threaded environment the entire Language Environment enclave is terminated, including all threads executing within the enclave.
Sub Program: Return directly to the program that called the main program. (Might be the operating system, and job will end.) In a threaded environment, the entire Language Environment enclave is terminated, including all threads executing within the enclave.
Main Program: Same effect as STOP RUN: return to calling program. (Might be the operating system, and job will end.) In a threaded environment, the thread is terminated.
Sub Program: Return to calling program. In a threaded environment, if the program is the first program in a thread, the thread is terminated.
If the main program is called by a program written in another language that does not follow Language Environment linkage conventions, return is to this calling program. If the thread is the initial thread of execution in an enclave, the enclave is terminated.
Main Program: No action taken
Sub Program: Return to calling program without ending the run unit. An implicit EXIT PROGRAM statement is generated if the called program has no next executable statement. In a threaded environment, the thread is not terminated unless the program is the first (oldest) one in
A gdg is a set of chronologically related dataset.It is used in cyclical applications .A generation dataset is one data set in a generation data group.A new generation of the dataset is produced in each cycle.These datasets are processed at regular intervals .
The new generation is called the current generation .the former generation is called the previous generation .All datasets in a gdg have the same name .Relative numbers are used to identify the generation (0) or (-1) etc
The dataset has a name
Here G0000-G9999 is the ABSOLUTE number and V00 is the version number .This is the version of the generation ,
A new version of a dataset replaces the current relative position and the old version loses its relative position .
A generation dataset can be called in the DSN parameter of the DD statement using the relative number or the absolute number .
//OLDFILE DD DSN = PAYROLL(1) **** RELATIVE NUMBER
DISP = SHR /OLD
//OLDFILE DD DSN = PAYROLL.G0001V00 **** ABXOLUTE NUMBER
All GDG are created floowing a Model GDG or a base.IDCAMS are used to create the GDG's
Two things needed to create a GDG are
1? An index or base
2? A prototype dataset .