Hi,
I have 3 files say file A , file B and file C.I want to
form an output file in which i will have all the records
from file A. Files B and C also may contain records that
are present in file A.I want those records also to be
included in my output file.
for eg:
file A contains:
1
2
3
file B contains:
2
4
5
file C contains:
1
3
5
So in my output file should look like:
1
2
3
2
1
3
Can any one help ???.....thanks in advance.
Answers were Sorted based on User's Feedback
Answer / saikishore
I don't know what are you going to tell in your questions.
I am giving the solution according to your example.
STEP1: JOIN FILEB, FILEC.
//SYSIN DD*
JOIN FILES=F1,FIELDS=(1,1,A)
JOIN FILES=F1,FIELDS=(1,1,A)
JOIN UNPAIRED,F1,F2
REFORMAT FIELDS=(F1:1,1,F2:1,1)
INCLUDE COND=(1,1,CH,EQ,C' ',AND,2,1,CH,EQ,C' ')
SORT FIELDS=COPY
/*
STEP2:
//SORTIN DD DSN=FILEA,DISP=SHR
// DD DSN=OUTPUT FILE OF STEP1,DISP=SHR
//SORTOUT DD DSN=FILE6, <- GIVE ALL THE PARAMETERS
//SYSIN DD *
SORT FIELDS=COPY
/*
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / murali
@sai Kishore: I'm not able to understand what will be the
output of step1..
Can you please explain the JCL stmts in step1 line by line.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is model dataset label(Model DSCB)?
If a JOBSTEP abends, AND without using COND also, all the subsequent steps execute, then what is the use of using EVEN ? Why do we use EVEN when without it also all the JOBSTEPs execute ?
Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?
When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
How can I write the joblog in the spool on normal end of a job step and direct the joblog to a dataset only if the step abends?
Matching Logic in Jcl not in cobol.Could any one please answer this question
What is the difference between joblib and jcllib statements
How to empty the records in jcl
what is the purpose of coding notify parameter in job statement?
For how long a job can be executed continuously in a mainframe ?
When output dataset space is required, what quantity categories are used?
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?