Anda di halaman 1dari 4

Mainframes:

Problem statement #1
Consider a string WS-A with a value 'SLEEPLESSNESS'. Write programs to
i) Count number of 'E' in given string after first occurrence of 'L'.
ii) Replace all 'E's by 'A's in the given string 'SLEEPLESSNESS'.
Program statement #2
Write a program to check the sign of the variable (whether Negative, Zero or Positive).
Program statement #3
Write a COBOL program to generate Fibonacci series for the given number. The number can be taken as
input from the user through SYSIN.
Program statement #4
Write a program to find the number of digits in a given number.
Mainframe tech lounge JCL problem statments
Problem statement 1:
There is a program RPT01 that creates report Top 5 Drugs of the Month for a Pharmacy company.
There are 5 stores and the sales file from each of these stores available is a weekly file. This program
should read all the weekly files of each store to create the report. Write a JCL for the above requirement.
The Output file should be a Physical Sequential File with record length 120 bytes. This job runs on the 1st
sat of every month and the date should be passed from the JCL
Clue: Should use Concatenated datasets & PARM
Problem statement 2:
PGM1: Reads the input Discount file (Sequential file) in Exclusive mode to check for valid discount and
creates a file containing valid records. This file need not be catalogued.
PGM2: Reads the file created by PGM1 and updates the price of items after applying discounts and
creates New Price file that should be catalogued. The New price file should be of length 76 bytes. This
program should be executed only if PGM1 is executed successfully.
Write a JCL to execute both the programs in a single Job.
Clue: Should use Temporary file & COND parameter

Problem statement 3:
PGM1: Reads the input Discount file (Sequential file) in Exclusive mode to check for valid discount and
creates a file containing valid records.
PGM2: Reads the file created by PGM1 and updates the price of items after applying discounts and
creates New Price file that should be catalogued. The New price file should be of length 76 bytes.
While processing PGM2 the program failed. Write a JCL to execute the job from step2.
Clue: Should use Restart parameter
FILE HANDLING (Sequential files)
Problem statement 1
Write a cobol program to read a file EMP-GRADE with 4 fields as given below and display the details of
students who have scored a grade 'A' in the output. Some sample records in EMP-GRADE file are:

Expected output :-

Problem statement 2
Write a cobol program to accept EMP-ID from user and display all the details of the employee
corresponding to this Emp id if the Emp id is present in the EMP-GRADE file. P
Consider the EMP-GRADE file as below.

If the user gives the Emp id as '756455' , the output should look like:

Problem statement 3
Write a Cobol program to read EMP-SALARY file and compute Total Salary for each employee and write
it to EMP-PAY-SLIP file. The layout is shown below:
EMP-SALARY file

EMP-PAY-SLIP file: - The final record in EMP-PAY-SLIP file should look like

where Total Salary = Basic-Salary + (DA * Basic sal)/100 + HRA.


Problem statement 4
Write a Cobol program to read EMP-SALARY file and update the the HRA to Rs.1000, of employees
whose basic salary is more than 10000.
EMP-SALARY file

File after update :-

Mention your CT ref number and e-mail id at the top of the solution document

Anda mungkin juga menyukai