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 search and searchall?what is the diffrence between them?give an best example?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is a report item?
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 are various search techniques in cobol? Explain.
What is the problem of ordered sequential files access?
What type of SDLC u followed? Why?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What are the different rules of SORT operation?
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?
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
Why would you use find and get rather than to obtain?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc