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
i want a program using by if, evaluate , string, unstring, perform, occurs?
how do you reference the esds vsam file formats from cobol programs
What rules are to be followed while using the corresponding options?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
What is static and dynamic call in cobol?
In COBOL programming, what is PERFORM? What is VARYING?
how to convert the recors form vsam file to db2 table tru file aid
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
Which Search verb is equivalent to PERFORM…VARYING?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
) How do u handle errors in BMS macro?
What is rmode(any) ?
Define cobol?
How you can characterize tables in cobol?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.