How can you get the ksds file records into your cobol program?



How can you get the ksds file records into your cobol program?..

Answer / Vivek Srivastava

You can use the KSDS fileset descriptor to access KSDS files in a COBOL program. Here's an example:nn 01 my-fileset PIC X(8) VALUE 'KSDS'. nn The KSDS fileset descriptor should be defined before the WORKSPACE or DATA DIVISION.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(9) VALUE SPACES. 01 WS-VARN REDEFINES WS-VARX PIC 9(9).

8 Answers  


What is the difference between COMP & COMP-3 ?

2 Answers  


Whats the difference between search & search ALL?

4 Answers   IBM,


Sending data is aplhabetic size 7 (value 3000), I wantated this value to be stored in database, which is defined as s9(7)v9(2)comp-3.

2 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

2 Answers   L&T,


What do you understand by psb and acb?

1 Answers  


Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.

12 Answers   CTS, Wipro,


u have passed sme charecters thru parm parameter in jcl. how do u code in cobol to recieve the values u gave in parm ?

2 Answers   IBM,


how to know that the file has 300 records how to acess it?

0 Answers   Hewitt, TCS,


Explain about different table spaces.

1 Answers  


How to concatenation one or more string?

4 Answers   Temenos,


How can you declare the file ?

1 Answers   Wipro,


Categories