How to read a 100 record from a file through cobol?
Answers were Sorted based on User's Feedback
Answer / rajesh k
using arrays we can read 100 records from a file.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / y@$w@nth
I. I think ur asking how to read 100th record????
here is the syntax
a. MOVE 100 to rec-key
READ in-file KEY IS rec-key
END-READ.
In the above we followed random reading from a VSAM(KSDS) File
b.For sequential file if u need to read 100Th record then we
need to write a perform statement that will run 100 times
then read statement will execute 100 times then after
termination of perform statement we will have 100th record.
II.If ur asking about u need to read 100 records and store
them in a place go and read the all 100 records and store
each record in a table(array).
Let me know if any other...
Y@$W@nth...
Cheers....
Is This Answer Correct ? | 3 Yes | 2 No |
what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?
What is JOBLIB and STEPLIB in JCL? what is the purpose of using it?
How do get the result of your program directly on your pc?
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?
What is the figurative constant in cobol?
i want all ERRORS codes in COBOL ,JCL,VSAM ,DB2,CICS
What is SDSF?
I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.
How to read records in reverse order in flat file? I know we can do it by reading all records into an array.... Then read records in reverse order by using subscript or index but can any body give me the exact code.
Write the code to count the sum of n natural numbers.
can we use 77 level no for Redefines?if we use give an example?
Can we move SPACES to numeric field and ZEROES to alphabetic field? If yes what are the way doing this?