DO SET %%SUBSTR how to

Everything about Control-M Server installation or setup.
Post Reply
jtraylor
Nouveau
Nouveau
Posts: 2
Joined: 17 Feb 2016 11:52

DO SET %%SUBSTR how to

Post by jtraylor » 18 Feb 2016 2:24

Hello.

I'm building a NOTOK email message and was trying to format the %%TIME with colons. So I thought the way would be to precede the DO MAIL with a DO SET to a local variable. The expression has a blank and so appears to be a need to quote or otherwise delineate the expression.

%%0=%%SUBSTR %%TIME 1 2

I haven't found any obvious examples to work from.

Any way to do this?

Thank you kindly.

Cheers

john

jtraylor
Nouveau
Nouveau
Posts: 2
Joined: 17 Feb 2016 11:52

Re: DO SET %%SUBSTR how to

Post by jtraylor » 18 Feb 2016 10:47

Ah, so that's what %%BLANK is for. So:

%%0 = %%SUBSTR %%TIME 1 2

Becomes:

%%B=%%BLANK
%%0=%%SUBSTR%%.%%B%%.%%TIME%%.%%B%%.1%%.%%B%%.2

What a silly way to do this. CTO handles it much better. So either it would be nice to have a DO RULE or the same variable substitution rules. Probably both.

Post Reply