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
WE CAN SOLVE THIS PROBLEM THROUGH 2 METHODS..
1) THROUGH JCL:
By using ICEMAN utility, it cab be done as below:
//S1 EXEC PGM=ICEMAN
//DD1 DD DSN=.....
//DD2 DD DSN=....
.
.
//SYSIN DD *
SELECT FROM INDD(DD1) TO OUTDD(DD2) ON (1, 4 CH, A) ALLDUPS
SELECT FROM INDD(DD1) TO OUTDD(DD2) ON (1, 4 CH, A) NONDUPS
*/
//
2) THROUGH COBOL PROGRAM:
AS BELOW
1)FIRST SORT 2 FILES ON ANY KEY
2)READ 2 FILES FOR MATCHING KEYS.IF KEY OF 2 FILES MATCHED,
THEN PUT RECORDS INTO FILE3 ELSE MOVE IT INTO FILE4
3)REPEAT THE PROCESS UNTIL END-OF-FILE1 AND END-OF-FILE2.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
how can i see junk values in dclgen or in hostvariable of comp ?
What is the difference between binary search and sequential search?
What type of SDLC u followed? Why?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Why occurs cannot be used in 01 level in COBOL?
What is the difference between Call and a Link?
Define cobol?
Name the sections present in data division.
What are the pertinent COBOL
Describe the cobol database components?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is amode(31)
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What guidelines should be followed to write a structured cobol prgm?