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


  • Subject: RE: Missing from RPG/LE
  • From: Hans Boldt <boldt@xxxxxxxxxx>
  • Date: Thu, 8 Oct 1998 08:26:59 -0400

Joe Teff wrote:
>What is a UCS2 data type?

UCS2 is perhaps more commonly known as "Unicode".
It's the 2 byte per character subset.

>Looking back at a handout from the Spring COMMON, I noticed that the
>%CHECK, %CHECKR, %XLATE and %SCANR BIF's are not on this list?
>Were they dropped or delayed?

As far as I know, these were never officially in
plan for this release.

>I frequently need to concatenate numeric fields onto text. %CHAR only
>works with graphics and date/time data types. I've started to use the
>%EDITW BIF to do this. For example, ITEMNO is a 7-digit field:
>
>  C          Eval         WarningMsg = 'Item ' +
>  C                       %EDITW(ITEMNO:'0       ') +
>  C                          ' is being obsoleted'
>
>Is this a good way to do it or is it better to move ITEMNO to a charater
>field before doing the concatenation? Or is there a better way to do it in
>a single statement. BTW, I'm on V4R2.

On V4R2, I would probably use %EDITC since it is
less dependant on the size of the numeric variable.

Oh yeah, I forgot about another enhancement.  In
our next release, %CHAR will now allow numeric
operands.  The result will be a varying length
string with leading sign if negative.  %CHAR(num)
is roughly equivalent to %TRIM(%EDITC(num:'P')).

One more thing now that my memory is back:  Hex
literals can now be used in places where a numeric
literal is expected.  If the hex literal represents
8 or fewer bytes, the value can be considered as an
unsigned numeric value.  That is, X'FD' in a
numeric context has the value 253 (not -3).

Cheers!  Hans

Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.