Your results are not my results.  Maybe you need a PTF.  Directly copy/pasted
your posted code into SEU, included a DUMP, compiled and ran it, and DUMP

NAME         ATTRIBUTES      VALUE                                  
FIRST        CHAR(6)         ' SMITH'         '40E2D4C9E3C8'X       
FLD1         CHAR(3)         'XYZ'            'E7E8E9'X             
FLD2         CHAR(9)         'ABC  XYZ '      'C1C2C34040E7E8E940'X 
NAME         CHAR(3)         'MR.'            'D4D94B'X             
RESULT       CHAR(9)         'MR. SMITH'      'D4D94B40E2D4C9E3C8'X 
            * * * * *   E N D   O F   R P G   D U M P   * * * * *             

"Stone, Brad V (TC OASIS)" <> wrote:
> Well, I was looking into something, and this struck me.  I had to verify my
> thoughts with someone else on this  My co-worker agreed these looked wrong.
> The examples for the CAT operation in the RPG reference are wrong.  Either
> that or I'm SO fried right now that I can't see it.  Here are the examples:
> The following example shows leading blanks in factor 2.  After
>    |    * the CAT, the RESULT contains 'MR.SMITH'.
>    |    *
>    |   C                   MOVE      'MR.'         NAME              3
>    |   C                   MOVE      ' SMITH'      FIRST             6
>    |   C     NAME          CAT       FIRST         RESULT            9
>    |    *
>    |    *  The following example shows the use of CAT without factor 1.
>    |    *  FLD2 is a 9 character string.  Prior to the concatenation, it
>    |    *  contains 'ABC'; FLD1 contains 'XYZ
>    |    *  After the concatenation, FLD2 contains 'ABCXYZ'.
>    |    *
>    |   C                   MOVEL(P) 'ABC'          FLD2              9
>    |   C                   MOVE     'XYZ'          FLD1              3
>    |   C                   CAT      FLD1:2         FLD2
>    |
>    Figure 198. CAT Operation 
> Shouldn't the first example be 'MR.^SMITH' and the second be 'ABC^^XYZ'?
> (^=space)
> The others are wrong as well.  If I am correct and not out of my mind, then
> I can only come to the assumption that when translating the manuals to
> if they aren't using <PRE> then they forgot for each space to put in a
>   character.  That's besides the point, though.  I am looking at this
> correctly, right?
> Hans, what's up with this?
> Bradley V. Stone
> BVS/Tools

Get your own FREE, personal Netscape WebMail account today at
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to
| To subscribe to this list send email to
| To unsubscribe from this list send email to
| Questions should be directed to the list owner/operator:

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-2022 by 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.