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...


I had 100 records and i want to execute last three records by
using cobol programming?what will be coding?

Answers were Sorted based on User's Feedback



I had 100 records and i want to execute last three records by using cobol programming?what will be..

Answer / farid

In jcl we can do as follows.........

1st skip the 97 recordes and write rest 3 into another file
using sort utilities(with the help of jcl).now cobol program
can use the 2nd file which has only last 3 records

Is This Answer Correct ?    6 Yes 0 No

I had 100 records and i want to execute last three records by using cobol programming?what will be..

Answer / atul

Using Short card you can write the last 3 records.
Short card as :

SORT FIELDS=COPY SKIPREC=97 STOPAFT=03


It will copy the last three records and put it in a file.

Cobol program can use this file containing records.

Is This Answer Correct ?    2 Yes 0 No

I had 100 records and i want to execute last three records by using cobol programming?what will be..

Answer / sandip

In cobol apply counter while reading file if counter reach at 97 start writing record to another file.

Is This Answer Correct ?    2 Yes 0 No

I had 100 records and i want to execute last three records by using cobol programming?what will be..

Answer / harsha

Read file sequentially and load it in table. keep check on
the number of ocurances(i.e. number of records).

Once the table is fully loaded, you know the total
occurances. Say it is X. Now read the table with occurance
X-3

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More COBOL Interview Questions

How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

0 Answers   HeadStrong,


What is Control Break processing ?

1 Answers   iGate,


subscript and index r not coded in u r application program what will happen?

2 Answers  


what do you mean by copybook? and what is the difference between the copybook which we are using in working storage and procedure division.

3 Answers   HCL, TCS,


A paragraph PARA-X is to be executed when none of the data names A, B and C have value of 1. Which of the following will achieve this ? (a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X (B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X (C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X (C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X

3 Answers   TCS,


what is MSGLEVEL?

1 Answers   IBM,


what are the steps to sort in a cobol program?

2 Answers   Patni,


Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?

1 Answers  


.How to add one input & one Out file in existing cobol program. how approach tell me step by step.

2 Answers   Syntel,


which is better comp or comp-3 in terms of memory utilization?

6 Answers  


I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?

5 Answers   RBS,


consider the fallowing 77 stat pic 9. 88 male value 1,2,3. 88 female value 4 through7. what will be the value of stat a) set male to true. b) set female to true.

5 Answers  


Categories