Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A COUNTER IN COBOL

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
how do i make a counter in cobol. when do i need "write", rewrite or read... plz add 1 and stuff... explain this plz plz plz
 
In WORKING-STORAGE

01 COUNTER PIC S9(04) BINARY VALUE IS ZERO.



Or are you talking about a flag? Your question is not very clear.

Stephen J Spiro
 
Hi Drup,

Judging by your ques you need a book on biginning COBOL. Go to half.com and search on "beginning cobol"; you'll get a list of used books ranging in cost from $1 to $35. Order the $1 book (cost you more in S&H). You'll begin to understand.

How did your ques originate? Did your instuctor ask? How did he pose the ques?

What is your take on the topic? How would you use it? Have you written a pgm? Have you written or read records to and from a file? Have you wondered about how many records you've written and/or read?

I ask these ques because of the ques you ask. Some indicate that you have an idea of what a counter may be; some don't.

Regards, Jack.
 
01 STR-COUNT PIC S9(5) VALUE ZERO.

IF STR-01 = STR-02
ADD +1 TO STR-COUNT
END-IF.




I hope this is what you are looking for.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top