have in 100 records in a file i want to move only matched
records to one output_file1 and nonmathed records are
moved to another output_file2 ... any one can provide
logic code
Answer Posted / abhay
BY USING SORT UTILITY, WE CAN DO THE SAME..
1)
//S1 EXEC PGM=SORT
//F1 DD DSN=.....
//F2 DD DSN=.....
.
.
//SYSIN DD *
SORT FIELDS=(1,4,CH,A)--> FIRST SORT ON ANY KEY
OUTFIL FILE 1 INREC FILEDS=(10,5,CH,EQ,C'A')--> CONTAINS
RECORDS WHOSE NAME STARTS FROM LETTER A
OUTFIL FILE 2 INREC FILEDS=(10,5,CH,NE,C'A')--> CONTAINS
RECORDS WHOSE NAME DOES NOT START FROM LETTER A(i.e. letter
other than that 'A')
*/
//
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Explain about different table spaces.
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
What is the LINKAGE SECTION used in COBOL?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is an in line perform? When would you use it? Anything else you wish to say about it.
What is link edit in cobol?
What is the difference between comp and comp-3?
Define static linking and dynamic linking.
What are different data types in cobol?
What are all the divisions of a COBOL program?
How are the next sentence and continue different from each other?
How to know whether the module is dynamical or statistical?
In COBOL programming, what is PERFORM? What is VARYING?
how do you reference the fixed unblock file formats from cobol programs
) what is the difference between AID and HANDLE AID?