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

Access ESDS in reverse order


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts How to access web services/website? Mainframe Interview Questions 4
No new posts Rotate partition-logical & physic... DB2 0
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts access the last host command CLIST & REXX 2
Search our Forums:

Back to Top