View previous topic :: View next topic
|
Author |
Message |
thekumar101
New User
Joined: 22 Aug 2012 Posts: 4 Location: India
|
|
|
|
Requirement:
1. File is openened and its content is picked up in an array IP_ARR
2. I only need the last record.
Is there any way to fetch the last record directly (apart from sequentially going thru the flat file and counting the number of records and then using the number to access the array something like IP_ARR.numofrec)? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Do you have an idea what stemvariable.0 contains? That should get you there. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
- Rexx does not have arrays; it has stemmed variables.
- The question has nothing to do with arrays.
- As with all data sets, if the data set is DSORG=DA or is a RRDS, yes; if it is DSORG=PS or a ESDS, no (if it is DSORG=PO or a KSDS, the concept of "last record" is meaningless).
|
|
Back to top |
|
|
thekumar101
New User
Joined: 22 Aug 2012 Posts: 4 Location: India
|
|
|
|
thanks Bill.
But I tried it already. and it's showing the stemvar.0,
although it is suppose to show the number of elements in the array. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You'd best post your code. |
|
Back to top |
|
|
thekumar101
New User
Joined: 22 Aug 2012 Posts: 4 Location: India
|
|
|
|
Well, it's working now. Thanks a lot. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
OK. Typos can kill you in languages where you don't have to explicitly define the data :-) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Akatsukami wrote: |
- Rexx does not have arrays; it has stemmed variables. The question has nothing to do with arrays.
- As with all data sets, if the data set is DSORG=DA or is a RRDS, yes; if it is DSORG=PS or a ESDS, no (if it is DSORG=PO or a KSDS, the concept of "last record" is meaningless).
- Hi, Opal!
|
I've "corrected" your post, Akatsukami! |
|
Back to top |
|
|
|