copy 100 records without using ibm utilities
Answers were Sorted based on User's Feedback
Answer / swapnil
USING AN OCCURS CLAUSE WE MOVE RECORD FROM ONE PS FILE TO
ANOTHER PS
| Is This Answer Correct ? | 5 Yes | 0 No |
MOVE 0 TO WS-COUNTER
MOVE N TO END-OF-FILE
PERFORM 1000-COPY-PARAGRAPH UNTILL (WS-COUNTER = 100 OR END-
OF-FILE = 'Y'.
100-COPY-PARAGRAPH.
READ INPUT FILE
AT END MOVE Y TO END-OF-FILE
NOT AT END MOVE IN-REC TO OUT-REC
ADD +001 TO WS-COUNTER.
1000-EXIT.
EXI.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / mahendra.ch
1st way to copy records to an other ps.
open input in-file
output out-file.
perform until end-of-file = 'y'
read in-file
at at end move 'y' to end-of-file
not at end
move in-rec to out-rec
write out-rec
end-read
end-perform.
close in-file.
close out-file.
2st way to copy records to an other ps.
we can copy the records by using file-aid tool also.
| Is This Answer Correct ? | 1 Yes | 0 No |
Why occurs cannot be used in 01 level in COBOL?
Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?
6 Answers ABC, IBM, Mphasis, Wipro,
What is SQL Code -904 and -903 in DB2 And how to handle it?
how we can edit records in vsam data set and non vsam data sets
give the examples of strings in cobol
what is the use of comp2 ? where can we use it with example ?
What are literals?
We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.
i have a requrement in A as viswa!@#$%&^**reddy i need to move viswareddy in B without junk values pls say how to do ths reply fast
how to transfer the file from pc to mainframe??
Can we use icetool in cobol program?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?