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
How you can characterize tables in cobol?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
IF I mention stop run in CICS what happens?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is an in line perform? When would you use it? Anything else you wish to say about it.
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
What is the difference between Call and a Link?
What is a report item?
When is inspect verb is used in cobol?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How do you reference the following file formats from cobol programs?
What is the difference between external and global variables in COBOL?
What is the usage of comp fields in cobol?
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)?
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.