COBOL
Write a COBOL program that displays "HELLO, MAINFRAME WORLD!" on the screen....
hello-world
display
basics
COBOL
Write a program that accepts a user's name and displays a personalized greeting....
accept
input
working-storage
COBOL
Write a program that displays the current date in MM/DD/YYYY format....
date
accept
formatting
COBOL
Write a COBOL program that displays "Welcome to COBOL Programming" and demonstrates all four divisions....
basics
structure
divisions
COBOL
Write a program that accepts user name and displays a personalized greeting....
accept
display
input
output
COBOL
Write a well-commented program that calculates area of rectangle....
comments
documentation
basics
COBOL
Explain and demonstrate the difference between STOP RUN and GOBACK....
stop-run
goback
termination
COBOL
Create a program demonstrating proper use of COBOL reserved words like MOVE, ADD, DISPLAY....
reserved-words
syntax
basics
COBOL
Use INITIALIZE to set fields to default values....
initialize
reset
default
COBOL
Demonstrate different numeric PIC clauses: 9, S, V, P....
pic
numeric
data-types
COBOL
Work with alphanumeric (PIC X) and alphabetic (PIC A) data types....
alphanumeric
alphabetic
pic-x
COBOL
Create a record structure with group and elementary items....
group
elementary
record
structure
COBOL
Write a program that accepts two numbers and displays their sum....
add
arithmetic
numeric
COBOL
Accept 5 numbers and calculate their average....
compute
average
loop
COBOL
Demonstrate ADD, SUBTRACT, MULTIPLY, DIVIDE with all variations....
add
subtract
multiply
divide
COBOL
Use COMPUTE for complex mathematical expressions....
compute
compound-interest
formula
COBOL
Calculate percentage increase, decrease, and percentage of total....
percentage
calculation
arithmetic
COBOL
Convert between USD, EUR, GBP, and INR....
currency
conversion
exchange-rate
COBOL
Accept a number and determine if it is positive, negative, or zero....
if-else
conditions
signed
COBOL
Accept marks (0-100) and display grade: A(90+), B(80-89), C(70-79), D(60-69), F(<60)....
evaluate
grades
conditions
COBOL
Demonstrate nested IF statements and ELSE clause....
if
else
conditional
nested
COBOL
Determine if a year is a leap year....
leap-year
divisibility
date
COBOL
Given three sides, determine triangle type: Equilateral, Isoceles, Scalene, or Invalid....
triangle
geometry
validation
COBOL
Use a loop to print numbers from 1 to 10....
perform
loop
counter
COBOL
Print multiplication table for a given number....
multiplication
loop
table
COBOL
Execute a paragraph a specific number of times....
perform
times
loop
iteration
COBOL
Loop until a condition becomes true....
perform
until
while
loop
COBOL
Generate first N Fibonacci numbers....
fibonacci
sequence
algorithm
COBOL
Print a pyramid pattern of stars for N rows....
pattern
pyramid
loop
stars
COBOL
Reverse a given string....
string
reverse
algorithm
COBOL
Create and access a single-dimension table (array)....
table
array
occurs
subscript
JCL
Write basic JCL to run a program called MYPROG....
job
exec
basic
JCL
Write JCL that reads from dataset MY.INPUT.FILE....
dd
input
disp
JCL
Copy specific members from one PDS to another....
iebcopy
pds
copy
COBOL
This code has an infinite loop. Find and fix it:
PERFORM VARYING WS-I FROM 1 BY 1
UNTIL WS-I = 10
DISPLAY WS-I
END...
debugging
loop
bug-fix
COBOL
Result shows wrong value:
01 WS-PRICE PIC 99V99 VALUE 12.50.
01 WS-QTY PIC 99 VALUE 5.
01 WS-TOTAL PIC 99V99.
M...
debugging
decimal
truncation
COBOL
Result is wrong:
01 WS-A PIC 9(3) VALUE 999.
01 WS-B PIC 9(3) VALUE 999.
01 WS-C PIC 9(3).
ADD WS-A TO WS-B GIVING WS-C....
debugging
truncation
overflow
COBOL
Loop executes wrong number of times:
PERFORM VARYING WS-I FROM 1 BY 1 UNTIL WS-I = 10
DISPLAY WS-I
END-PERFORM....
debugging
perform
loop
boundary