Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Access ESDS in reverse order

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Mon Apr 04, 2005 12:09 pm    Post subject: Access ESDS in reverse order
Reply with quote

Can i Access an ESDS from last record to first?
if yes pls explain me with code
Back to top
View user's profile Send private message

Kingsingh

New User


Joined: 11 Mar 2005
Posts: 9

PostPosted: Mon Apr 04, 2005 12:43 pm    Post subject:
Reply with quote

Through CICS u can access from last to first using STARTBR , READPREV
Back to top
View user's profile Send private message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Fri Apr 08, 2005 10:40 pm    Post subject:
Reply with quote

Thanks kings but i wanna do it in batch.
pls do explain me with coding
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Sat Apr 09, 2005 12:06 am    Post subject:
Reply with quote

cmohanraj

Use SORT or FILEAID to reverse the order of the records and read sequentially from the beginning.
To reverse the order of the records you can use the following SORT solution. Assuming the LRECL is 80.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=INPUT FILE,
//            DISP=SHR
//SORTOUT  DD DSN=OUTPUT REVERSED FILE,
//            DISP=(NEW,CATLG,DELETE),         
//            UNIT=SYSDA,                       
//            SPACE=(CYL,(5,5),RLSE)       
//SYSIN DD *
  INREC FIELDS=(1,80,SEQNUM,8,ZD)   
  SORT FIELDS=(81,8,ZD,D)         
  OUTREC FIELDS=(1,80)             
/*


Then use your program to read/process the OUTPUT REVERSED FILE.

hth
-Som
Back to top
View user's profile Send private message
cmohanraj

New User


Joined: 04 Apr 2005
Posts: 15

PostPosted: Mon Apr 11, 2005 2:06 pm    Post subject:
Reply with quote

thankyou.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts CICS Question RE: Browse, Readnext an... moezbud CICS 7 Sun Mar 05, 2017 5:45 am
No new posts Order BY AND Index Nileshkul DB2 2 Sat Dec 31, 2016 6:33 pm
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us