Hello,
You have the letters p-S-P-L-N-B-R coded into your string, instead of
inserting the value of the variable named pSPLNBR into the string.
Hmmm.. maybe that's not a good enough explanation, since you basically
said that when you described the problem...
how do I explain this better?
When you put letters, numbers and other symbols inside quotes, it's
considered data to be inserted into the string. When it's outside the
quotes, it's considered to be a variable name. Does that make more sense?
For example:
D Hello s 10a
D myString1 s 100a
D myString2 s 100a
Hello = 'It''s a mad';
myString1 = 'Hello World';
myString2 = Hello + ' World';
myString1 will contain 'Hello World'.
myString2 will contain 'It's a mad World'
The difference is that in the first
So in your example, you had this:
CmdString = %Trimr(CmdString) +
'?PDF010 FILE(' + %Trimr(SSplfName) +
') JOB(' + %Trimr(SJObName) + ')' +
' SPUSR(' + %Trimr(SUserName) + ')' +
' SPJOB#(' + %Trimr(SJOb#) + ')' +
' SPLNBR(pSPLNBR) ' +
' PDFPATH(' + ''''+ %Trimr(spnetfdr)+ ''''+')' +
' PDFNAME(' + %Trimr(SSplfName) + ')';
To make that work properly, you need to take pSPLNBR out of the quotes.
So it looks more like this:
CmdString = %Trimr(CmdString) +
'?PDF010 FILE(' + %Trimr(SSplfName) +
') JOB(' + %Trimr(SJObName) + ')' +
' SPUSR(' + %Trimr(SUserName) + ')' +
' SPJOB#(' + %Trimr(SJOb#) + ')' +
' SPLNBR(' + %char(pSPLNBR) + ')' +
' PDFPATH(' + ''''+ %Trimr(spnetfdr)+ ''''+')' +
' PDFNAME(' + %Trimr(SSplfName) + ')';
Does that make sense?