Write a program to concert an Indexed file into Sequential
file?

Answer Posted / ajay ahuja

Program:

1. Define sequential file of same record size as of Indexed
file. say "WS-SEQ-FILE-RECORD".

2. Open Indexed file in INPUT mode and Sequential file in
output mode.

3. Read Indexed file into "WS-SEQ-FILE-RECORD".

4. Write into Sequential file. Continue Step 3 thru 4 until
end of Indexed file.


JCL:

Use Utility = IDCAMS,
//DD1 DD DSN=INDEXED.FILE.NAME
//DD2 DD DSN=SEQUENTIAL.FILE.NAME
// SYSIN DD *
REPRO INFILE(DD1) OUTFILE(DD2)
/*
//

I Hope this will help you !!!!

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How you can characterize tables in cobol?

917


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1035


IF I mention stop run in CICS what happens?

2084


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2101


What is an in line perform? When would you use it? Anything else you wish to say about it.

829


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

942


What is the difference between Call and a Link?

883


What is a report item?

898


When is inspect verb is used in cobol?

919


What is the difference between a binary search and a sequential search what are the pertinent cobol?

925


How do you reference the following file formats from cobol programs?

906


What is the difference between external and global variables in COBOL?

1038


What is the usage of comp fields in cobol?

869


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

842


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3942