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 |
What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.
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.
How do you submit JCL via a Cobol program?
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?
what are the diferences b/w sub-script and index?
Write the code to count the sum of n natural numbers.
how to know that the file has 300 records how to acess it?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
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.
what is the difference between start and startbr?
How to convert bunch of words in a line to relvant ASCII values?
What is difference between COBOL and VS COBOL II?.