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

Answers were Sorted based on User's Feedback



I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPR..

Answer / sathish

//STEP1 EXEC PGM=SORT
//SORTIN DD *
IBM 2
IBM 1
IBM 4
WIPRO 3
WIPRO 2
WIPRO 9
TCS 4
TCS 6
TCS 3
//SORTOUT DD DSN=D362967.TEST.PS1,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,12,CH,D)
/*
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=D362967.TEST.PS1,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE
/*

Is This Answer Correct ?    6 Yes 2 No

I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPR..

Answer / ram

SORT FIELDS=(2,5,CH,D)
DUPKEYS MAX=(13,1,ZD)

Is This Answer Correct ?    1 Yes 0 No

I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPR..

Answer / sk

Sort the file in decrement order , the key of sort is
Company name and company code, and also use SUM FIELDS =
NONE , then it will remove the duplicates also

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

How many types we can give input to JCL

5 Answers   UHG,


Can we browse or edit the GDG dataset if it is a tape entry?

4 Answers  


i need some shortcuts and tso commands can any on ehelp me in these ?

1 Answers  


what is full form of AIX

3 Answers   Accenture,


How do you submit a JCL under CICS environment ?

5 Answers   Wipro,


Explain how can an in-stream dataset be terminated?

0 Answers  


If your job fails at particular step then what would be the return code for next steps

3 Answers   ADP,


What is the format of comment statement?

0 Answers  


Differentiate between the joblib and the steplib statements?

0 Answers  


MOD, DELETE; What does a disposition of (,DELETE) mean ?

3 Answers  


wht happens if cond=true ? pls give me with an example ?

2 Answers   Syntel,


hi friends........if u know syntax of IEBEDIT IN JCL

2 Answers  


Categories