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



I'm going to "guess" here having not looked at it thoroughly yet, but I
don't think you can pass the address of a subfield of a data structure that
is BASED.

Bob

-----Original Message-----
From: rpg400-l-bounces@midrange.com [mailto:rpg400-l-bounces@midrange.com]
On Behalf Of Smith, Nelson
Sent: Thursday, January 30, 2003 3:29 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Convert hex to char (cvtch)


I changed it to 9B 0 and still get the same space offset error.....

> -----Original Message-----
> From: Joe Pluta [SMTP:joepluta@PlutaBrothers.com]
> Sent: Thursday, January 30, 2003 3:58 PM
> To:   RPG programming on the AS400 / iSeries
> Subject:      RE: Convert hex to char (cvtch)
> 
> > From: Smith, Nelson
> >
> > I'm trying to use cvtch to convert hex data to character, and I'm 
> > getting a space offset error.
> 
> This is the dreaded 'B' binary data type issue.
> 
> D  hexFunctCode                  4B 0
> 
> The above does NOT define a binary field 4 bytes long.  It defines a 
> binary field which can hold four digits of information, which is 
> actually a two-byte field.  So you want to be converting a 2-byte hex 
> field into a 4-byte character field.  Change your code as shown:
> 
> 
> D  hexFunctCode                  4B 0
> D  alp2HexBytes                  2A   OVERLAY(ds_ZDAQ0200:29)
> 
> D  alp4CharBytes  S              4A   INZ
> 
> C                   CALLP     cvtch(%ADDR(alp4CharBytes)
> C                                  :%ADDR(alp2HexBytes)
> C                                  :%Len(alp4CharBytes)  )
> 
> _______________________________________________
> 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.


****************************************************************************
****************************************************************************
****************************************************
This message originates from Lincare Holdings Inc. It contains information
which may be confidential or privileged and is intended only for the
individual or entity named above. It is prohibited for anyone else to
disclose, copy, distribute or use the contents of this message. 
All personal messages express views solely of the sender, which are not to
be attributed to Lincare Holdings Inc., and may not be copied or distributed
without this disclaimer. 
If you received this message in error, please notify us immediately at
MailAdmin@lincare.com or (800) 284-2006.
****************************************************************************
****************************************************************************
****************************************************

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

Follow-Ups:
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.