That fixed the problem Jason. Your parentheses correction worked. Thanks again for all your support. Have a good day as I will now.
Jason,
The last part of the file that I need to update with the CM parameter is the within the file which was created with the line below…
appendfile Title: {“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}
Here is the parameters
parameter “tstamp” = "{(month of it as two digits & day_of_month of it as two digits & year of it as string) of date (local time zone) of now }"
parameter “cname” = “{computer name}”
//parameter “Title” = {“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”} this line gets error Command failed (parameter add syntax) parameter “Title” = CIP-010-R1.1 Windows Baseline.ITEMSERVER.02082016 (action:3907) which if I append out as shown and
createfile until EOF
//CM:{parameter “CM” of action}
Title: {“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}
{concatenation “%0d%0a” of lines whose (it does not start with “Title:”) of file “c:\deltafile.yesterday.txt”}
EOF
Command succeeded parameter “tstamp” = “02082016” (action:3908)
Command succeeded parameter “cname” = “ITEMSERVER” (action:3908)
Command succeeded delete __createfile (action:3908)
Command failed (Substitution failed while writing file) createfile until EOF (action:3908)
Creates createfile with no data
Jason,
I am editing the existing file with both new content CM and Title. You have fixed CM and now I am trying to add Title. This is the last edit.
The ‘Parameter’ syntax is quite strict in regards to the parentheses. Both the parameter Name and its Value require parentheses. You need to include quotes around the Relevance substitution you’re using for the value -
parameter "Title"="{"CIP-010-R1.1 Windows Baseline." & parameter "cname" & "." & parameter "tstamp"}"
It may help for illustration purposes to define the parameter in this equivalent way -
parameter "Title"="CIP-010-R1.1 Windows Baseline.{parameter "cname"}.{parameter "tstamp"}"
Jason thanks for your reply. I still don’t have it setup right.
I created this parameter which may be what you are not suggesting to do as I have tried this before.
parameter “Title” = “{“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}”
then
createfile until EOF
//CM:{parameter “CM” of action}
Title: {parameter “Title”}
{concatenation “%0d%0a” of lines whose (it does not start with “Title:”) of file “c:\deltafile.yesterday.txt”}
EOF
this creates the createfile with 0kb error message is " Command failed (Substitution failed while writing file) createfile until EOF (action:3910)"
these are the three parameters created for the Title
parameter “tstamp” = "{(month of it as two digits & day_of_month of it as two digits & year of it as string) of date (local time zone) of now }"
parameter “cname” = "{computer name}"
parameter “Title” = “{“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}”
What does this line give you in the Fixlet Debugger?
Q: concatenation "%0d%0a" of lines whose (it does not start with "Title:") of file "c:\deltafile.yesterday.txt"
Does the file exist?
Shows the content of the file , except for Title:" . The problem is writing to the createfile the content of the Title: as the file is created but blank.
createfile until EOF
//CM:{parameter “CM” of action}
Title: {parameter “Title”}
{concatenation “%0d%0a” of lines whose (it does not start with “Title:”) of file “c:\deltafile.yesterday.txt”}
EOF
Afraid I don’t understand what could be the problem. Something’s wrong with your Title parameter then.
Jason,
So below format of the action script is correct and I do not need to modify the Title: {parameter “Title” of action}? Of course I have tried that and no change. The issue is it is not writing to createfile. I will do some more testing if you can review this for me. I appreciate all that you have done that is for sure.
//CM:{parameter “CM” of action}
Title: {parameter “Title” of action}
Select content from script
parameter “tstamp” = "{(month of it as two digits & day_of_month of
it as two digits & year of it as string) of date (local time zone)
of now }"
parameter “cname” = "{computer name}"
parameter “Title” = “{“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}”
createfile until EOF
//CM:{parameter “CM” of action}
Title: {parameter “Title”}
{concatenation “%0d%0a” of lines whose (it does not start with “Title:”) of file “c:\deltafile.yesterday.txt”}
EOF
Jason
I tested the following and that works
Command succeeded parameter “tstamp” = “02092016” (action:3918)
Command succeeded parameter “cname” = “ITEMSERVER” (action:3918)
Command succeeded parameter “Title” = “CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016” (action:3918)
Command succeeded parameter “filename” = “C:\Program Files (x86)\BigFix Enterprise\BES Client\CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016.job” (action:3918)
Command succeeded delete “C:\Program Files (x86)\BigFix Enterprise\BES Client\CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016.job” (action:3918)
Command succeeded delete No ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\CustomSite_NERC_CIP_V5__appendfile’ exists to delete, no failure reported (action:3918)
Command succeeded delete No ‘C:\Program Files (x86)\BigFix Enterprise\BES Client__BESData\CustomSite_NERC_CIP_V5__createfile’ exists to delete, no failure reported (action:3918)
Command succeeded appendfile Title: {“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”} (action:3918)
Command succeeded (file created) appendfile Title: CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016 (action:3918)
Command succeeded appendfile Title: CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016 (action:3918)
Command succeeded move __appendfile “C:\Program Files (x86)\BigFix Enterprise\BES Client\CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016.job” (action:3918)
Command succeeded copy “C:\Program Files (x86)\BigFix Enterprise\BES Client\CIP-010-R1.1 Windows Baseline.ITEMSERVER.02092016.job” “c:\yesterday.txt” (action:3918)
so I am thinking its in the createfile and associated to the Title parameter as if i note that line out and run it with CM it works fine.
Jason
Thanks to you the problem is solved and now is working.
action parameter query “CM” with description “Please enter the Change Management Record Ticket Number you would like to add:” With default “”
parameter “tstamp” = “{(month of it as two digits & day_of_month of it as two digits & year of it as string) of date (local time zone) of now }”
parameter “cname” = “{computer name}”
parameter “Title” = “{“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}”
delete __appendfile
delete __createfile
// start a new __createfile
// Begin the new __createfile with the new CM parameter
// Conclude the new __createfile with every line from the original file that does not start with CM:
createfile until EOF
CM:{parameter “CM” of action}
Title: {“CIP-010-R1.1 Windows Baseline.” & parameter “cname” & “.” & parameter “tstamp”}
{concatenation “%0d%0a” of lines whose (it does not start with “Title:” and it does not start with “CM:”) of file “c:\deltafile.yesterday.txt”}
EOF
// Now delete the original file
delete “c:\deltafile.yesterday.txt”
//Replace the original file with the new file
move __createfile “c:\deltafile.yesterday.txt”
Thanks and this is solved.