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 report-item in COBOL?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
Difference between cobol and cobol-ii?
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
What is the difference between perform … with test after and perform … with test before?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What is inspect in cobol ?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
example for sub strings ? and refernce modifications whit output pls
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
What rules are followed by the search verb.
How do u write test cases?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What guidelines should be followed to write a structured cobol prgm?
HOw can I get the negative sign while deduct high value from low value