|
I think you wanted to use cvthc, rather than cvtch . I posted samples of calling these functions here: http://archive.midrange.com/rpg400-l/200205/msg00309.html The problem, I believe is that it's trying to read 8 bytes starting at the beginning of your 'alp4HexBytes' variable. Since that extends 4 bytes past the end of the parameter, it gives you the error that you can't access the memory at that offset. On Thu, 30 Jan 2003, Smith, Nelson wrote: > I'm trying to use cvtch to convert hex data to character, and I'm getting a > space offset error. Does anyone know what causes this error? The error > does not occur until the CALLP to cvtch. > > Space offset X'07FFEFF0' or teraspace offset X'0000000000000000' is > outside current limit for object QPADEV001WDBANS 751610. > The call to cvtch ended in error (C G D F). > > My prototype looks like this: > > D cvtch PR EXTPROC('cvtch') > D ptrCharReturn * VALUE > D ptrHexSource * VALUE > D intCharLength 10I 0 VALUE > > The field definitions look like this: > > D ds_ZDAQ0200 DS BASED(ptrZDAQ0200) > D alpUser 10A > D alpServer 10A > D alpFormat 8A > D hexFunctCode 4B 0 > D alp4HexBytes 4A OVERLAY(ds_ZDAQ0200:29) > > D alp8CharBytes S 8A INZ > > the pointer is initialized to the address of the incoming parm and all the > subfields of the data structure look fine, > > and my call looks like this: > > C CALLP cvtch(%ADDR(alp8CharBytes) > C :%ADDR(alp4HexBytes) > C :%Len(alp8CharBytes) ) >
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.