|
Hans, Glad it should work. Changing the input parameter would be the ideal fix, but this is used by every program we have. This would have a very big impact on our system and the timing is not right. I will try backing off our most recent PTFs and if that fails, I will try versioning this procedure. Fortunately we only have this particular situation in a few places. Would you have an APAR number? It is impossible to search on VARYING and OPDESC/*VARSIZE don't come up with any relevant hits. Thanks, David Morris >>> boldt@ca.ibm.com 12/29/99 07:36AM >>> David wrote: >A couple of years ago, I created some procedures that used operational >descriptors to retrieve the length of *VARSIZE parameters. These parameters >were also defined as CONST. Since VARYING length strings became available, >I have been using VARYING in most cases. I also found out that passing a >varying field to a procedure that received a *VARSIZE CONST parameter worked >just fine... at least I thought it was OK. I had a program receive an error that has not >been modified for some time. The error was caused because the operational >descriptor for the field said the length received was 32768, where the length of the >varying string passed was 1. The *VARSIZE field was defined as 2048, and the >caller was defined as 10 VARYING. The problem appears to be caused when the >field being passed is the return value of another procedure. Built-in and stand >alone fields do not appear to have any problems. > >Here is a snippet of code that represents the problem situation: > >D Proc1 PR 10a VARYING > >D Proc 2 PR >D Input 2048a OPTIONS(*VARSIZE) CONST > >C CALLP Proc2(Proc1) > >Should this work? The manual does not say otherwise, and as far as I can tell >it used to work. We did apply some RPG PTF a few days ago, but they do not >mention either OPDESC, or VARYING. It is possible that this has never worked >and CEEDOD has been returning a valid value by chance. Hi David! Yes, that should work. We are aware of some problems in this area and we're already working on an APAR fix. But probably the better approach would be to define the parameter "Input" as VARYING CONST. Cheers! Hans Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.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 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.