Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
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
References
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: 141

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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1