× 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.



That is probably his problem, Scott. Conceptually to me, CVTCH means convert
Hex to Character, and CVTHC means convert Character to Hex.
In an RPG programmers mind (i.e., mine) the term Character means it is in a
single character form and will be converted into two hex characters.
However, the IBM interpretation is the exact opposite.  That's what I get
for being left-handed. <g>


-----Original Message-----
From: rpg400-l-bounces@midrange.com [mailto:rpg400-l-bounces@midrange.com]
On Behalf Of Scott Klement
Sent: Thursday, January 30, 2003 6:09 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Convert hex to char (cvtch)



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)  )
>

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.