Has anyone encountered a MCH1210 "Receiver value too small to hold result." when performing a ChgVar on a large character string? My program is using SNDSMTPEMM and we're using an in-house command to retrieve the email addresses from a file then this program formats them for the SNDSMTPEMM RCP parameter. We're currently on v7r1 and only 1 level down on Cume PTF's with all groups current as of November 2015. The code snippet follows below and I've used the technique for building other strings without receiving the error, QCMDEXC command strings for example. Though in those cases, I'm not using a loop but I do use %Trim() to add optional keywords and parameters conditionally. I've run the whole program through debug and can't get any insight on why that line throws the error. At the time of the error, &RcpList is blank while &RcpAddress is populated with the first address. DclVar(&pRecipient)Type(*Char)Len(10)
DclVar(&RcpAddress)Type(*Char)Len(100)
DclVar(&RcpList)Type(*Char)Len(30000)
DclVar(&RcpName)Type(*Char)Len(50)
DclVar(&RecipSeq#)Type(*Dec)Len(50)
DclVar(&LParen)Type(*Char)Len( 1) Value( '(' )
DclVar(&RParen)Type(*Char)Len( 1) Value( ')' )
DclVar(&SQuote)Type(*Char)Len( 1) Value( '''' )
Subr GetEmail
RtvEmailRtvId(&pRecipient)RtvSeqNo(&RecipSeq#)+
RcpName(&RcpName)+
RcpAddress(&RcpAddress)
MonMsgMsgId( Cpf0000 )Exec( RtnSubr RtnVal(-1))
IfCond(&RcpAddress*NE&Blanks)Then( +
ChgVarVar(&RcpList)Value(%Trim(&RcpList)*Bcat+
&LParen*Tcat &SQuote *Tcat +
%Trim(&RcpAddress) *Tcat &SQuote *Tcat&RParen) )
ElseCmd( RtnSubr RtnVal(-1))
EndSubr
DclVar(&RcpAddress)Type(*Char)Len(100)
DclVar(&RcpList)Type(*Char)Len(30000)
DclVar(&RcpName)Type(*Char)Len(50)
DclVar(&RecipSeq#)Type(*Dec)Len(50)
DclVar(&LParen)Type(*Char)Len( 1) Value( '(' )
DclVar(&RParen)Type(*Char)Len( 1) Value( ')' )
DclVar(&SQuote)Type(*Char)Len( 1) Value( '''' )
Subr GetEmail
RtvEmailRtvId(&pRecipient)RtvSeqNo(&RecipSeq#)+
RcpName(&RcpName)+
RcpAddress(&RcpAddress)
MonMsgMsgId( Cpf0000 )Exec( RtnSubr RtnVal(-1))
IfCond(&RcpAddress*NE&Blanks)Then( +
ChgVarVar(&RcpList)Value(%Trim(&RcpList)*Bcat+
&LParen*Tcat &SQuote *Tcat +
%Trim(&RcpAddress) *Tcat &SQuote *Tcat&RParen) )
ElseCmd( RtnSubr RtnVal(-1))
EndSubr
Comment