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
Can we call instream to catalog and catalog to instream?
What are the utility programs in jcl?
When The Define Jcl Is Not Available, How Can You Get Information About A Vsam File's Organisation ?
what is the use of IEBGENER utility?
how you will the direct the data to spool using sysout option?
what is use of dcb parameter in dd statement?
Give the syntax of job specifying jcl statement.
Are there any set of rules for the names of the steps used in a job?
what is the use of JCL?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
what is the resolution for sb37 error
What do you understand by the term job time – out and how can you overcome that?
how do you access an uncataloged dataset in a jcl?
Is their any limit for data sets?
Explain the function of the steplib dd statement?