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

can I copy book which contain db2 statment in procedure divion?

2 Answers   Bank Of America,


I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.

1 Answers   DSRC,


what r the types of perform statement

4 Answers  


How do you code Cobol to access a parameter that has been defined in JCL?

3 Answers  


where will u code file status ?

2 Answers   TCS,






Can JUSTIFIED be used for all the data types?

3 Answers  


Which is the best IBM mainframe Training Institute in Ameerpet, Hyderabad

35 Answers  


RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE

12 Answers   TCS,


.How to add one input & one Out file in existing cobol program. how approach tell me step by step.

2 Answers   Syntel,


what is Reentrancy and Quasi-reentrancy?

1 Answers  


How can we increase the size of an existing PDS to include more no. of modules.

3 Answers  


file status 00 is checked after opening the file or reading the file

4 Answers   John Deere,


Categories