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



In converting S/36 RPG code to RPGIV, I have run into a movea operation
issue.  It sounds funny, but when a "movea" instruction occurs for one
field, another field is updated.   Its all outlined in the "movea
issue.txt" file.  The fields updated are defined within the program and
defined as parameters.  I have included the code listing and RPG dump for
reference.   This code is working currently running on a AS/400 Advanced 36
Machine.

   More than one Parameter field is updated after one movea instruction.


   17
   D*--------------------------------------------------------------
   18       D A               S              8    DIM(16)
   19       D PM1             S              1    DIM(256)
   20       D PM2             S              1    DIM(256)

   26       D*------------------------------------------------------------
   27       D  PA             S            128
   28       D  PRM1           S            256
   29       D  PRM2           S            256

   46       C*--------------------------------------------------------
   47       C     *ENTRY        PLIST
   48       C                   PARM                    PA
   49       C                   PARM                    PRM1
   50       C                   PARM                    PRM2



   68       C*----------------------------------------------------
   Subroutine
   69       C     STUFF         BEGSR
   70       C*          ------
   71       C*  Stuff parameters for passing
   72       C                   MOVEA     A(1)          PA
   73       C                   MOVEA     PM1(1)        PRM1
   74       C                   MOVEA     PM2(1)        PRM2
   75       C                   MOVE      *BLANKS       A(1)
   76       C                   MOVE      *BLANKS       PM1(1)
   77       C                   MOVE      *BLANKS       PM2(1)
   78       C                   ENDSR
   *****************************************************************************


   Values of fields at before line 74.

   EVAL a

   A(1) = '        '
   A(2) = '        '
   A(3) = 'SETTIM  '
   A(4) = '        '
   A(5) = ' 0000000'
   A(6) = '00000   '
   A(7) = '        '
   A(8) = '        '
   A(9) = '        '
   A(10) = '        '
   A(11) = '        '
   A(12) = '        '
   A(13) = '        '
   A(14) = '        '
   A(15) = '        '
   A(16) = 'CHAIN NO'

   EVAL pm1

   PM1(1) = '0'
   PM1(2) = '0'
   PM1(3) = '0'
   PM1(4) = '0'
   PM1(5) = '0'
   PM1(6) = '0'
   PM1(7) = '3'
   PM1(8) = '0'
   PM1(9) = '4'
   PM1(10) = '0'
   PM1(11) = '9'
   PM1(12) = '3'
   PM1(13) = ' '
   PM1(14) = ' '
   PM1(15) = 'T'
   PM1(16) = 'u'
   PM1(17) = 'e'
   PM1(18) = 's'
   PM1(19) = 'd'
   PM1(20) = 'a'
   PM1(21) = 'y'
   PM1(22) = ' '
   PM1(23) = ' '
   PM1(24) = ' '
   PM1(25) = ' '
   PM1(26) = ' '
   PM1(27) = ' '
   PM1(28) = ' '
   PM1(29) = ' '
   PM1(30) = ' '
   PM1(31) = ' '
   PM1(32) = '8'
   PM1(33) = ':'
   PM1(34) = '1'
   PM1(35) = '7'
   PM1(36) = ' '
   PM1(37) = 'A'
   PM1(38) = 'M'
   PM1(39) = '0'
   PM1(40) = '/'
   PM1(41) = '0'
   PM1(42) = '0'
   PM1(43) = '/'
   PM1(44) = '0'
   PM1(45) = '0'
   PM1(46) = ' '
   PM1(47) = ' '
   PM1(48) = ' '
   PM1(49) = ' '
   PM1(50) = ' '
   PM1(51) = ' '
   PM1(52) = ' '
   PM1(53) = ' '
   PM1(54) = ' '
   PM1(55) = ' '
   PM1(56) = ' '
   PM1(57) = 'Y'
   PM1(58) = ' '
   PM1(59) = '2'
   PM1(60) = '0'
   PM1(61) = '0'
   PM1(62) = '0'
   PM1(63) = '0'
   PM1(64) = '0'
   PM1(65) = '0'
   PM1(66) = '0'
   PM1(67) = '0'
   PM1(68) = '7'
   PM1(69) = '3'
   PM1(70) = '0'
   PM1(71) = '4'
   PM1(72) = '0'
   PM1(73) = '9'
   PM1(74) = ' '
   PM1(75) = ' '
   PM1(76) = ' '
   PM1(77) = ' '
   PM1(78) = ' '
   PM1(79) = ' '
   PM1(80) = ' '
   PM1(81) = ' '
   PM1(82) = ' '
   PM1(83) = ' '
   PM1(84) = ' '
   PM1(85) = ' '
   PM1(86) = ' '
   PM1(87) = ' '
   PM1(88) = 'C'
   PM1(89) = 'H'
   PM1(90) = 'A'
   PM1(91) = 'I'
   PM1(92) = 'N'
   PM1(93) = ' '
   PM1(94) = 'N'
   PM1(95) = 'O'
   PM1(96) = ' '
   PM1(97- 256) = ' '


   EVAL pm2

   PM2(1) = ' '
   PM2(2) = ' '
   PM2(3) = ' '
   PM2(4) = ' '
   PM2(5) = ' '
   PM2(6) = ' '
   PM2(7) = ' '
   PM2(8) = ' '
   PM2(9) = ' '
   PM2(10) = ' '
   PM2(11) = ' '
   PM2(12) = ' '
   PM2(13) = ' '
   PM2(14) = ' '
   PM2(15) = ' '
   PM2(16) = ' '
   PM2(17) = ' '
   PM2(18) = ' '
   PM2(19) = ' '
   PM2(20) = ' '
   PM2(21) = ' '
   PM2(22) = ' '
   PM2(23) = ' '
   PM2(24) = ' '
   PM2(25) = ' '
   PM2(26) = ' '
   PM2(27) = ' '
   PM2(28) = ' '
   PM2(29) = ' '
   PM2(30) = ' '
   PM2(31) = ' '
   PM2(32) = ' '
   PM2(33) = ' '
   PM2(34) = ' '
   PM2(35) = ' '
   PM2(36) = ' '
   PM2(37) = ' '
   PM2(38) = ' '
   PM2(39) = ' '
   PM2(40) = ' '
   PM2(41) = ' '
   PM2(42) = ' '
   PM2(43) = ' '
   PM2(44) = ' '
   PM2(45) = ' '
   PM2(46) = ' '
   PM2(47) = ' '
   PM2(48) = ' '
   PM2(49) = ' '
   PM2(50) = ' '
   PM2(51) = ' '
   PM2(52) = ' '
   PM2(53) = ' '
   PM2(54) = ' '
   PM2(55) = 'C'
   PM2(56) = 'H'
   PM2(57) = 'A'
   PM2(58) = 'I'
   PM2(59) = 'N'
   PM2(60) = ' '
   PM2(61) = 'N'
   PM2(62) = 'O'
   PM2(63) = ' '
   PM2(64) = ' '
   PM2(65) = ' '
   PM2(66) = ' '
   PM2(67) = ' '
   PM2(68) = ' '
   PM2(69) = ' '
   PM2(70) = ' '
   PM2(71) = ' '
   PM2(72) = ' '
   PM2(73) = ' '
   PM2(74) = ' '
   PM2(75) = ' '
   PM2(76) = ' '
   PM2(77) = ' '
   PM2(78) = ' '
   PM2(79) = ' '
   PM2(80) = ' '
   PM2(81) = ' '
   PM2(82) = ' '
   PM2(83) = ' '
   PM2(84) = ' '
   PM2(85) = ' '
   PM2(86) = ' '
   PM2(87) = ' '
   PM2(88) = ' '
   PM2(89) = ' '
   PM2(90) = ' '
   PM2(91) = ' '
   PM2(92) = ' '
   PM2(93) = ' '
   PM2(94) = ' '
   PM2(95) = ' '
   PM2(96) = ' '
   PM2(97- 256) = ' '


   EVAL pa

   PA =
             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '                SETTIM           000000304093  Tuesday      '
       61   '    8:17 AM0/00/00           Y 200000000730409              '
      121   'CHAIN NO'

   EVAL prm1

   PRM1 =
             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '000000304093  Tuesday          8:17 AM0/00/00           Y 20'
       61   '0000000730409              CHAIN NO                         '
      121   '                                                            '
      181   '                                                            '
      241   '                '

   EVAL prm2

   PRM2 =
             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '17 AM0/00/00           Y 200000000730409              CHAIN '
       61   'NO                                                          '
      121   '                                                            '
      181   '                                                            '
      241   '                '


   * Values of fields at after line 74.

   EVAL prm1

   EVAL pa

   PA =
             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '                SETTIM           000000304093  Tuesday      '
       61   '    8:                                                      '
      121   'CHAIN NO'


   PRM1 =
             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '000000304093  Tuesday          8:                           '
       61   '                           CHAIN NO                         '
      121   '                                                            '
      181   '                                                            '
      241   '                '

   EVAL prm2

   PRM2 =
             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '                                                      CHAIN '
       61   'NO                                                          '
      121   '                                                            '
      181   '                                                            '
      241   '                '


   Why is PRM1 updated when a movea instruction for PRM2 occurs?
   Position 34 to 87 are blanked out.  Why?



---------------------------------
John Jones
IBM AS/400 Lansa Developer
Pacific Information Systems - An IBM Premier Business Partner
Cell 503-784-4422
Fax 503-244-5300
"WE KNOW TECHNOLOGY"
johnj@pacinfosys.com
---------------------------------



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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-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.