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


Please Help Members By Posting Answers For Below Questions

Explain about different table spaces.

641


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

2086


What is the LINKAGE SECTION used in COBOL?

883


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

671


What is an in line perform? When would you use it? Anything else you wish to say about it.

637






What is link edit in cobol?

729


What is the difference between comp and comp-3?

692


Define static linking and dynamic linking.

653


What are different data types in cobol?

677


What are all the divisions of a COBOL program?

658


How are the next sentence and continue different from each other?

753


How to know whether the module is dynamical or statistical?

648


In COBOL programming, what is PERFORM? What is VARYING?

664


how do you reference the fixed unblock file formats from cobol programs

698


) what is the difference between AID and HANDLE AID?

1626