|
Hi Barbara, Have things changed, or do I get old ? I guess I once tested MOVEL on a VARYING field, and got the result that it also overwrote the first two bytes containing the length of the VARYING field ? Has this ever been the case, or is my memory really failing ? Anyway, even like it is currently, I find it a dangerous construction as one doesn't really know if the length of the data to MOVE will be the same as the current length of the VARYING field (unless one anticipates such behavior... but I consider that as "to be avoided implicit behavior") I also encountered another issue that seems to be running fine now ? In the past when I was doing a %Scan and the search argument was bigger than the actual VARYING string, the program crashed. If I now try this... everything goes fine (and it returns 0... as it should be in my opinion). Again, am I getting old ? Kind regards, Paul -----Original Message----- From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com] Sent: 06 March, 2002 18:12 To: rpg400-l@midrange.com Subject: RE: Strange behavior w/%editc() >Date: Wed, 06 Mar 2002 09:31:00 -0500 >From: "Nicolay, Paul" <paul_nicolay@merck.com> > >MOVEL doesn't work on VARYING fields, hence I wouldn't even think about >using MOVE on them (while it might indeed still work). Paul, MOVE and MOVEL work on VARYING fields. They behave exactly the same as if the varying field was a fixed-length field of the current length. If varfield has a current value of 'abcde', and you MOVEL '123' to it, it will have the value '123de'. If you MOVEL(P) '123', it will have the value '123 '. Using MOVE instead, you would get 'ab123' and ' 123'. Barbara Morris
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.