Documente Academic
Documente Profesional
Documente Cultură
STEP 1 ISPF
The second record is the file layout which need not be entered
(SAMPLE DATA)
STEP 2 JCL
SORT FIELDS=(1,4,ZD,A)
OMIT COND=(1,4,ZD,GT,2000)
STEP020: Split PS into 3 file based on policy type and store in PS3,PS4 and PS5
CONTROL CARD
SORT FIELDS=(1,4,ZD,A)
OUTFIL FILES=1,INCLUDE=(6,1,ZD,EQ,1)
OUTFIL FILES=2,INCLUDE=(6,1,ZD,EQ,2)
OUTFIL FILES=3,INCLUDE=(6,1,ZD,EQ,3)
CONTROL CARD
MERGE FIELDS=(1,4,ZD,A)
CONTROL CARD
STEP050: Perform the following on PS3 and store the result in PS7
CONTROL CARD
SORT FIELDS=(1,4,ZD,A)
OUTREC FIELDS=(1:1,21,22:C'07',24:24,1,25:C'2014')
CONTROL CARD
SORT FIELDS=COPY
STEP 3 JCL
STEP1: ISPF
STEP2: JCL
Step005.
.
PS2 - <TLABID>. L1F.TRAIN.PS2
PS3 - <TLABID>. L1F.TRAIN.PS3,…..PS4,PS5,PS6,PS7,PS8,PS9,PS10
Step010.
CONTROL CARD
SORT FIELDS=(1,5,ZD,A),SKIPREC=1
Step020.
Input: PS2
Output: PS3
[Ex : If Train_No 17001 contains 3 records after sorting, write the first record alone into PS3
file]
CONTROL CARD
SORT FIELDS=(1,5,ZD,A)
SUM FIELDS=NONE
Step030.
I. Add a new column Serial No starting with 0001 and increment by 1 for every
row
ii. Add 1 to the existing Train no and store it in PS4 as given below
CONTROL CARD
SORT FIELDS=COPY
OUTREC FIELDS=(1:SEQNUM,4,ZD,6:1,5,ZD,ADD,+1,EDIT=(TTTTT),
12:7,11,24:19,11,36:31,14)
Step040.
CONTROL CARD
SORT FIELDS=COPY
OUTFIL FILES=1,STARTREC=1,ENDREC=3
OUTFIL FILES=2,STARTREC=4,ENDREC=6
OUTFIL FILES=3,STARTREC=7,ENDREC=9
Step050.
CONTROL CARD
Step060.
Using Sort utility perform the below operations on PS5 ( < TLABID>.L1F.TRAIN.PS5) ,
PS6 (<TLABID> .L1F.TRAIN.PS6) & PS7(<TLABID>.L1F.TRAIN.PS7) and store the
output in PS8 (<TLABID>.L1F.TRAIN.PS8
i. Merge all the records and store the output in descending order based on Train_No
CONTROL CARD
MERGE FIELDS=(1,5,CH,D)
Step070.
ii. Store all the train details whose ARRIVAL OR DEPARATURE is CHN-
EGMORE
CONTROL CARD
SORT FIELDS=COPY
OUTFIL FILES=1,INCLUDE=(7,11,CH,EQ,C'CHN-CENTRAL',
OR,19,11,CH,EQ,C'CHN-CENTRAL')
OUTFIL FILES=2,INCLUDE=(7,11,CH,EQ,C'CHN-EGMORE',
OR,19,11,CH,EQ,C'CHN-EGMORE')
MOCK 3
STEP1: ISPF
STEP2: JCL
Step050.
PS2 -- <TLABID>.AGTCMN.PS2
PS5--- <TLABID>.AGTCMN.PS5
PS6-- <TLABID>.AGTCMN.PS6
PS7-- <TLABID>.AGTCMN.PS7
Step010.
INFILE: PS1
Outfile: PS2
o Using Sort utility perform the below operations on PS1 and store the output in
PS2 file. PS2 -> <TLABID>.L1G.AGTCMN.PS2.
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
OMIT COND=(1,5,CH,EQ,C' ')
Step020.
Infile : PS2
Outfile:; PS2
Extract 12 records from 2nd record into output. If file contains 18 records
after sorting and eliminating blank AGENT_CODE, this step should
extract 2nd to 13th records.
CONTROL CARD
SORT FIELDS=COPY
OUTFIL FILES=1,STARTREC=2,ENDREC=13
Step030.
Eliminate the duplicate records by adding the Policy count field. The key to
eliminate duplicate records will be Agent_Code.I/P PS2,O/P PS2
EX : If AG885 contains 2 records with value 150 in policy count field in each record, then the
output file should contain single AG885 record with policy count value 300.
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE
Step040.
Write a JCL to sort the records form PS2 and split the records based on policy-status.
All “ACTIVE” records are stored in PS3 and “INACTIVE” records are stored in PS4.
<TLABID>.L1G.AGTCMN. INACTIVE.PS4
Store the records in both the file by generating sequence no as the first column.
CONTROL CARD
SORT FIELDS=COPY
OUTFIL FILES=1,INCLUDE=(11,8,CH,EQ,C'ACTIVE'),
OUTREC=(1:SEQNUM,1,ZD,3:1,35,39:42X)
OUTFIL FILES=2,INCLUDE=(11,8,CH,EQ,C'INACTIVE'),
OUTREC=(1:SEQNUM,1,ZD,3:1,35,39:42X)
Step050.
CONTROL CARD
MERGE FIELDS=(1,5,CH,A)
Step060.
CONTROL CARD
Step070.
Input: PS2
Output: PS6
Check the policy-type .If policy-type is Life ,change the Agent code LP-agentcode.
Eg: LP-AG880
CONTROL CARD
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(20,9,CH,EQ,C'LIFE'),
OVERLAY=(4:1,35,1:C'LP-')),
IFTHEN=(WHEN=(20,9,CH,EQ,C'TERM'),
OVERLAY=(4:1,35,1:C'TP-')),
IFTHEN=(WHEN=(20,9,CH,EQ,C'MEDICAL'),
OVERLAY=(4:1,35,1:C'MP-')),
IFTHEN=(WHEN=(20,9,CH,EQ,C'ANNUITY',OR,20,9,CH,
EQ,C'CASUALITY'),OVERLAY=(4:1,35,1:C'XX-'))
Step080.
Add 50 to Policy count from PS2 and store the output in ps7
CONTROL CARD
SORT FIELDS=COPY
OUTREC FIELDS=(1,5,7:7,3,ZD,ADD,+50,EDIT=(TTT),11:11,35)
MOCK 4
STEP1: ISPF
o Allocate a PS dataset with record length 80 with naming convention as below.
PS1 - <TLABID>.L1B.MEDICINE.PS1
o Using the details from below file layout, enter records into the PS1 file as per the
instructions given,
• 1st row contains the header details, which has to be entered in PS1 file.
• Do not enter the 2nd row in PS file. 2nd row contains layout details for reference.
• One space filler had to be inserted between each field in the PS file.
• Alphanumeric data to be entered in CAPITAL letters.
STEP2: Proc
Step005.
• First step should be the Delete step for PS2,
• - <TLABID>.L1B.MEDICINE.PS2.
• <TLABID>.L1B.MEDICINE.PS3
• <TLABID>.L1B.MEDICINE.PS4
• <TLABID>.L1B.MEDICINE.PS5
• <TLABID>.L1B.MEDICINE.PS6
• <TLABID>.L1B.MEDICINE.PS7
•
- <TLABID>.L1B.MEDICINE.LOWDOS
<TLABID>.L1B.MEDICINE.HIGHDOS files.
•
Step010.
Input : PS1
Output : PS2
i. Remove the header record and rearrange the positions of fields as below.
Filler Details: - One space between each field.
Control card-CC11B<yyy>
CONTROL CARD
SORT FIELDS=(1,3,CH,A),SKIPREC=1
OUTREC FIELDS=(1:1,3,5:17,1,7:5,3,11:9,7,19:19,5)
Step020.
• Using Sort utility perform the below operations on PS2 and store the output in file
PS2. PS2 - <TLABID>.L1B.MEDICINE.PS2.
i. Sort the records in ascending order based on Medicine_code.
ii. Eliminate the duplicate records by adding the Quantity field. The key to eliminate duplicate records
will be Medicine_Code.
EX : If P03 contains 2 records with value 300 in Quantity field in each record, then the output file should
contain single P03 record with Quantity value 600.
Control card-CC21B<yyy>
CONTROL CARD
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=(7,3,ZD)
Step030.
▪ Split the PS2 file into two new files using Sort utility based on dosage. The layout
for the two new files will be the same as the PS2 file layout.
i. Write the records with Dosage = ‘L’ into <TLABID>.L1B.MEDICINE.LOWDOS
ii. Write the records with Dosage = ‘H’ into <TLABID>.L1B.MEDICINE.HIGHDOS.
Control card- CC31B<yyy>
CONTROL CARD
SORT FIELDS=(1,3,CH,A)
OUTFIL FILES=1,INCLUDE=(5,1,CH,EQ,C'L')
OUTFIL FILES=2,INCLUDE=(5,1,CH,EQ,C'H')
Step040.
Merge High –Dos and Low-Dos dataset records into new PS3.
Arrage the the records in ascending order based on Medicine code.
CONTROL CARD
SORT FIELDS=(1,3,CH,A)
OUTREC FIELDS=(1:C'M',2:C'-',3:2,2,6:5,1,8:7,3,12:11,7,20:19,5)
Step060.
Input file is PS4.
Step080.
STEP1: ISPF
PS1 - <TLABID>.L1J.SHARE.PS1
o Using the details from below file layout, enter records into the PS1 file as per the instructions
given,
o Do not enter 1st row in PS file. 1st row contains header details for reference.
o Do not enter 2nd row in PS file. 2nd row contains layout details for reference.
o One space filler had to be inserted between each field in the PS file.
o All alphanumeric data to be entered in CAPITAL letters.
STEP2: PROC- PA11J<yyy>
Step001.
<TLABID>.L1J.SHARE.PS2
<TLABID>.L1J.SHARE.PS3
<TLABID>.L1J.SHARE.PS4
<TLABID>.L1J.SHARE.PS5
<TLABID>.L1J.SHARE.PS6
<TLABID>.L1J.SHARE.ACC
<TLABID>.L1J.SHARE.INFY
Step002.
o Using Sort utility perform the below operations on PS1 and store the output in PS2 file.
o Sort records in ascending order based on SHARE_NO and NO_OF_SHARES.
o Eliminate records which have with SHARE_NO as blanks.
o Remove duplicates for each SHARE_NO.
Ex : If Share No SN541 contains 3 records after sorting, write the first record alone.
o Extract 8 records from 2nd record into output.
o Ex: If file contains 15 records after sorting and eliminating blank SHARE_NO, this step
should extract 2nd to 9th records.
o Use control card CC11J<yyy>
CONTROL CARD
SORT FIELDS=(1,5,CH,A),SKIPREC=2,STOPAFT=9
SUM FIELDS=NONE
Step003.
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
OUTFIL FILES=1,INCLUDE=(14,5,CH,EQ,C'ACC')
OUTFIL FILES=2,INCLUDE=(14,5,CH,EQ,C'INFY')
Step004.
o Combine the data of both the above records and store the output in PS3 file. PS3 ->
<TLABID>.L1J.SHARE.PS3..
Note : The merged output records should be in ascending order based on SHARE_NO.
CONTROL CARD
MERGE FIELDS=(1,5,CH,A)
Step005.
Do the following and store the records in PS4 with the given layout.
CONTROL CARD
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(7,2,CH,GT,C'15',AND,
14,5,CH,EQ,C'INFY'),OVERLAY=(27:C'C1',30:C'H')
INREC IFTHEN=(WHEN=(7,2,CH,GT,C'15',AND,
14,5.CH,EQ,C'INFY'),OVERLAY=(27:C'C1',30:C'H'
INREC IFTHEN=(WHEN=(7,2,CH,GT,C'10',AND,
14,5,CH,EQ,C'TCS'),OVERLAY=(27:C'C3',30:C'M')
Step001.
Allocate a VSAM ESDS dataset with the following specifications,
RECORDSIZE (80, 80)
Name: <TLABID>.L1J.SHARE.ESDS
Step002.
Inpt file is PS2.
Outfile is PS5.
Step003.
STEP1: ISPF
o Allocate a PS dataset with a record length of 80 and with the below naming convention,
<USERID>.L1E.EMP.PS1
Note: 1st row contains the header details, which need not be entered in the PS file
Filler Details: - One space filler to be inserted between each field in the PS file.
PROC: PA11E<yyy>
Proc steps:
STEP005:
USERID>.L1E.EMP.PS2
USERID>.L1E.EMP.PS3
USERID>.L1E.EMP.PS4
USERID>.L1E.EMP.PS5
USERID>.L1E.EMP.MEXP
USERID>.L1E.EMP.LEXP
USERID>.L1E.EMP.FINAL
STEP010:
o Sort the records in the above PS1 dataset (<USERID>.L1E.EMP.PS1) based on ENO
o Eliminate the records, whose ENO contains blank
o Copy the sorted records into a PS2 file with a record length of 80 using the naming convention
<USERID>.L1E.EMP.PS2(allocate it in the sort step in JCL).
o Use control card CA11E<yyy>
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
o Sort the records in the above PS2 dataset (<USERID>.L1E.EMP.PS2) based on ENO
o If two records have same ENO sum the salary based on ENO,
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=(28,6,ZD)
STEP030:
INPUT:PS2
o All the ENO should start with P.EG. 10001 –Should be P10001.
o Copy the sorted records into PS3.(allocate in sort step)
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
OUTREC FIELDS=(1:C'P',2:1,33)
STEP040:
o Check PS3 for empty file handling. If non empty perform step050 else perform step080.
o Use control card CA41E<yyy>
CONTROL CARD
STEP050:
o Calculate the Experience by finding the Difference between DOJ and CUY (EXP=CUY – DOJ)
Format of the output file PS4 is
CONTROL CARD
SORT FIELDS=(1,5,CH,A)
OUTREC FIELDS=(1:1,18,19:29,6,26:19,4,ZD,SUB,
24,4,ZD,EDIT=(TTTT),31:50X)
STEP060:
CONTROL CARD
SORT FIELDS=(1,6,CH,A)
OUTFIL FILES=1,INCLUDE=(28,6,ZD,GT,0010)
OUTFIL FILES=2,INCLUDE=(28,6,ZD,LT,0010)
o Use control card CA61E<yyy>
Step070:
o USERID>.L1E.EMP.FINAL
CONTROL CARD
MERGE FIELDS=(1,6,CH,A)
STEP080:
USERID>.L1E.EMP.PS5
CONTROL CARD
SORT FIELDS=COPY
STEP090:
CONTROL CARD
SORT FIELDS=(1,6,CH,A)
STEP:1 ISPF
START ENTERING THE RECORDS (DO NOT ENTER THE HEADER DETAILS)
STEP1: JCL
STEP005:
THIS STEP SHOULD BE THE DELETE STEP FOR NEW FILE PS2,
STEP010 :
<TLABID>.L0C.PAT.PS2.
AS CC10C<YYY>.
CONTROL CARD
SORT FIELDS=(1,10,CH,A)
SUM FIELDS=NONE
STEP020:
CONTROL CARD
SORT FIELDS=(1,10,CH,A)
OMIT COND=(1,2,ZD,EQ,00)
OUTREC FIELDS=(1:1,10,11:C'**',14:12,49)
STEP030:
CONTROL CARD
STEP040 :
CONTROL CARD
SORT FIELDS=(1,10,CH,A)
OUTREC FIELDS=(1:1,16,17:17,1,18:C'.',19:17,40,
59:C'$',60:57,6)
STEP050:
SORT FIELDS=(1,10,CH,A),STOPAFT=5
STEP060:
CONTROL CARD
SORT FIELDS=(1,10,CH,A)
OUTREC FIELDS=(1,10,12:12,2,15:55,6,22:52,2,25:15,36)
STEP2: JCL
Step001.
Step002.
Step003.
Write a jcl to allocate an AIX to KSDS Cluster.(KEY should be the PATIENT NAME)
Step006:
QUESTION -ID : 0E
STEP1 : ISPF
STEP005 :
STEP010 :
SORT THE RECORDS BASED ON EMPLOYEE-ID IN ASCENDING SEQUENCE
CALCULATE THE DIFFERENCE OF DAYS (TO-DATE - FROM-DATE)
NO-OF DAYS HAS TO BE CALCULATED BY ADDING 1 TO THE DAYS OBTAINED.
DATE Format:(MM/DD/YY)
CONTROL CARD
SORT FIELDS=(1,6,CH,A)
OUTREC FIELDS=(1,48,50:42,2,ZD,SUB,31,2,ZD,ADD,+1,EDIT=(TT))
CONTROL CARD
SORT FIELDS=COPY
INCLUDE COND=(50,2,ZD,GT,05)
CONTROL CARD
CONTROL CARD
SORT FIELDS=(1,6,CH,A)
OUTREC FIELDS=(1,27,28:31,2,30:28,2,32:34,4,37:42,2,
39:39,2,41:45,4,46:50,2,33X)
STEP050 : COPY THE RECORDS FROM PS2 TO PS5
CONTROL CARD
SORT FIELDS=COPY
Step2:JCL
USERID.L0E.ESDS
Step002.
Step003.
Step004.
Step005
STEP1: ISPF
INSTRUCTIONS:
USERID.L0A.CHNMF027.PDS
o Allocate a PS dataset with the record length of 80 using the naming conventions given below,
PS1 - <USERID>.L0A.STUDENT.PS1
Note: 1st row contains the header details, which need not be entered in the PS file
Filler Details: - One space filler to be inserted between each field in the PS file.
STEP2: JCL
Step005.
USERID>.L0A.STUDENT.PS2
USERID>.L0A.STUDENT.PS3
USERID>.L0A.STUDENT.PS4
USERID>.L0A.STUDENT.PS5
USERID>.L0A.STUDENT.PS6
Step010..
Sort the records in the PS1 dataset <USERID>.L1A.STUDENT.PS1 in ascending order based on
Student_id
Copy the sorted records into the second PS file with a record length of 80 using the naming
convention <USERID>.L0A.STUDENT.PS2(allocate it in the sort step )
Step030.
Step040.
Infile:PS2
o Outfile:PS4. <USERID>.L0A.STUDENT.PS4
Step050.
Use IEBGENER.
Infile:PS4
o <USERID>.L0A.STUDENT.PS6
Step2: VSam.
Step001.
Create KSDS.<USERID>.L0.STUDENT.KSDS
Step002.
Step004. BLDINDEX
MOCK 10
STEP1: ISPF
o Allocate a PS dataset with a record length of 80 and with the below naming convention,
<USERID>.L1E.PROD.PS1
Note: 1st row contains the header details, which need not be entered in the PS file
Filler Details: - One space filler to be inserted between each field in the PS file.
STEP001:
USERID>.L1E.PROD.PS2
USERID>.L1E.PROD.PS3
USERID>.L1E.PROD.PS4
USERID>.L1E.PROD.PS5
USERID>.L1E.PROD.PS6
STEP002:
o Sort the records in the above PS1 dataset (<USERID>.L1E.PROD.PS1) based on Prod_Id.
o Eliminate the records, whose Prod_code contains ‘ASV’.
o Copy the sorted records into a PS2 file with a record length of 80 using the naming convention
<USERID>.L1E.PROD.PS2(allocate it in the sort step in JCL).
o Use control card CA11E<yyy>
STEP003:
o Sort the records in the above PS1 dataset (<USERID>.L1E.PROD.PS1) based on Prod_Name
o All the PROD-ID should start with P.EG. XA200 –Should be PXA200.
o Copy the sorted records into PS3.(allocate in sort step)
o Use control card CA21E<yyy>
STEP004:
o Check PS3 for empty file handling. If non empty perform step005 else perform step006.
o Use control card CA31E<yyy>
STEP005:
o Copy the records from PS3 into PS4( allocate in sort step) by changing the column postion,
o USERID>.L1E.PROD.PS4
STEP006:
USERID>.L1E.PROD.PS5
STEP007:
Write JCL to invoke the proc. JCL Member naming convention ( JA11E<yyy>)
STEP2: JCL(JA21E<yyy>)
1.SORT the PS1 based on prod-id and eliminate the duplicates.Store in PS6.