We are using the searching a table which is indexed, once
the key is found, how can we get the occurance at which the
key was found.
Answer / shobhit
Initialize the index and a variable to 1 before search.
SET IDX VAR-POS TO 1.
SEARCH TABLE VARYING VAR-POS
AT END DISPLAY "Not Found"
WHEN TABLE(IDX) = <SEARCH STRING>
MOVE VAR-POS TO RESULT-VAR
DISPLAY "FOUND AT POSITION" RESULT-VAR
END-SEARCH.
Now the position is available in the variable RESULT-VAR.
| Is This Answer Correct ? | 5 Yes | 0 No |
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length
What are the different forms of EVALUATE statement?
What are the different data types in cobol?
Can anyone please give the example of Inline Perform.
I have a file it contain 10 records.i got abend at 8th record because of soc7.how do you know that perticular record got abend?
if a file has 1000 recods how copy the records from 1 to 100 records using sort
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
How many times the loop runs here 01 a pic 9(2) value 10. perform para1 a times stop run. para1: move 20 to a.
created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?
C1 C2 C3 are three conditions whose TRUTH values are as folloes. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below A:C1 AND(NOT C2) OR C3 B.(NOT C1) OR (NOT C2 AND NOT C3) C.(C1 OR C2)AND C3 D.C1 AND C2 OR C3 given the above information which of the following statements are valid? a.only A,B and C are TRUE b.only A,C and D are TRUE c.A,B,C and D are TRUE d.only C and D are TRUE
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
I had 100 records and i want to execute last three records by using cobol programming?what will be coding?