| 
 | 
      * Easiest way is with a data structure.
     D                 ds
     D charArray                      1a   dim(5)
     D integerZone                    5s 0 overlay(charArray:1)
      * Now, when you move the numeric value to the integer zone field,
      *  the character array will contain the numeric digits.
     C                   move      123           integerField
If you *know* that the field will not exceed three digits, then you can adjust 
the field sizes accordingly.  Since you mentioned an integer field, the code 
above assumes a short or 2 byte integer.  Also
be careful about the signs.
Silvio Santos wrote:
> In RPG/400 is possible to copy an integer for instance 123 to an array with 3 
> positions ? Because when I make a MOVE 123 array the tree positions are 
>occupied with the number 3 (the last integer)....
> I also tried the MOVEL an MOVEA but they didnt work too.
>
> Silvio.
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * This is the RPG/400 Discussion Mailing List!  To submit a new         *
> * message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
> * from this list send email to MAJORDOMO@midrange.com and specify       *
> * 'unsubscribe RPG400-L' in the body of your message.  Questions should *
> * be directed to the list owner / operator: david@midrange.com          *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
--
===========================================================
R. Bruce Hoffman, Jr. -- IBM Certified AS/400 Administrator
-- The sum of all human knowledge is a fixed constant.
    It's the population that keeps growing!
begin: vcard fn: R. Bruce Hoffman, Jr. n: ;R. Bruce Hoffman, Jr. adr: 991 Lucon Road;;;Schwenksville;PA;19473;USA email;internet: rbruceh@ibm.net title: Independant AS/400 Consultant tel;work: 610-222-9707 tel;fax: 610-222-9717 x-mozilla-cpt: ;0 x-mozilla-html: FALSE version: 2.1 end: vcard
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.