Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

JCL

INPUT DS: DSRC072.GET738.EMPLOYEE.DETAILS

1. Write a cataloged procedure(Name of the member SRTPROC) to do the following

STEP 1: SORT program to copy records from INPUT DS into <HLQ>. GET738.EMPLOYEE.DETAILS

Note: Use <HLQ>. GET738.EMPLOYEE.DETAILS as the input for the remaining steps

STEP 2: Create a sort program to write the sorted output datasets in


<HLQ>.GET738.EMPLOYEE.PSIDSORT

STEP 3: Concatenate DSRC072.GET738.EMPLOYEE.DETAILS.ADDED along with the existing input dataset


and write the sorted output in 3 different output files with the naming convention as following(Note;
Use refer back for input dataset <HLQ>. GET738.EMPLOYEE.DETAILS

Output file 1 : <HLQ>. GET738.EMPLOYEE.ATOJ

Output file 2 : <HLQ>. GET738.EMPLOYEE.KTOT

Output file 3 : <HLQ>. GET738.EMPLOYEE.UTOZ

Output file 1 should contain records with first name starting with ‘A’ to ‘I’

Output file 2 should contain records with first name starting with ‘K’ to ‘T’

Output file 3 should contain records with first name starting with ‘U’ to ‘Z’

Generate email ID for all employees like <fname>@MAIL.COM

Create all the output datasets dynamically with the lrecl like that of the input dataset.

Rules for control card:

Create separate members for control as mentioned below and call the control card in the cataloged
procedure itself

For STEP 1: Member name : SRTCARD1

For STEP 2: Member name : SRTCARD2

For STEP 3: Member name : SRTCARD3

2. Write a JCL code to call the cataloged procedure SRTPROC


Layout for <HLQ>. GET738.EMPLOYEE.DETAILS and <HLQ>. GET738.EMPLOYEE.DETAILS.ADDED

PSID FIRST NAME LAST NAME MOBILE NUMBER


9(08) X(15) X(15) 9(10)

Layout for <HLQ>. GET738.EMPLOYEE.PSIDSORT

PSID FIRST NAME LAST NAME MOBILE NUMBER


9(08) X(15) X(15) 9(10)

Layout for <HLQ>. GET738.EMPLOYEE.ATOJ, <HLQ>. GET738.EMPLOYEE.KTOT,

<HLQ>. GET738.EMPLOYEE.UTOZ

PSID FIRST NAME LAST NAME MOBILE NUMBER EMAIL ID


9(08) X(15) X(15) 9(10) X(30)

Note: Layout is just for reference. It should not be present in any of the input or output files

You might also like