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

Explain how can the disposition of sysout datasets be set for an entire jobstream?

0 Answers  


what happens when time=0 is given in jcl code. what happens when blksize=0 is given in jcl code. what is symbolic and overriding parameters and a example program.

6 Answers   HCL,


Can there be 2 job statements in a JCL? If yes what is the purpose of doing tha?

3 Answers  


A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code?

5 Answers   IBM, Wipro,


If I update one or more members in a pds in the step 1, how can I reach these new contents to be used in the step 2 of the same job? To start a new job via intrdr is not satisfactory, because I must solve this problem in one job.

2 Answers   IBM,


What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

5 Answers   CitiGroup,


suppose i have job it contains 10 steps after exicution of job failuer at 3 and 7 th steps i want exicute step 3 and step 7 only how we specify condition ?

5 Answers  


what is instream data

2 Answers   EDS,


In which table PLAN is registered in ?

3 Answers  


Name the statement which can be used to send data to another mvs jes3 node?

0 Answers  


What do you understand by the term job time – out and how can you overcome that?

0 Answers  


What are the default system and catalog libraries in JCL?

2 Answers   Infosys,


Categories