× 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 am trying to extract the packed value from a string what i
>did is this :
>
> $CtoH           PR          extproc('cvtch')
>   P$TgtHex            64a   options(*varsize)
>   P$SrcChar           128a   const options(*varsize)
>   P$SrcBytes          10i 0 value
>
>callp     $CtoH(w$hex:%subst(w$FldValue:1:a$Length(i)):
>                          a$length(i))
>
>here w$FldValue is a 10k character containing the packed data,
>length of packed data is a$length(i)
>
>At this callp statement i am getting MCH0601
>my joblog says:

The prototype does not match the documentation.  Try pointers to the source
and target strings rather than the above.  The RPG400-L archives have
examples of working code (link at the bottom of every message.)  Search for
'cvtch'.  The FAQ (http://faq.midrange.com) has a description of how to
translate the C prototypes into RPG.

Documentation at:
http://www.iseries.ibm.com/infocenter
 Search for 'cvtch'
  1 result - the MI Library Reference

  --buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.