|
That seems to be the problem. When I reduced my variable to 4064, it worked fine. Thanks. Bobby. Robert Hicks Combinatorics Consulting Company Tel.: (248) 347 - 7222, ext. 222 Fax: (248) 347 - 7227 Email: Robert.Hicks@ccc-michigan.com Dave McKenzie <davemck@zbiggrou To: mi400@midrange.com p.com> cc: Sent by: Subject: Re: [MI400] User profile mi400-admin@midra nge.com 07/10/02 02:40 PM Please respond to mi400 I think your CPYBWP is trying to copy more bytes than the size of the space. If I remember correctly, the bad offset was x'FE0' (4064). Evidently the associated space in this case is 1 page or 4096 bytes (but it could vary), the first 32 bytes of which is a header (which MI can't get at), leaving 4064 of addressable space. You can use the MATSOBJ instruction to get the actual space size, then copy only that much: DCL SPCPTR MatoTmplP AUTO INIT(MatoTmpl); DCL DD MatoTmpl CHAR(86) AUTO BDRY(16); DCL DD MatoProv BIN(4) DEF(MatoTmpl) POS( 1) INIT(86); DCL DD MatoAvail BIN(4) DEF(MatoTmpl) POS( 5); DCL DD MatoSpcSz BIN(4) DEF(MatoTmpl) POS(83); DCL SPCPTR .User; DCL SPC User BAS(.User); RSLVSP .ProfileDfn,Object,*,*; SETSPPFP .User,.ProfileDfn; MATSOBJ MatoTmplP, .ProfileDfn; CPYBWP Return_Space, User(1:MatoSpcSz); --Dave On Wednesday 10 July 2002 03:26 am, Bobby.Hicks@ccc-michigan.com wrote: > Hi, > > I posted a message about getting a space offset error. I still haven't > been able to fix it. > > This is portions of my code: > > /*--System pointers for the Profile definition > DCL SYSPTR .ProfileDfn; > DCL SPCPTR .User; > DCL DD User CHAR(4096) BAS(.User) BDRY(16); > > > RSLVSP .ProfileDfn,Object,*,*; > SETSPPFP .User,.ProfileDfn; > > /*--Set normal return code > CPYBWP Return_Space,User; (this causes the error) > > What am I doing wrong? > > Thanks for any help you can give me. > > > Bobby. > > Robert Hicks > Combinatorics Consulting Company > Tel.: (248) 347 - 7222, ext. 222 > Fax: (248) 347 - 7227 > Email: Robert.Hicks@ccc-michigan.com _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/mi400 or email: MI400-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.