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
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What are the different types of condition in cobol and write their forms.
What are the access modes of START statement?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
i need a small 3d program using inline and outline.
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
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Name some of the examples of COBOl 11?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
Why would you use find and get rather than to obtain?
Name the divisions, which are available in a cobol program?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What kind of error is trapped by on size error option?
When is inspect verb is used in cobol?
How to remove 2 duplicate records and copy only one using job control language?