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
Difference between cobol and cobol-ii?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
how to access the file from prodution from changeman tool and to submit a file to production
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
Discuss about changing dataset name in proc.
What are the different rules of SORT operation?
What are the pertinent COBOL commands?
What is the difference between comp and comp-3?
How do we get current date from system with century in COBOL?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
How you can characterize tables in cobol?