Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Is it possible to display records of a file in reverse order

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Is it possible to display records of a file in reverse order
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

Site Director


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

PostPosted: Mon May 14, 2007 9:54 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Thu May 17, 2007 7:09 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts VSAM File free space sancraig16 JCL & VSAM 13 Fri Mar 30, 2018 1:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us