GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 70 of 162    Print  
How you can read the file from bottom?

  
Total Answers and Comments: 3 Last Update: January 17, 2007     Asked by: ashish surkar 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 08, 2006 15:36:30   #1  
Lazar Kaplansky        

RE: how you can read the file from bottom?

The questions is very general. Let's look into these possibilities:

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; i

3. VSAM: I Batch unload the VSAM file using SORT in DESC order by

key value

Hope that helps


 
Is this answer useful? Yes | No
October 02, 2006 05:29:58   #2  
deepa        

RE: how you can read the file from bottom?
in sequential file
 
Is this answer useful? Yes | No
January 17, 2007 01:55:10   #3  
P.Karthikkumar        

RE: How you can read the file from bottom?

Hi

It is possible through jcl. For example if the input file contains 80 record length then

In sort INREC (1:1 80 81:SEQNUM 6 ZD) SORT FIELDS (81 6 ZD D) OUTREC (1:1 80)

1) Using inrec we need to generate the sequential number starts from position 81.

For example

1) First 1-80 bytes contains the actual record and from position 81 we need to generate sequential number using inrec i.e 000100 000200 upto 50 records.

2) After generating all those numbers sort we takes place in descending order.

3) Using outrec we have to move the first 80 bytes to the output file.

After doing this sort in first step in jcl you can read the output file in second step

Thanks

Karthikkumar.P


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape