1. What is the Structured programming and how do you identify it? The difference between regular programming approach and struct...
1. What is the Structured programming and how do you identify it?
The difference between regular programming approach and structured programming is that structured programs get rid of GO TO statements and the whole programs can be represented in a Top-Down design. This design is possible because of existence of 3 basic structures:
a. Sequence Structure:
W
w
ithin sequence structure all functions are executed in their physical order. The structure has one entry point and one exit point.
W
w
ithin sequence structure all functions are executed in their physical order. The structure has one entry point and one exit point.
b. Selection Structure:
W
w
ithin selection structure execution of the function depends on whether conditions true or false. The structure has one entry point and one exit point.
W
w
ithin selection structure execution of the function depends on whether conditions true or false. The structure has one entry point and one exit point.
c. Iteration Structure:
W
w
ithin iteration structure the execution of the function will be reiterated over and over again until condition becomes true. The structure has one entry point and one exit point. All these structures have one entry point and one exit point. Because of this if the programs is written by using only these structures, the whole programs will have one entry point and one exit point.
W
w
ithin iteration structure the execution of the function will be reiterated over and over again until condition becomes true. The structure has one entry point and one exit point. All these structures have one entry point and one exit point. Because of this if the programs is written by using only these structures, the whole programs will have one entry point and one exit point.
2. What are advantages of Structured Programming?
The programs gets rid of GO TO statements and is represented by Top-Down Structure which is visible and easy to understand, because the programs has a specific (hierarchical) structure, it is easy to debug the programs.
3. What is the difference between Structured Cobol Programming and Object Oriented COBOL programming?
Structured programming is a logical way of programming; you divide the functionalities into modules and code logically. OOP is a Natural way of programming; you identify the objects first, and then write functions, procedures around the objects.
4. What will happen if you code GO BACK instead of STOP
RUN in a stand alone COBOL program i.e. a program, which is not calling any other program. Both give the same results when a program is not calling any other program.
5. How can you submit a job from COBOL programs?
Write JCL cards to a DataSet with
//xxxxxxx SYSOUT=(A,INTRDR) where ‘A’ is output class, and DataSet should be opened for output in the program. Define a 80 byte record layout for the file.
OS/VS Cobol pgms can only run in 24 bit addressing mode, VS Cobol II pgms can run either in 24 bit or 31 bit addressing modes.
Report writer is supported only in OS/VS Cobol.
USAGE IS POINTER is supported only in VS COBOL II.
Reference modification e.g.: WS-VAR(1:2) is supported only in VS COBOL II.
EVALUATE is supported only in VS COBOL II.
Scope terminators are supported only in VS COBOL II.
OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds.
Under CICS Calls between VS COBOL II programs are supported.
Note: In using COBOL on PC we have only flat files and the programs can access only limited storage, whereas in VS COBOL II on M/F the programs can access up-to 16MB or 2GB depending on the addressing and can use VSAM files to make I/O operations faster.
7. Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?
In non-CICS environment, it is possible. In CICS, this is not possible.
8. What are the steps you go through while creating a COBOL program executable?
DB2 precompiler (if embedded SQL used),
CICS translator (if CICS pgm),
Cobol compiler,
Link editor.
If DB2 program, create plan by binding the DBRMs.
9. What's a LDS(Linear Data Set) and what's it used for ?(VSAM)
LDS is a VSAM DataSet in name only. It has unstructured 4k (4096 bytes) fixed size CIs which do not contain control fields and therefore from VSAM's standpoint they do not contain any logical records. There is no FreeSpace, and no access from Cobol. Can be accessed by DB2 and IMS fast path DataSet. LDS is essentially a table of data maintained on disk. The 'table entries' must be created via a user program and can only be logically accessed via a user program. When passed, the entire LDS must be mapped into storage, then data is accessed via base and displacement type processing.
10.
What are the steps you go through while creating a COBOL program executable?
DB2 precompiler (if embedded SQL used),
CICS translator (if CICS pgm),
Cobol compiler,
Link editor.
If DB2 program, create plan by binding the DBRMs.
a5ec2b2753b548b5975b5791a7be25d8
No comments
Post a Comment