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


can we read records in a file from botom to top. if
possible how can we read

Answers were Sorted based on User's Feedback



can we read records in a file from botom to top. if possible how can we read..

Answer / kamal

hi Sreejith,
u r giving wrong answer previous is not available in
cobol.pls find.

Is This Answer Correct ?    10 Yes 1 No

can we read records in a file from botom to top. if possible how can we read..

Answer / raj

yes,it is possible through JCL.

1. QSAM (sequential) file. You can run it thru SORT utility
adding SEQNUM and then sort then sort by SEQNUM in DESC
order
2. VSAM: In CICS you can read backward using READREV;
3. VSAM: I Batch unload the VSAM file using SORT in DESC
order by key value.

Is This Answer Correct ?    3 Yes 0 No

can we read records in a file from botom to top. if possible how can we read..

Answer / jayant

Sorry..the answer given by me was wrong...

Is This Answer Correct ?    1 Yes 0 No

can we read records in a file from botom to top. if possible how can we read..

Answer / rakesh

you can point to last rec using start, then read using 'read
prior' statement

Is This Answer Correct ?    1 Yes 0 No

can we read records in a file from botom to top. if possible how can we read..

Answer / guest

If you are using CICS Answer:1 is correct. Orther wise we
can not read from botom to top.

Is This Answer Correct ?    2 Yes 2 No

can we read records in a file from botom to top. if possible how can we read..

Answer / jayant

WORKAROUND:Sort the file in the descending manner first
based on its key,than read it normally.

Is This Answer Correct ?    1 Yes 1 No

can we read records in a file from botom to top. if possible how can we read..

Answer / kk

data division.
working storage section.
01 opr pic a(1).
01 arrays.
02 aaa occurs n times.
03 name attribute.
------------------
------------------
01 I pic 9(2) value 1.

procedure division.
open file
read file at end move 'n' to opt
perform para1 until opt = 'n'
perform para2 until i = 0

para1.
move filed to aaa
add i to i.
read file at end move 'n' to opt.
perform-end.

para2.
diplay aaa(I).
compute i=i-1.
perform-end.

stop run.

Is This Answer Correct ?    0 Yes 0 No

can we read records in a file from botom to top. if possible how can we read..

Answer / hari

Move low values to the key and then use READ PREV.

Is This Answer Correct ?    0 Yes 0 No

can we read records in a file from botom to top. if possible how can we read..

Answer / krishna

If it is a tape file,

OPEN INPUT FILEXXX REVERSED,

then the pointer is posistioned at the last record and read
next will read the prior record...

Is This Answer Correct ?    0 Yes 1 No

can we read records in a file from botom to top. if possible how can we read..

Answer / piyush mani

hi all..
store the content of file in table(array) and then
by using index of array start reading the file from bottom


giv ur feedback....

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

WE HAVE 5 DIFFERENT RECORDING MODE IN COBOL.FIXED, FIXEDBLOCK, VARIABLE, VARIABLEBLOCK AND UNDEFINED. WHAT IS THE DIFFERENCE AMONG ALL AND WHICH TYPE OF FORMAT SHOULD BE USED WHEN

3 Answers   Infosys,


Can we use redefine clause in occurs clause?

10 Answers  


What is a scope terminator? Give examples.

2 Answers  


How to Write the RESTART Logic Using COBOL?

4 Answers   GalaxE, L&T, Syntel, TCS,


What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


Which is not true about evaluate statement

0 Answers  


what is the use of outrecord?

0 Answers  


How will you find the currepted records in a file

2 Answers  


In an EVALUATE statement, can I give a complex condition on a when clause?

2 Answers  


I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?

5 Answers   Cognizant,


level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


How to Pass table from a cobol program to another cobol program and how to use that table in called program

8 Answers   Patni, SunGard,


Categories