I have seen this. It is one of the things that prompted me to request a HERE DOC syntax for loading RPG strings. Maybe now that we have fully free format, it is time to put that request into an RFE.
Mark Murphy
STAR BASE Consulting, Inc.
mmurphy@xxxxxxxxxxxxxxx
-----CRPence <crpbottle@xxxxxxxxx> wrote: ----- 
To: rpg400-l@xxxxxxxxxxxx
From: CRPence <crpbottle@xxxxxxxxx>
Date: 05/12/2016 05:32PM
Subject: Re: SQL Statement length
On 12-May-2016 15:45 -0500, Graves, Chuck wrote:
 On Thursday, May 12, 2016 4:03 PM Graves, Chuck wrote:
Is there a "trick" to programming a long complex (6000 character)
SQL statement in RPG?
We keep getting a "variable truncated" error message.
<<SNIP>> The error is on the compile. <<SNIP>>
   Seems likely the error is not with a variable, but with a /literal/ 
specification [being assigned to a variable], and thus one of:
   • QRG4173  30   Literal length exceeds maximum and is truncated at 
maximum.
   • RNF0269  20   Character literal is too long; literal truncated.
   One likely resolution is to define the statement as static instead of 
assigning the value to a variable.
   Another might be to concatenate multiple literals; i.e. instead of 
just one assignment such as
      stmt='one very long literal';
   use multiple statements with shorter literals:
      stmt='one';stmt+=' very';stmt+=' long';stmt+=' literal';
   Or as dlclark mentioned 
[
http://archive.midrange.com/rpg400-l/201605/msg00130.html], be sure 
that a statement that has been /beautified/ on successive lines does not 
include all of the white-space; i.e. choose the line-continuation that 
maintains a valid statement while excluding any extraneous blanks.
As an Amazon Associate we earn from qualifying purchases.