IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible to display records of a file in reverse order


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramyacr

New User


Joined: 11 May 2007
Posts: 2
Location: Cochin

PostPosted: Mon May 14, 2007 9:29 pm
Reply with quote

Hi,
Is it possible to display records of a file in reverse order, without using an array?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 14, 2007 9:54 pm
Reply with quote

Hello,

Assign a sequence number to each record then sort the records in descending sequence number order.
Back to top
View user's profile Send private message
ramyacr

New User


Joined: 11 May 2007
Posts: 2
Location: Cochin

PostPosted: Thu May 17, 2007 10:11 am
Reply with quote

Thanks Dick.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Thu May 17, 2007 11:59 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 17, 2007 7:09 pm
Reply with quote

You're welcome icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top