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 ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

1106


how do you reference the variable block file formats from cobol programs

1185


Difference between array and sub-script ?

1605


How many sections are there in data division in COBOL?

1080


explain sorting techniques in cobol program?

1147


What are the pertinent COBOL

2509


How can we find that module can be called – whether DYNAMICALLY or STATICALLY?

1169


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3211


How can you get the ksds file records into your cobol program?

1031


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

1057


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

4121


What is the difference between binary search and sequential search?

1046


A table has two indexes defined. Which one will be used by the SEARCH?

1232


What are the different rules of SORT operation?

1085


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9019