×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi, Sudha
A couple things - there are /copy members for APIs in QSYSINC/QRPGLESRC
(and other source files for different languages). Unfortunately, the
QUSCRTUS is not there. But there is one that you will want to use -
QUSCUSAT - this is Change user space attributes. The one you want to change
is the extensible attribute. A newly created user space will not grow
automatically, but you can change its attributes so that it'll grow without
you having to worry about it. This is a great feature of user spaces, and
allows you to create it with an initial size but it'll grow on its own.
BTW, a user space is the most primitive kind of object. It is just a buffer
on disk that is addressable (you can use a pointer).
About sizes - space on disk (and memory) is in 4k pages. So if you give a
size of 1000 bytes, it'll actually be 4096. Because there is some kind of
object header, if you set it to 4096, it actually is 8192 (2 pages).
You should probably also look at the Redbook by Jon Paris, et al., "Who
Knew You Could Do That With RPG IV?",
at <http://www.redbooks.ibm.com/redbooks/pdfs/sg245402.pdf>. Chapter 5
section 3 has an extensive discussion of user spaces. It does not have an
example of the QUSCUSAT API, so you should use the /copy member and check
out the API manual for details.
Good luck
Vern
At 03:26 PM 9/15/2003 -0500, you wrote:
Sorry Rick!
I meant the size of the user space when you create, what value did you
put? Did you move like a %size(datastructure)*200 (in my case) into the
size? Since the size is a binary filed, however I put this value, I am
getting an error. I tried the following simple move (just some number)
in the size field and it still blows up saying value of user space size
cannot be 0.
call 'QUSCRTUS'
parm USpace
parm USpAttr
parm 10000 USpSize
parm x'00' USpInit
parm '*ALL' USpAuth
parm USpText
Thanks,
Sudha
Sudha Ramanujan
SunGard Futures Systems
sramanujan@xxxxxxxxxxxxxxxxxx
(312) 577 6179
(312) 577 6101 - Fax
-----Original Message-----
From: Chevalier, Rick [mailto:Rick.Chevalier@xxxxxxxxxxxxxxx]
Sent: Monday, September 15, 2003 3:15 PM
To: Midrange Systems Technical Discussion
Subject: RE: User Space
Another question, how did you determine the size and how did you move it
to the binary field. Though a dumb question, I have tried, hexa, just
plain move but it blows up saying the size is 0. My ds is around 2000
and I need 200 of these into user space.
Sudha,
Would you explain a little more about this? I'm not sure what you are
talking about.
Rick
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.