If you are current on the owner of a set, what is the
difference between an obtain next and obtain first?

Actually in which topic will we use dis???Plz explain it
clearly



If you are current on the owner of a set, what is the difference between an obtain next and obtain..

Answer / Rituraj Pandey

In COBOL, 'Obtain Next' retrieves the next record from a file, while 'Obtain First' retrieves the first record. If no records exist, 'Obtain Next' returns an error, but 'Obtain First' simply leaves the file pointer at its initial position.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..

3 Answers   iGate,


In file1 have 80 records are like d1,d2,d3......D80. File2 have 1000records are like a1d1,a1d2,a3d3.....Etc. I want matching records in file3 ? Plse tell me the matching logic???I want answer only in cobol ?Not using any tool or jcl?

1 Answers   CSC,


) How do u handle errors in BMS macro

1 Answers   IBM,


consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PARA-X MOVE 5 TO N how many times PARA-X willbe exicuted? a.10 b.5 c.infinate d.execution error

6 Answers   ABCL, TCS,


Can you please let me know the centre name of INS certification in Kolkata.

1 Answers  


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.

1 Answers  


Please let me know at which Scenarios we will go for STATIC call or DYNAMIC

3 Answers   IBM,


How do u know what version of cobol u are using?

3 Answers  


In an array processing what is the thing that can be done by using subscripts but not by using index

4 Answers   JPMorgan Chase,


I have 100 records in a file.. i want to sort the records from 5 to 5o... give the syntax...

2 Answers   CTS, DSRC,


how to display comp3 variables reply soon ?

4 Answers   Patni,


How can I find the maximum value of a field in a file while reading the file dynamically? without using sort function. Suppose i have a file with fields Timestamp, description, teamname, teamnumber.. i have read the file till end and find the maximun value of timestamp which is not in sorted order.. can we use function max(timestamp)?

1 Answers   CGI,


Categories