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 |
How to pass data to a program that is coded in an exec statement?
I have a job (4 steps) with time parameter coded in job & exec, say time=10 in job & time =3,2,2,4 in each steps. Will the job executes successfully?
I have one GDG. Everyday One new version is being created.Now I want to split this created version in different files each having 1000 records. Here Problem is I don't know How many records will be there in new version of GDG? that's why I don't know How many Out files we need to use . Interesting??????????????
Matching Logic in Jcl not in cobol.Could any one please answer this question
Given a input file with duplicates how to remove the duplicate records from the file using JCL?
6 Answers CDS, Convergys, TCS,
if we compile the cobol+ db2 program now ofter 5 years we need to compile again?
In your JCL, run the even numbered steps if date is even and run odd numbered steps if date is odd . Where do you generate the date ??in cobol or JCL ??
what is the meaning of 'sysin dd dummy'
Ques: How can we code COND parameter in a JCL so that only even steps (or only odd steps) get execute??
what is the COND=EVEN ? Can anyone give me an example to explain the usage.
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
We are aware of eliminating the duplicate records from outyput fiel using sort utility. Can we get the duplicate records in to another file in the Same sort utility?