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

If a field is declared as a comp-3 field and if we want to
sort a dataset based on this field, then how will the sort
card be???

e.g- if we want to sort by a field which is defined as a
PIC X(5) then we will mention - sort fields=(1,5,ch,a).
Likewise if a field is defined as PIC S9(10)COMP-3 then in
this case how will the sort field be defined (because in
this case a sign is also involved)???

Answer Posted / y@$w@nth

PIC S9(10)COMP-3

(n+1)/2 i.e (10+1)/2 11/2 =6(it fill follow round approach
if the result is in decimals)

so comp-3 allocates 6 bytes and the data inside comp-3 field
is stored in packed decimal format then we have to give

sort fields=(1,6,pd,a)
(or)
sort fields=(1,6,a) format=pd

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain dfsort utility?

1307


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

1098


Explain the hierarchy levels in jcl?

1650


How to pass data to a program that is coded in an exec statement?

1295


Explain the function of the dd dcb keyword?

1212


Explain how can the attributes of one sms dataset be copied to another dataset?

1176


what operation is performed by job statement?

1084


what is use of space parameter in dd statement?

1232


which parameter is use to declare the name of dataset in dd statement?

1219


what is use of dcb parameter in dd statement?

1269


In job processing, what happens in execution stage?

1157


what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?

1190


what is DSN in JCL and what are the parameters to declare the DSN?

1162


In job processing, what happens in conversion stage?

1165


what is SOC4 error?

1188