|
|
| Author |
Message |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13611 Location: 221 B Baker St
|
|
|
|
Hello,
You should not be running this in rexx. . . . |
|
| Back to top |
|
 |
References
|
|
 |
d_pansare
New User
Joined: 25 Apr 2009 Posts: 21 Location: Pune
|
|
|
|
| Quote: |
If the dataset has more number of records, REXX variable is not able to store and throwing an error message as 'unable to obtain storage'.
|
You got this kind of error because you must be reading the whole file in an array and getting your record count using value present in '0' th node. This will work unless and until your array does't take the storage space more than 2MB ( 2 MB is the threshold storage limit for REXX program variables ).
If upfront you are aware that size of your file is more thab 2 mb then don't read the entire file rather keep reading one by one record until you reach the end of file...
Let me know if you would like to have the code to count the record....
_________________
Always there to give and take the HELP !!!!! |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 5414 Location: italy
|
|
|
|
| Quote: |
| 2 MB is the threshold storage limit for REXX program variables |
please quote or give the link to the manual where You read that |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
And also pay attention to the comment of Dick above.
I await your reply to Enricos request eagerly, having processed files of over 10Mb in the past. |
|
| Back to top |
|
 |
d_pansare
New User
Joined: 25 Apr 2009 Posts: 21 Location: Pune
|
|
|
|
Apologies.. I quoted the wrong figure..
Here is the snapshot of what is mentioned in TSO/E REXX reference manual..
<<<<<<<<<<<<<<<<<<<<<<
There is no limit to the length of the values of variables, as long as all variables fit
into the storage available.
Implementation maximum: No single request for storage can exceed the fixed
limit of 16 MB. This limit applies to the size of a variable plus any control
information. It also applies to buffers obtained to hold numeric results.
>>>>>>>>>>>>>>>>>>>>>>>>
Here is the link ...
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IKJ4A370/2.0?DT=20060626210253
So if this true then one cannot write the whole file to array if the size is more than 16MB....
Again sorry for the confusion as far as actual storage is concerned...
[/url] |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 5414 Location: italy
|
|
|
|
do a bit of rereading, please
the 16MB limit is for a single variable, not for an array ( wrong term anyway ) as a whole
each entry of an array ( as You call it ) is a variable
( the right term would be a STEMMED variable )
each [stemmed] variable ( apart a few bytes of control info ) can be up to 16 MB
how many variables You can define and use depends on the virtual storage avilable |
|
| Back to top |
|
 |
ug123 Warnings : 1 New User
Joined: 01 Mar 2007 Posts: 39 Location: Chennai
|
|
|
|
Dick, I appologies for not responding. Please let me know other than rexx how can we do that...
This is what I am doing currently.
DSN='HLQ.XXXX'
"ALLOC DA('"DSN"') F(OUTDD) SHR"
"EXECIO 0 DISKR OUTDD(OPEN"
"EXECIO * DISKR OUTDD(STEM I."
COUNT = 0
DO LIN = 1 TO I.0
COUNT = COUNT + 1
END
ZEDLMSG = 'TOTAL RECORDS:' || COUNT
"ISPEXEC SETMSG MSG(ISRZ001)"
"EXECIO 0 DISKR OUTDD(FINIS"
"FREE F(OUTDD)"
Please give some code if anything is wrong in the above code.
Thanks,
Ugandar... |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 5414 Location: italy
|
|
|
|
edited to correct my first wrong impression
| Quote: |
nothing wrong from a REXX syntactic point of view,
|
why in <heaven> the loop
| Code: |
COUNT = 0
DO LIN = 1 TO I.0
COUNT = COUNT + 1
END |
at the end count will be equal to i.0
are You trying to be real sure that things match
the approach is wrong because an "EXECIO * READ .... (STEM ...."
will try to read in memory all the records and trying to manage in rexx more than a few thousandths records will give a poor performance from any point of view.
if there is a real business need to have an interactive count the most performing approach would be to invoke from rexx Your sort product
to count the records, writing a single output record with the result
and then in rexx read the single line displaying the result
see the jcl/dfsort forums on samples about counting records
but, I really see a little need to find out in an interactive way the record count |
|
| Back to top |
|
 |
|
|