Searching for "COBOL"

Q:

C, BASIC, COBOL, and Java are examples of ............language

A) low-level B) programming
C) computer D) high-level
 
Answer & Explanation Answer: D) high-level

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer

Q:

What guidelines should be followed to write a structured COBOL program ?

Answer

Following guidelines to be following while writing Cobol program:


- Use ? EVALUATE ? statement for constructing cases.


- Use scope terminators for nesting.


- Use in-line Perform statement for writing ?do? constructions.


- Use Test Before and Test After in the Perform statement while writing Do-While statements.

Report Error

View answer Workspace Report Error Discuss

Q:

What are the differences between COBOL and COBOL II?

Answer

There are some differences:


COBOL II supports structured programming by using in line Performs and explicit scope terminators. It introduces new features (EVALUATE, SET. TO TRUE, CALL BY CONTEXT, etc). It permits programs to be loaded and addressed above the 16-megabyte line .  It does not support many old features (READY TRACE, REPORT-WRITER, ISAM, etc.). It offers enhanced CICS support.

Report Error

View answer Workspace Report Error Discuss

Q:

What divisions, sections and paragraphs are mandatory for a COBOL program?

Answer

IDENTIFICATION DIVISION and PROGRAM-ID paragraph are mandatory for a compilation error free COBOL program.

Report Error

View answer Workspace Report Error Discuss

Q:

What COBOL construct is the COBOL II EVALUATE meant to replace?

Answer

EVALUATE can be used in place of the nested IF THEN ELSE statements.

Report Error

View answer Workspace Report Error Discuss

Q:

What are the steps you go through while creating a COBOL program executable?

Answer

DB2 precompiler (if embedded sql used), CICS translator (if CICS program), COBOL compiler, Link editor. If DB2 program, create plan by binding the DBRMs.

Report Error

View answer Workspace Report Error Discuss

Q:

How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.

Answer

Syntax:


SORT   file-1 ON ASCENDING/DESCENDING KEY key....


USING  file-2


GIVING file-3.


 


USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2


GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2.


 


file-1 is the sort workfile and must be described using SD entry in FILE SECTION.


file-2 is the input file for the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL.


file-3 is the outfile from the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL.


file-1, file-2 & file-3 should not be opened explicitly.


 


INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the sort work file from the input procedure.


OUTPUT PROCEDURE is executed after all records have been sorted. Records from the sort work file must be RETURNed one at a time to the output procedure.

Report Error

View answer Workspace Report Error Discuss

Q:

What are different file OPEN modes available in COBOL?

Answer

Open for INPUT, OUTPUT, I-O, EXTEND.


1.INPUT : for read only purpose


2.OUTPUT : for write only purpose


3.EXTEND : for appending records


4.I-O : for read and write(using EXTEND) purpose

Report Error

View answer Workspace Report Error Discuss