|
To get around all those very nasty '''''' and getting the combo to work, create the search string in a variable like this:
dcl &sel *char len(22) value('*if txsuf *eq "xxxxx" ')
more clp stuff
chgvar var(%sst(&sel 16 5)) value(&var5)
Then your statement looks like this:
CPYF FROMFILE(VATTBL) TOFILE(*PRINT) + > INCREL((&sel))) >
Well, here is the example I am trying to get to work:
Dcl &Var5 *Char ( 5 ) Value( 'MI ') Dcl &A *Char ( 1 ) Value( '''' ) CPYF FROMFILE(VATTBL) TOFILE(*PRINT) + INCREL((*IF TXSUF *EQ ( &A *cat &Var5 *cat &A )))
TXSUF is a 5-byte alpha. Still getting the CPF2843 error. The job log shows:
700 - CPYF FROMFILE(AMFLIB/VATTBL) TOFILE(*PRINT) INCREL((*IF TXSUF *EQ '''MI '''))
CL dump shows:
Variable Type Length Value Value in Hexadecimal *...+....1 * . . . + . . . . 1 &A *CHAR 1 ''' 7D &VAR5 *CHAR 5 'MI ' D4C9404040
As an Amazon Associate we earn from qualifying purchases.
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.