How to read a 100 record from a file through cobol?

Answers were Sorted based on User's Feedback



How to read a 100 record from a file through cobol?..

Answer / rajesh k

using arrays we can read 100 records from a file.

Is This Answer Correct ?    5 Yes 2 No

How to read a 100 record from a file through cobol?..

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

Post New Answer

More COBOL Interview Questions

Write some characteristics of cobol as means of business language.

0 Answers  


What is the Purpose of Pointer in the string?

0 Answers  


What are the differences between COBOL and COBOL II?

1 Answers   CSC,


When the working storage variables get allocated? a.At Compile time b.At starting of the run time c.At end of the run time. d.None of these

6 Answers   Wipro,


here is my compile and link edit steps in a jcl //COMPILE1 JOB (3CUS,S),'CCDM TEST' //STEPNAME EXEC PGM=IGYCRCTL,PARM='DYNAM,RENT,LIB,OBJECT, // OFFSET,APOST,OPTIMIZE',REGION=4096K //STEPLIB DD DSNAME=PM7351.TEST2.COB,DISP=SHR //SYSIN DD DSNAME=PM7351.TEST2.COB(PGM1),DISP=SHR //SYSUT1 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT2 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT3 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT4 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT5 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT6 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSUT7 DD UNIT=SYSDA,SPACE=(10,(10,10)) //SYSPRINT DD SYSOUT=* //SYSLIN DD DSNAME=&&LOAD,DISP=(MOD,PASS),UNIT=SYSDA, // SPACE=(10,(10,10)),DCB=BLKSIZE=400 //LKED EXEC PGM=IEWL,REGION=1024K //SYSPRINT DD SYSOUT=A //SYSLIB DD DSN=PM7351.TEST2.LOADLIB,DISP=SHR // DD DSN=PM7351.TEST2.COB(PGM1),DISP=SHR //SYSLMOD DD DSN=PM7351.TEST2.LOADLIB, // DISP=SHR //SYSUT1 DD UNIT=SYSDA,DCB=BLKSIZE=1024,SPACE=(CYL,(1,1)) //SYSTERM DD SYSOUT=* //SYSLIN DD DSN=&&LOAD,DISP=(OLD,DELETE) //SYSIN DD DUMMY i am getting IEW2013I 0F08 NO MEMBER NAME WAS SPECIFIED. MODULE WAS SAVED USING TEMPNAM1. could any one tell me the resolution for this..?

1 Answers  






Can anyone please give the example of Inline Perform.

6 Answers   TCS,


How you can delete a record from a ps file in cobol?

1 Answers  


What is diff between vsam and db2?what is advantage of db2 over vsam?which is best suited one?

1 Answers   Fidelity,


What is the default value of DISP for temp datasets

5 Answers   IBM,


suppose there is one PF having two members PF1 PF2.PF has one unique key Emp ID.could you tell me uniqueness in PF will be effective across members as well ? assume emp iD 3333 is in member PF1 would same Emp id be exist also in member PF2 ?

2 Answers   Tesco HSC, Wipro,


Explain complete concept of table handling in COBOL with an example?

2 Answers   IBM, TCS, Wipro,


what is scope terminator

2 Answers   IBM,


Categories