How to use a runtime variable inside a fix statement in MAXL script
I am using a variable from a batch script to Maxl script. The variable is projectID. inside the MAXL I need to clear data for this project. here is the calc statement that I use to clear data:
execute calculation 'FIX("Account","Forecast","Input", $projectid) ClearData 2019 ; ENDFIX 'on 'AppName'.'DBName' .
ERROR - 1012150 - Environment variable [projectid] doesn't exist..
when I run the script with this statement I get invalid Object. if put Quote around it like:
execute calculation 'FIX("Account","Forecast","Input", '$projectid') ClearData 2019 ; ENDFIX 'on 'AppName'.'DBName' .
it recognize the projectID but throws the syntax error:
MAXL> execute calculation 'FIX("Account","Forecast","Input", '002711') ClearData 2019 ; ENDFIX 'on 'AppName'.'DBName' ;