View previous topic :: View next topic
|
Author |
Message |
ramyacr
New User
Joined: 11 May 2007 Posts: 2 Location: Cochin
|
|
|
|
Hi,
Is it possible to display records of a file in reverse order, without using an array? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Assign a sequence number to each record then sort the records in descending sequence number order. |
|
Back to top |
|
|
ramyacr
New User
Joined: 11 May 2007 Posts: 2 Location: Cochin
|
|
|
|
Thanks Dick. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
dick scherrer wrote: |
Hello,
Assign a sequence number to each record then sort the records in descending sequence number order. |
something like
Code: |
//STEP0200 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
FIRST
SECOND
THIRD
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC FIELDS=(1,80,SEQNUM,8,ZD)
SORT FIELDS=(81,8,ZD,D)
OUTREC FIELDS=(1,80)
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome |
|
Back to top |
|
|
|