Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

MCH1210 on ChgVar

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MCH1210 on ChgVar

    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


  • #2
    After a few rounds of experimentation, I found that removing the %Trim() from around the &RcpList and the &RcpAddress on the ChgVar Value keyword allows the operation to work without generating the MCH1210. What's really odd is the build of the QCMDEXC variable a few operations later in the same program still has the %Trim() around some of its values in a ChgVar statement as I mentioned in my initial post and works fine even while I'm running my experiments on the address field.

    Comment

    Working...
    X