How to browse Vsam files in ascending order and in descending order?

Showing Answers 1 - 3 of 3 Answers

jayakumar

  • Sep 9th, 2006
 

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

  Was this answer useful?  Yes

techieheart

  • Sep 11th, 2006
 

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.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions