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 |
How do u debug a S0C7 abend? (aswered till we get the field which caused that) After knowing the field which caused that how do u know the record which caused that if it is in production env? (dumb) Ok let us assume that we got to know that 100th record caused that and I wanted to skip only 100th record from the file and process from 101th. How to do that in JCL using SORT? (tried with STOPAFT but ended up dumb when he said smthing else is ther)
What is SDSF?
have in 100 records in a flat file i want to move records like 1,3,5,7,9,11,.. to Output file1 and 2,4,6,8,10,12,14 .. records moved to Output file2..Pls Provide real time answer..
a. Can the OPTIONAL clause in COBOL only be coded for input files? b. If it is coded for files opened in OUTPUT, I-O or EXTEND mode, will it give a compilation error? c. If there are no compilation errors and if such files are not coded in the JCL, will the OPEN statement run fine when these files are opened? d. How will a WRITE statement work for the above files?
What is a SSRANGE and NOSSRANGE?
what is search and searchall?what is the diffrence between them?give an best example?
I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?
which of the following can be used as a check protection symbol a.Z b.S c.* d.+
I try to use some column names in my cobol progorm but these column not in db2 table ..when do i get error ..while bind time or runtime?
how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it
when iam reading a flat file which has 100 records through cobol program when iam reading 50th records it gets abends .. so when i run the program again it should read from 50th record .where it got abened ? how it is possible
How To move a value to an array using move verb?