GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe
Go To First  |  Previous Question  |  Next Question 
 Mainframe  |  Question 23 of 55    Print  
How to browse Vsam files in ascending order and in descending order?

  
Total Answers and Comments: 3 Last Update: May 24, 2007     Asked by: Prasad 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 09, 2006 10:38:44   #1  
jayakumar        

RE: How to browse Vsam files in ascending order and in...
We have to access the VSAM file in sequential mode.Since VSAM files are arranged in key sequence of acesending order .declare the file as follows:For example in PL1:Declare the file name as follows.DCL vsamfile file input sequential env(vsam);To browse in ascending order :dcl Vsamfile file input sequential env(vsam) bkwd;jai
 
Is this answer useful? Yes | No
September 11, 2006 17:13:39   #2  
techieheart Member Since: September 2006   Contribution: 4    

RE: How to browse Vsam files in ascending order and in...
As a programmer I always try not to use complicated logic. To answer your question:Ascending: Declare in COBOL as Access mode is sequential then do a normal read.Descending:1. Repro file to a flat file2. Use utility sort with D (descending parameter) on the flat file.3. Use the flat file in your read.
 
Is this answer useful? Yes | No
May 24, 2007 09:02:25   #3  
kckinney Member Since: May 2007   Contribution: 48    

RE: How to browse Vsam files in ascending order and in...
Simple create an alternate index on the key descending.
 
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