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

I have two input files
i/p1
name id-key flag date
i/p 2
name id-key date

if id-key matches in the both the files then it should
write the output file from i/p1 with flag 'Y'. It should be
done thru JCL sort card ,Please provide the info on this.

---Note : output file should have all records from i/p1
with proper Flag.

Answer Posted / vivek chandrasekaran

Give the two input files to be compared as
//SORTIN DD DSN=INPUT1,DISP=SHR
// DD DSN=INPUT2,DISP=SHR
//SORTOUT DD DSN=OUTPUT,DISP=...
//SORTXSUM DD DSN=MATCH,DISP=(NEW,CATLG,DELETE),..
//SYSIN DD *
SORT FIELDS=(11,5,CH,A),EQUALS
SUM FIELDS=NONE,XSUM

Considering name length 10 and key length 5 starting from
11 pos. XSUM will capture the duplicates. EQUALS will keep
the first duplicate record. To put 'Y' flag use OUTREC
FIELDS=(1:1,15,16:C'Y',17:17,8) considering date length 8
starting from 17 pos.



SUM FIELDS=NONE

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute 2nd and 4th steps among 5 steps in jcl proc?

1306


We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?

2227


What is the function of dd disp parameter?

1133


How can a stopped job be started again?

1189


Does jcl support automatic restart?

1225


Explain the function of the dd dcb keyword?

1252


How do you overcome this limitation ?

1201


What are steplib and joblib? What for they are used?

1216


I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?

2555


Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?

1222


what are the types of abends that occur on job failure? And explain the possible causes of these

1609


Explain dfsort utility?

1337


Which statement is used to identify the private libraries in job?

1185


If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?

1305


What does a disposition of (new,catlg,keep) for a dsn mean?

1148