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
Explain dfsort utility?
What does a disposition of (MOD,DELETE,DELETE) mean ?
Explain the hierarchy levels in jcl?
How to pass data to a program that is coded in an exec statement?
Explain the function of the dd dcb keyword?
Explain how can the attributes of one sms dataset be copied to another dataset?
what operation is performed by job statement?
what is use of space parameter in dd statement?
which parameter is use to declare the name of dataset in dd statement?
what is use of dcb parameter in dd statement?
In job processing, what happens in execution stage?
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?
what is DSN in JCL and what are the parameters to declare the DSN?
In job processing, what happens in conversion stage?
what is SOC4 error?