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
In which area will you utilize 88 level items in cobol?
How do you get the data to code the BMS macro?
Difference between cobol and cobol-ii?
Can you please let me know the centre name of INS certification in Kolkata.
What is the difference between goback, stop run and exit program in cobol?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
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)?
What are the access modes of START statement?
What is rmode(24)
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?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
What is a SSRANGE and NOSSRANGE?
What is the difference between PIC 9.99 and 9v99 in COBOL?
What are the cobol coding sheets?