Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to retrive the 9th records out of ten records using the
cobol program ?

Answers were Sorted based on User's Feedback



How to retrive the 9th records out of ten records using the cobol program ?..

Answer / kk

Hi,

just use count variable in working storage.then when read
the file add 1 to count.after that u give if statement if
count = 9 display rec.

Is This Answer Correct ?    20 Yes 0 No

How to retrive the 9th records out of ten records using the cobol program ?..

Answer / ramesh

IDENTIFICATION DIVISION.
PROGRAM-ID. RAMESH.
ENVIRONMANT DIVISION.
DATA DIVISION.
FILE-SECTION.
FD INFILE.
01 IN-REC
05 NAME
05 AGE
WORKING-STORAGE SECTION.
01 WS-COUNT PIC 99.
PROCEDURE DIVISION.
ACC-PARA.
accept ws-num
move 0 to ws-count
ADD-PARA.
read infile
add 1 to ws-count.
perform add-para until ws-count = ws-num

display in-rec.

Note: as per ur requirementprovide ws-num=9
COMPILE IT .PASS WS-NUM THRU RUN JCL SYSIN AS 9 .You will
get the 9th record.

Is This Answer Correct ?    10 Yes 0 No

How to retrive the 9th records out of ten records using the cobol program ?..

Answer / shan

If you are sure that ur file will always have 10 records,
then move high-values to record format and read prior twice.

Is This Answer Correct ?    6 Yes 6 No

Post New Answer

More COBOL Interview Questions

What do you feel makes a good program?

2 Answers  


what are the steps to sort in a cobol program?

2 Answers   Patni,


what happens if we wont give timestamp in precompilation process ?

4 Answers   Covansys,


I have a COBOL main program which is calling sub program, the number of calling parameters used in main program are 4 whereas in sub program it's 5. Sub program is passing 5 parameters back to main program Will there be any compilation error? Or main program parameters displays junk values?

1 Answers  


How is sign stored in a COMP field ?

3 Answers   Accenture,


COMP field occupy ?

2 Answers  


What is the meaning of 'Eject' verb in cobol?

2 Answers   TCS, Wipro,


What are the steps you go through while creating a COBOL program executable?

3 Answers  


How to use the same COBOL program in Batch and CICS on lines? explain with an example

0 Answers   IBM,


Write a program to explain size error.

0 Answers  


Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.

12 Answers   CTS, Wipro,


State the various causes of s0c1, s0c5 and s0c7.

0 Answers  


Categories