Joel (pemautomic.com) provided me with the fix.
IF - comparisons are case sensitive and do not support wildcards. What should work for your scenario is STR_MATCH:
STR_MATCH compares two strings and supports wildcards (is, however, still case sensitive). It will return "Y" on match and "N" on no-match.
This would turn your script line:
:IF &STATUS# <> "&TODAY_CCYYMMD#*_CAMT053_FULL
Into this:
:IF STR_MATCH(&STATUS#, "&TODAY_CCYYMMD#*_CAMT053_FULL") EQ "N"
Original Message:
Sent: May 29, 2025 12:47 PM
From: Rick Murray
Subject: using wildcards in an "if" statement
I am attempting to use a wildcard for "164100" in the following, but not having any success. When I leave in 164100 it work fine. When I use a wildcard there, it doesnt match
Have tried * and ??????
Any suggestions on what I am missing
:IF &STATUS# <> "&TODAY_CCYYMMD#164100_CAMT053_FULL"
:SET &SENDADDR1="rmurray@memyselfandi.org"
:SET &CCADDR1=""
:SET &SUBJECT="Foconis - CAMT file not available today"
:SET &EMAIL_BODY="Foconis - CAMT file not available today - &STATUS#"
:SET &OUT = SEND_MAIL('&SENDADDR1','&CCADDR1','&SUBJECT','&EMAIL_BODY',)
:PUT_VAR VARA.CLIENT.LEVEL,'FOCONISCAMT',"N"
:ELSE
:PUT_VAR VARA.CLIENT.LEVEL,'FOCONISCAMT',"Y"
:ENDIF