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 / 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 |
Post New Answer View All Answers
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
For what purpose steplib and joblib are used ?
1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat
How can return codes be tested before execution of a job step?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
List the different components of jcl statement?
Can we use DISP=SHR in output file in JCL
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
How to do automated restart when a job abend?
What is catelog procedure and how many catelog procedure to use in one job?
How do you create a temporary dataset?
How gdg are concatenated?
What are steplib and joblib? What for they are used?
What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?
What dd statement is used to supply the name of a dataset?