Found 8 Articles for COBOL

Difference between COMP and COMP3

Pranavnath
Updated on 18-Jul-2023 11:59:03

815 Views

In COBOL programming, the COMP and COMP-3 (Pressed Decimal) information representation designs play significant parts in taking care of numeric information. COMP may be a twofold organize that speaks to information in its crude double shape, whereas COMP-3 employments pressed decimal representation with sign and zone digits. The key contrasts between the two lie in their capacity strategies, measure contemplations, utilization scenarios, run confinements, transformation prerequisites, execution suggestions, and meaningfulness What is COMP? COMP may be an information representation arrangement utilized in COBOL (Common Business-Oriented Language) programming. COMP stands for "Computational, " and it is an unsigned double organize that ... Read More

Implementation and purpose of direct index look-up

Mandalika
Updated on 30-Nov-2020 09:38:27

102 Views

The direct index look-up is chosen by the DB2 optimizer when all the columns used in the predicate of the WHERE clause is part of the index.For example, if we have ORDERS DB2 table as below.ORDER_IDORDER_DATEORDER_TOTALZ2234530-10-2020342Z3341214-08-2020543Z5699019-10-2020431Z5690221-09-20206743Z9978104-11-2020443Z5611229-08-2020889In this table, there is one index which is built having columns named ORDER_ID and ORDER_DATE. For the below query, DB2 optimizer will choose direct index look-up because the columns used in the SELECT statement are also part of the index.ExampleSELECT ORDER_ID, ORDER_DATE, INVOICE_ID FROM ORDERS    WHERE ORDER_ID = ‘Z33412’ AND ORDER_DATE = ‘14-08-2020’The result of the above query will be as follows.ORDER_IDORDER_DATEZ3341214-08-2020In the ... Read More

Behaviour of a COBOL-DB2 program when number of locks exceed the limit

Mandalika
Updated on 30-Nov-2020 09:31:38

517 Views

Problem: How will the COBOL-DB2 program behave once the number of locks placed on the table space exceeds the defined limit?SolutionThe number of locks which an application can place on a DB2 resource such as page, table row, etc., is defined in DSNZPARM. Once the number of page and row level locks in any table exceeds the permissible limit, then the lock escalation takes place.In lock escalation, DB2 releases the page or row level lock which it has held and attempts to acquire a tablespace level or higher lock. In this case, the application now has wider access/scope to DB2 ... Read More

Purpose and usage of SAVEPOINT in COBOL-DB2 program

Mandalika
Updated on 30-Nov-2020 09:22:26

1K+ Views

Problem: How to use SAVEPOINT in a DB2? What is the purpose of SAVE-POINT in DB2? Explain with the help of an example.SolutionThe SAVEPOINT is used as a marker or tag to save the changes without committing in the database. After making the changes in the database, we can give a named SAVEPOINT statement and after that at any point of time we can rollback the changes to this savepoint using ROLLBACK statement.Practically, we can have multiple SAVEPOINTS in our COBOL-DB2 program and we can jump back to any of these SAVEPOINTS using ROLLBACK. This will revert all changes made ... Read More

How NON-REPEATABLE READ & PHANTOMS impact functioning of a COBOL-DB2 program?

Mandalika
Updated on 30-Nov-2020 09:12:38

371 Views

The NON-REPEATABLE READ conditions occur when the COBOL-DB2 program executes the same query multiple times, but the result of the query is different each time. This generally happens when two COBOL-DB2 programs access the same row of the DB2 table.The first program reads the row, then the second program reads the same row, updates it and commits the changes. The first program again reads the same row but now the data does not match with the previous fetch.The PHANTOM condition occurs when the number of rows in the query result does not match when the query is executed multiple times.For ... Read More

How LOST UPDATE and DIRTY READ impact the processing of a COBOL-DB2 program?

Mandalika
Updated on 30-Nov-2020 09:11:49

519 Views

The LOST UPDATE and DIRTY read issues are related to concurrency. The concurrency is defined as the ability of two or more applications to access the same table data.The LOST UPDATE impacts the processing of COBOL-DB2 programs in the following way.Suppose there are 2 application programs — PROG A and PROG B which are trying to access the same row of ORDERS DB2 table. PROG A and PROG B read a row from the ORDERS table with ORDER_ID = ‘Z87661’ at the same time. PROG A updates some data in this row and commits the changes. PROG B now updates ... Read More

Implementation of restart logic in a COBOL-DB2 program

Mandalika
Updated on 30-Nov-2020 09:11:01

6K+ Views

Problem: A COBOL-DB2 program takes the data from an input file having 1000 records and inserts the data in a DB2 table. The program failed after 432nd record. How will you implement restart logic?SolutionThe restart logic can be implemented in a COBOL-DB2 program by fixing a commit frequency. If we choose a commit frequency of 100, then the following steps need to be performed:Declare a variable for a counter, say WS-COUNT.Place a loop in which we will read the record from the file and insert it in a database. Increment the counter WS-COUNT by one each time a record is ... Read More

What is SAP ABAP?

Sai Subramanyam
Updated on 30-Jul-2019 22:30:20

483 Views

ABAP stands for Advanced Business Application Programming. It is one of the primary programming languages used for developing programs and applications for SAP R/3 systems and its related modules. It is a high-level language with respect to SAP as it is understood and known only to SAP environment. The latest version of ABAP which is ABAP Objects follows Object Oriented paradigm. Also, it is fully backward compatible with applications written in previous versions of ABAP whether it is ABAP/4 or other which were highly impressed by COBOL. Being an Object Oriented Programming language it fully supports features like inheritance, polymorphism, ... Read More

1
Advertisements