Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Hi, I have 3 files say file A , file B and file C.I want to form an output file in which i will..

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

Hi, I have 3 files say file A , file B and file C.I want to form an output file in which i will..

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

Post New Answer

More JCL Interview Questions

What is model dataset label(Model DSCB)?

1 Answers  


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 ?

2 Answers   IBM,


Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?

1 Answers  


When you specify multiple datasets in a JOBLIB or STEPLIB, what factor determines the order?

0 Answers  


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?

2 Answers  


Matching Logic in Jcl not in cobol.Could any one please answer this question

0 Answers  


What is the difference between joblib and jcllib statements

7 Answers   IBM, Maples,


How to empty the records in jcl

1 Answers  


what is the purpose of coding notify parameter in job statement?

0 Answers   IBM,


For how long a job can be executed continuously in a mainframe ?

4 Answers  


When output dataset space is required, what quantity categories are used?

0 Answers  


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?

3 Answers   Wipro,


Categories