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
Write a program that uses move corresponding.
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
In COBOL, what is the different between index and subscript?
How do we get current date from system with century in COBOL?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is rmode(24)
What do you understand by psb and acb?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
what is search and searchall?what is the diffrence between them?give an best example?
example for sub strings ? and refernce modifications whit output pls
What is a report item?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
how to move the records from file to array table. give with code example
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
Explain how you can characterize tables in cobol?