How can i change the below code in SQL to cobol/400?

EXEC SQL
SELECT COUNT(*) INTO : WS-COUNT FROM Db file
WHERE Field 1 = : WS-VAR
AND Field 2 = : WS-USERID
END-EXEC
*
EVALUATE TRUE
WHEN SQLCODE = +000
MOVE WS-COUNT TO Copybook field
WHEN SQLCODE = +100
MOVE ZEROES TO Copybook field

Answer Posted / mithun paul

1. Start the DB file with field1 and field2.
2. Read the DB file next record and increase the counter
value.
3. End the process, when end of file reached.
4. Move the counter value to Copybook field.



Mithun Paul
KMG Infotech Ltd., Kolkata

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of perform?

730


What are fillers? What is the actual use of fillers? With mall/simple example?

725


Explain the difference between comp & comp-3?

718


What is comp?

888


Explain the output procedure?

800


Explain how to convert 2010/02/11 to m/dd/yyy.. With string and without string if any other method... Code?

879


How to detect record is locked in cobol/400?

731


Define sort?

862


Define redefine?

863


Explain the input procedure?

702


What is perform?

863


Explain the difference between search and searchall?

681


Explain the difference between section, paragraph and sentences?

709


Explain what all the conditiones required for using open opcode on a file?

728


What is output procedure?

724