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



You need to add the VARY(*YES) value to the FREETREXT parm definition.
  PARM       KWD(FREETET) TYPE(*CHAR) LEN(5000) +  
               EXPR(*YES) VARY(*YES *INT2)         

The VARY(*YES) is all that's needed, but the *INT2 insures that you tell the
parm to use a 5i0 value for the length. Which is what VARYING fields in RPG
IV have in bytes one and two.
If that changes at some point, then VARY(*YES *INT4) would be necessary. But
today *INT4 would cause it to have the same type of problem you're seeing
now, but on the other end of the spectrum.


-Bob Cozzi
www.RPGxTools.com
If everything is under control, you are going too slow.
- Mario Andretti

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Basilio Merlino
Sent: Thursday, July 07, 2005 7:15 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: varying

   
 


   In an rpg program i have the follow definition

   


   D EmlMsgF         PR  =           &nb=p; 
   D  pr_Function         &n=sp;         4A 
   D  pr_FreeText         &n=sp;      5000A     varying</P=


   D EmlMsgF         PI  =           &nb=p; 
   D  pr_Function         &n=sp;         4A 
   D  pr_FreeText         &n=sp;      5000A     varying</P=


   I have the follow command definition

   


   CMD        PROMPT('E-mail simple mess=ge Function') 
               &nb=p;            =           &nb=p;            = 
   PARM       KWD(FUNCTION) TYPE(*CHAR) LEN(4) M=N(1) +
                PR=MPT('Function')         &nbsp=           
               &nb=p;            =           &nb=p;            = 
   PARM       KWD(FREETEXT) TYPE(*CHAR) LEN(5000= +    
                DF=(*NONE) SPCVAL((*NONE)) MIN(0) +     
                PR=MPT('Free Text')         &nbs=;          

   


   When the command call the rpg programm on the second variable i have inc
orrect data , if i pass "hello" on the varying variable i receive the
   value
   


   'llo" at position 1 and "he" at position 5001; the same problem happen i
f i call the program from a command line

   


   Any ideas ?

   


   Thanks

   


   Basilio

   


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.