Question:
how to write cobol program?
Prabhakar C
2007-02-02 02:29:56 UTC
how to write cobol program?
Three answers:
Pushpendra Singh Sisodia
2007-02-02 02:36:11 UTC
Like this ;

$ SET SOURCEFORMAT"FREE"

IDENTIFICATION DIVISION.

PROGRAM-ID. ShortestProgram.



PROCEDURE DIVISION.

DisplayPrompt.

DISPLAY "I did it".

STOP RUN.
Don
2007-02-02 11:12:40 UTC
These pages contain a large number of example COBOL programs. The programs may be downloaded, or viewed in your browser. Test data for the example COBOL programs is also provided where appropriate.



The programs have been compiled and tested using Microfocus NetExpress but they should work on any COBOL-85 complient compiler with very few changes.

You may have to reformat the programs if your compiler does not have the equivalent of the $ SET SOURCEFORMAT"FREE". This compiler directive frees Microfocus COBOL programs from the normal COBOL formatting conventions.

You may also have to remove the ORGANIZATION IS LINE SEQUENTIAL phrase in the SELECT and ASSIGN clause of sequential files. In Microfocus COBOL, LINE SEQUENTIAL files terminate each record with a carriage return and line feed.
Human
2007-02-02 15:09:20 UTC
Search for free programming tutorials on www.Google.com


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...