I have a sequential file in which there are 50 records. Now
I want to copy all the 50 records in the reverse order into
a new file? The last record in the original file should be
the first record in the new file. How can I do it?
Answer Posted / avinash n
The file could be sorted in the descending order.
Synatx:
SORT FIELDS=(1:Y,CH,D)
where Y = record length.
The output would be in the reverse order!
| Is This Answer Correct ? | 0 Yes | 13 No |
Post New Answer View All Answers
What is the function of the steplib dd statement?
How do you create a temporary dataset?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
List the different jcl statements that are not permitted in the procedures?
Is condition checking possible in jcl? If yes, how?
what is “Cond= even” and “Cond=only”?
What is the function of job statement in jcl?
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?
What is the function of //jcllib statement?
How does jcl act on a cobol code?
How can the disposition of sysout datasets be set for an entire jobstream?
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?
Are there any set of rules for the names of the steps used in a job? What are they?
In sms datasets, what is the function of the dd mgmtclas keyword?