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
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
Is it possible to left uncode disp? If yes, how?
I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?
Explain the jcl exec statement?
what is DD statement is used in JCL?
Explain the function of dd name parameter with a 2 part structure; audit.report?
How can unused space allocation be returned to the system when a dataset is closed?
what is the use of IEBGENER utility?
Name the statement which can be used to send data to another mvs jes3 node?
Is their any limit for data sets?
What happens if both JOBLIB & STEPLIB is specified ?
Explain the purpose of the dd keylen parameter?
Explain dfsort utility?
I want my job (careerride) to be executed in 1 minute and 2 seconds. How do I do that?
Explain the function of //jcllib statement?