You are on page 1of 5

Exercise: 13.

Objective: Creating GDG base and generations.


Step1: Create a sequential file, manually using 3.2, as per below record
structure and insert the data.
File name is ‘IDC021.MONTHLY.TRANS.FILE’.

TRANSTYPE ACCNO (4- TRANACTION TRANSACTION


(1BYTE) BYTES) AMOUNT (8-BYTES) DATE (10-BYTES)
W 0001 00100000 2015-12-25
T 0002 00200000 2015-12-26
W 0002 02000000 2015-12-27
Explanation:
1. Firstly, I had to logged on into TSO by using login id and password.
2. ISPF primary menu window was opened.
3. In command line type 3.2 for creating a sequential file for input data and
enter above data manually in file named as
‘IDC021.MONTHLY.TRANS.FILE’ .
4. Just save and submit the input in file as shown in below Image1.

Image1: Input data in sequential file


Steps2: JCL steps:
1. Write a JCL to create GDG Base with below parameters:
 GDG base name is ‘IDC021.MONTHLY.REPORT’
 Limit should be 3
 All generation datasets should be uncataloged and deleted
permanently when the limit is exceeded i.e. Empty and
Scratch
2. Write a JCL to generate new generation dataset and copy the
above input file data (‘idc021.monthly.trans.file’) to it with help of
IEBGENER utility.

Note:
 Step 1 and 2 should be coded within a single job.
 Use RESTART parameter for generating new generation datasets.

Explanation:
1. Firstly, I have logged on into TSO by using login id and password.
2. ISPF primary menu window was opened.
3. In command line type 3.2 for creating a PDS for JCL statement.
4. Open PDS file and create one member in edit mode and write the JCL
statement as shown in Image2.
5. Just save and submit the JCL statement and check for output in spool as
shown in Image3 and Image4.
6. Image5, shows the data is copied successfully in generation from
sequential file.
7. Again, open same PDS file with one more member in edit mode and
write code as shown in Image6 for creating second generation.
8. Just save and submit the JCL statement and check for output in spool.
9. Image7, shows the data is copied successfully in second generation from
sequential file using restart command.
Image2: Code for creating GDG base and generations

Image3: Spool Output shows GDG Base creation successfully

Image4: Spool Output shows GDG Generation creation successfully


Image5: Data is copied successfully in generation from sequential file

Image6: Create a new generation using restart command

Image7: Data is copied to new generation using Restart Command


Explanation of Images:

o Image1, shows manually entered data for input sequential dataset file.
o In Image2, we write the JCL statement for creating GDG base and generation as:
1. Job statement.
2. STEP01 for GDG base:
a. EXEC statement.
b. SYSPRINT statement
c. DD statement
3. STEP02 for GDG generation:
a. EXEC statement.
b. SYSPRINT statement
c. DD statement
o After the statements, save and submit the JCL.
o Check for errors in code if any then remove it else take screenshot of spool
window as output.
o For going to the Spool window, just type in command line as ‘START SD;ST’
o New screen is opened.
o Go to the last one executed JCL and check the output as shown below in Image3
and Image4.
o Image3 shows GDG Base creation successfully.
o Image4 shows GDG Generation creation successfully.
o For checking data is copied or not, open the generation in view mode and take
screenshot as Image5.
o Image5 shows data is copied successfully in generation from sequential
file.
o Open same PDS file with one more member in edit mode and write
code as shown in Image6 for creating second generation using restart
command.
o Image7 shows new GDG Generation creation successfully and data is copied
successfully in generation from sequential file using restart command.

Conclusion: Successfully Create GDG base and its generations and also copied
data from sequential file to GDG generation.

You might also like