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

Answers were Sorted based on User's Feedback



If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / bramar

Hi Albert,

I have a small doubt in your answer
for S9(10)COMP-3 the size will be 6 bytes
So I think it may be
sort fields=(1,6,PD,A)
Confirme weather my answer is right or wrong
Thanks in advance

Is This Answer Correct ?    14 Yes 2 No

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / muttiah

Let's discuss what are all formats we have in sort
X/A - CH
Comp - BI
Comp-3- PD
9 - ZD/CH
So, Here we need to calculate how many bytes does the field
S9(10)comp-3 occupies.
10/2 + 1 = 5 + 1 = 6 bytes
Say field start's @ position 10then the sort command would
be like this..
Sort fields=(10,6,PD,A/D)
Hope this clarifies

Is This Answer Correct ?    9 Yes 0 No

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / albert

We have to specify the sort card like below.

Sort fields=(1,5,PD,A) -> PD is packed decimal

Is This Answer Correct ?    12 Yes 6 No

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / asish

Yes Bramar is right.
The sort card should be like this
sort fields=(1,6,PD,A)

Is This Answer Correct ?    6 Yes 3 No

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / manikandan

yes bramar ur s correct...

s9(10) comp-3 allocate 6 bytes..so sort fields will be

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

Is This Answer Correct ?    3 Yes 2 No

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / jegadeesan ramu

sort fields=(1,6,a),format=bi

Is This Answer Correct ?    6 Yes 5 No

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / 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

If a field is declared as a comp-3 field and if we want to sort a dataset based on this field, the..

Answer / shailesh soni

Sort card for sorting Comp 3 field is
sort fields = (1,6,PD,A)

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

How to submit jcl through a cobol program?

0 Answers  


What is the parameter to be passed in the job card for the unlimited time , irrespective of the job class ?

2 Answers   IBM,


how to modify the copy book?explain with examples

2 Answers   TCS,


Can a PS file be read in reverse order?If so,how

2 Answers   Syntel,


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.

2 Answers  


Is their any limit for data sets?

0 Answers  


how to create gdg with out using idcams utility

8 Answers   DSRC,


How to view the hexa decimal value thru file aid if copy book is not present for that particular data

1 Answers  


What is DATACOM db?

2 Answers  


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The DISP in the JCL is SHR and the program opens the file in EXTEND mode. What happens ?

3 Answers  


What is the function of //jcllib statement?

0 Answers  


Can we able insert data into a PS file Using IEBUPDTE utility??? If Yes can anyone describe it please..

1 Answers  


Categories