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...

File1 has 100 records and file2 has 200 records i want to
copy 50 records which r in both file into file3

Answer Posted / mani

First need to sort both files
READ FILE1
READ FILE2
PERFORM UNTIL EOF = 'Y'
IF FILE1-ID > FILE2-ID THEN
READ FILE2 AT END MOVE 'Y' TO EOF
ELSE IF FILE1-ID < FILE2-ID
READ FILE1 AT END MOVE 'Y' TO EOF
ELSE IF FILE1-ID = FILE2-ID
WRITE FILE3
READ FILE1 AT END MOVE 'Y' TO EOF
READ FILE2 AT END MOVE 'Y' TO EOF
END-PERFORM

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there any command to check wether the ps file is in sorted order?

2877


What is the motivation behind coding class parameter in job statement?

1166


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

2234


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

2537


Must tape dataset definitions include vol=ser specifications?

1710


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

1133


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

1169


I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.

1205


Is automatic restart possible in jcl? If yes, how?

1105


Brief description of inline procedure of jcl.

1238


What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?

9727


What dd statement is used to supply the name of a dataset?

1381


Explain in DD statement what is the use of DCB parameter?

1122


What do you understand by jcl?

1034


what is “Cond= even” and “Cond=only”?

1294