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

What type of SDLC u followed? Why?

1520


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

679


What is the default value(s) for an initialize and what keyword allows for an override of the default?

697


What is difference between static and dynamic call in cobol?

777


HOw can I get the negative sign while deduct high value from low value

1790






Give some examples of command terminators?

759


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

2105


What rules are followed by the search verb.

638


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2098


What is the difference between a binary search and a sequential search what are the pertinent cobol?

735


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

2661


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

1772


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

631


Which mode is used to operate the sequential file?

669


What is rmode(24)

680