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.
Answer Posted / 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 |
Post New Answer View All Answers
How would you understand error(execution phase)?
how you will the direct the data to spool using sysout option?
How can values be passed from the job stream to an executable program?
How do you create a temporary dataset?
What does a disposition of (MOD,DELETE,DELETE) mean ?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
Is automatic restart possible in jcl?
Explain about ISPF/TSO Commands
What is Cataloged Procedures?
can any one plzzzzzz tell the jcl code for creating ps using idcams
List the various advantages of using jcl language?
How to submit a jcl from cics?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?
What is multithreading in jcl?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.