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



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

Answer / 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

More COBOL Interview Questions

What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.

2 Answers  


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

2 Answers   IBM, Steria,


How do you submit JCL via a Cobol program?

5 Answers   IBM,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


what are the diferences b/w sub-script and index?

4 Answers  






Write the code to count the sum of n natural numbers.

0 Answers  


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

0 Answers   Hewitt, TCS,


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

0 Answers  


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


what is the difference between start and startbr?

2 Answers  


How to convert bunch of words in a line to relvant ASCII values?

2 Answers  


What is difference between COBOL and VS COBOL II?.

1 Answers   Winsol Solutions,


Categories