|
Here's what I use to extend my user spaces:
HTH,
Aaron Bartell
// API Error DS
D gAPIError Ds Qualified
D bytesProvided 10I 0 Inz(%Size(gAPIError))
D bytesAvailable...
D 10I 0 Inz(0)
D msgID 7A
D reserved 1A
D data 256A
//--------------------------------------------------------------------------
------------------
// @Name - UsrSpc_setExtendable
// @Description - Change User Space to Extendable.
// @Author - Aaron Bartell
// @Usage - UsrSpc_changeAttributes(LibraryName: SpaceName: *On)
//--------------------------------------------------------------------------
------------------
P UsrSpc_setExtendable...
P B Export
D UsrSpc_setExtendable...
D PI
D pLibName 10A Value
D pSpaceName 10A Value
D pExtend N Value
// Change User Space Attributes
D qUsCUSAt Pr ExtPgm('QUSCUSAT')
D lib 10A
D qualifiedSpaceName...
D 20A
D attrList Like(changeAttrs)
D APIError LikeDS(gAPIError)
D spacePtr S *
D qualifiedSpaceName...
D S 20A
D returnLib S 10A
D* Structure to change the USRSPC attr to extendable
D changeAttrs DS
* Description field-by-field
* Number_Attrs = Number of attributes (1)
* 1-element array of attribute definitions as follows:
* Attr_Key1 = Identify attribute to change (3=Extendable attr.)
* Attr_Siz1 = Length of the attribute itself (1)
* Attr_Dta1 = New value for this attribute (1="yes")
D Number_Attrs 10I 0 Inz(1)
D Attr_Key1 10I 0 Inz(3)
D Attr_Siz1 10I 0 Inz(1)
D Attr_Dta1 1 Inz('1')
/Free
Attr_Dta1 = pExtend;
gAPIError = ' ';
qualifiedSpaceName = pSpaceName + pLibName;
qUsCUSAt(returnLib: qualifiedSpaceName: changeAttrs: gAPIError);
Return;
/End-Free
P UsrSpc_setExtendable...
P E
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.