GOBACK vs STOP RUN In Cobol: Difference and Comparison

A GOBACK statement never goes hand in hand with a declarative procedure specified. Stop runโ€™s ideal use is for Main programs or Stand-alone programs, but it will be utilized in Subprograms further where it returns control to OS.

Go-backs are often employed in both Main and subprograms. It works like a stop run in main modules and submodules; it gives control to main programs.

Key Takeaways

  1. GOBACK returns control to the calling program or operating system, terminating the current program.
  2. STOP RUN terminates the entire run unit, including all programs in the hierarchy.
  3. GOBACK is generally preferred in modular programming, while STOP RUN is used in standalone programs.

GOBACK vs STOP RUN In Cobol

GOBACK signals the end of the main processing routine of a COBOL program, returning program control to the system that initiated it. STOP RUN is a COBOL statement used to end a program and release resources held by the program. When executed, the program control returns to the system that initiated the program.

GOBACK vs STOP RUN In Cobol

Go back is a statement that refers to the logical end of a given program in COBOL.

/10

IT Quiz

Test your knowledge about topics related to technology

1 / 10

Who founded Microsoft?

2 / 10

A process that is repeated, evaluated, and refined is called __________

3 / 10

Machine becomes intelligent once they are

4 / 10

Geo-stationary satellite revolves at โ€“

5 / 10

Which web browser is developed by the Google

6 / 10

Which of the following is not a search engine

7 / 10

Systems for differently-abled individuals is an example of

8 / 10

The app or software, or website asks about access of your location, camera, storage, contacts etc., are known as

9 / 10

Which number system has a base 16

10 / 10

Who founded Apple Computers?

Your score is

0%

While its usage can be regarded as confusing, it makes no distinction between an absolute termination and being discarded (elements are deleted).

In contrast with this type of definition, the second value declared has two parameters.

Stop Running: All the dynamically allocated programs are also deleted from the run unit. Because it gives the control back to the OS, itโ€™s advised to use it only in the Main modules.

Not recommended to use in Sub-programs because it gives control back to OS, where the sub-program is supposed to send control back to its main module.

Comparison Table

Parameters Of ComparisonGO BACK In CobolSTOP RUN In Cobol
Used forLogical endProgram termination
Control BackYesNo
ModulesManyMain
FunctionChanges status of the fileDeletes all the file
SubmodulesYesNo
Runtime environmentYesNo

What is Go Back In Cobol?

A GOBACK statement comes after imperative statements or usage of the only statement in an exceeding sentence because statements following the GOBACK statement donโ€™t seem to be executed.

This allows for variable access control-based operations like CIL.

The parameters of an array are literal, and its result or output on success or failure (or both) while elements without such assignment remain unchanged. Go back statement.

The above code looks correct because there is no need for any special case declaration within each subroutine; this isnโ€™t true in all cases.

In some programs where custom routines have been defined as such, or with variable name names not preceded by-, โ€˜you can skip over one rather than another pair and still get it executed correctly using automatic evaluation when evaluating functions declared inside a variable.

The GOBACK statement ends after an additional code than the equivalent exit program, as a result, stops the run statement.

A GOBACK statement must not be executed while executing a declarative procedure. Go-backs are often employed in both Main and subprograms.

What is Stop Run In Cobol?

As the name implies, it stops the execution of the program and offers control back to the OS.

With stop run, all the dynamically allocated programs are also deleted from the run unit.

Because it gives the control back to the OS, itโ€™s advised to use it only in the Main modules.

Not recommended to use in Sub-programs because it gives control back to OS, whereas the sub-program is meant to send control back to its main module.

It also closes all the files related to the run unit. As the name implies, it stops the execution of the program and offers control back to the OS.

It also closes all the files related to the run unit.

This is not a decent practice as there have been many examples, like CVS versions that started using JAVA executable binaries with no problem on Ubuntu Server 14 by default, but why canโ€™t they be developed so other users havenโ€™t got this same problem too?

I believe, again, that one should ask them if their version has done better when running with Java Runtime Environment (JRE), which supports shared object file formats โ€“ like Microsoft Visual Studio or Google Code Compilation Tools.

Stop-run deletes the files and canโ€™t be employed in most modules. It works in submodules.

Main Differences Between GOBACK and STOP RUN In Cobol

  1. Go back is used to show the logical end, but stop-run is used for program termination.
  2. Going back gives control back, but stopping running does not.
  3. Go back can be used in many modules, but stop run can be used only in the main module.
  4. Go back changes the status of the file in the run unit, but stop-run deletes the file in the run unit.
  5. Go back can be used in sub-modules, but stop run cannot be used in sub-modules.
  6. Go back is controlled by the runtime element, but stopping the run is not controlled by the runtime environment.
References
  1. https://ieeexplore.ieee.org/abstract/document/4812753/
  2. https://dl.acm.org/doi/pdf/10.1145/1010884.1010889

One request?

Iโ€™ve put so much effort writing this blog post to provide value to you. Itโ€™ll be very helpful for me, if you consider sharing it on social media or with your friends/family. SHARING IS โ™ฅ๏ธ

Want to save this article for later? Click the heart in the bottom right corner to save to your own articles box!

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.