I'm trying to issue a command using QCMDEXC within an RPGLE program. The command will send an status email.
CLUNODE = NODES
The failed message is CPD0047 List or expression not valid for parameter SUBJECT. I am guessing it does not like the extra single quote in the Subject
I have the code as follows:
$Cmd = 'SNDSMTPEMM RCP((support@xxx.com)) +
SUBJECT('+ $clunode + ''': Subsystems are shutdown'') +
NOTE(''Subsystems are shutdown '')';
When I run the command, I get the command string is populated, but the command SNDSMTPEMM command fails. $clunode is an 8 character variable. I also tried to add %trimr($clunode) and that statement errored also
This is the populated string when running the program but the command fails.
....5...10...15...20...25...30...35...40...45...50 ...55...60
1 'SNDSMTPEMM RCP((support@xxx.com)) SUBJECT(NODES ': Sub'
61 'systems are shutdown') NOTE('Subsystems are shutdown ')'
121 ' '
181 ' '
Any thoughts would be appreciated.
CLUNODE = NODES
The failed message is CPD0047 List or expression not valid for parameter SUBJECT. I am guessing it does not like the extra single quote in the Subject
I have the code as follows:
$Cmd = 'SNDSMTPEMM RCP((support@xxx.com)) +
SUBJECT('+ $clunode + ''': Subsystems are shutdown'') +
NOTE(''Subsystems are shutdown '')';
When I run the command, I get the command string is populated, but the command SNDSMTPEMM command fails. $clunode is an 8 character variable. I also tried to add %trimr($clunode) and that statement errored also
This is the populated string when running the program but the command fails.
....5...10...15...20...25...30...35...40...45...50 ...55...60
1 'SNDSMTPEMM RCP((support@xxx.com)) SUBJECT(NODES ': Sub'
61 'systems are shutdown') NOTE('Subsystems are shutdown ')'
121 ' '
181 ' '
Any thoughts would be appreciated.
Comment