Have you considered using RTVMSG? Used to use this technique to setup the
QRYSLT parameter of the OPNQRYF command .
Tweak your message to as needed to get the paramtere lengths and quotes
MSG('SQL STRING for my CL program.')
SECLVL('UPDATE TESTFILE SET LG_ERRMSG=''&1'' LG_ERPATH=''&2''
WHERE LG_DATE=&3 AND LG_TIME=&4 AND LG_ID=''&5''
AND LG_SEQ=''&6'' AND
FMT((*CHAR 7) (*CHAR 10) (*CHAR 10) (*CHAR 10) (*CHAR 10) (*CHAR
10) (*CHAR 10))
And to use the message your code would look like this:
This mailing list archive is Copyright 1997-2019 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