Slide 1 -
Slide 1
Slide notes
This Tag is using a Template. Let us have a look at
the logic produced by the Tag Template, and then we will use the Macro wizard
to produce the same logic.
Slide 2 - Slide 2
Slide notes
This is the logic that the Tag Template is
producing.
Slide 3 - Slide 3
Slide notes
If we remove the Template, then we can enter the
Tag Macro itself.
Slide 4 - Slide 4
Slide notes
Slide 5 - Slide 5
Slide notes
We can choose a different Template now, but instead
we will choose to build our own Macro, because we want to use the Macro wizard
as an example.
Slide 6 - Slide 6
Slide notes
When we have already had a Template on a Tag and
then move to the Macro option, then the Macro inherits the logic that was
previously generated by the Tag Template. Therefore, we can 1st use the
Template and then make additional changes to the logic, if we want.
Slide 7 - Slide 7
Slide notes
In this case, our purpose is different. The Macro
wizard is available for editing logic, that is IF we ever want to get into the
logic at this level, and it can be used without ever using a Template on the
Tag, i.e. by building the logic from scratch. However, most Users will never
use this, and will only use the Template options that automatically generate
all the required Tag logic.
Slide 8 - Slide 8
Slide notes
We are now going to reproduce this logic by using
the Macro wizard. When using the Macro wizard one needs to understand a little
about the syntax used for these Macros, and
we can learn that from the syntax document. The point is that one needs
a plan, i.e. a logical sequence as to what is required to produce the answer
for the Tag. In this case, the logic gets the Date from the system, then
converts that into the Calendar Year only, and then this answer is placed on a
field that is 10 characters wide, and aligns it to the right.
Slide 9 - Slide 9
Slide notes
Slide 10 - Slide 10
Slide notes
We can enter the Macro wizard by typing 'w' and
pressing ENTER.
Slide 11 - Slide 11
Slide notes
From the options available here, we have to make a
choice as to the next command. The only option that can possibly give us the
Date is the 'Function' option.
Slide 12 - Slide 12
Slide notes
The next choice is 'Simple Assign'.
Slide 13 - Slide 13
Slide notes
The 'Assign To' variable will be the Current Tag
Main Value.
Slide 14 - Slide 14
Slide notes
The Variable that we want to retrieve is found at
'Common'.
Slide 15 - Slide 15
Slide notes
And it is the 'Date' that we are interested in.
Slide 16 - Slide 16
Slide notes
The 1st command is done. Now we need to perform a
Display Conversion on the Date.
Slide 17 - Slide 17
Slide notes
Slide 18 - Slide 18
Slide notes
The answer will be assigned to the Current Tag Main
Value, which is used as the final 'answer' for the Tag.
Slide 19 - Slide 19
Slide notes
The Input Data that we will use in this operation
is also at the Current Tag Main Value at the moment, because that's where we
put it when we retrieved the Date from the System Common.
Slide 20 - Slide 20
Slide notes
Slide 21 - Slide 21
Slide notes
And it's a common conversion type that we want to
perform.
Slide 22 - Slide 22
Slide notes
We are interested in the option that turns the Date
into a Year.
Slide 23 - Slide 23
Slide notes
Slide 24 - Slide 24
Slide notes
Slide 25 - Slide 25
Slide notes
Next, we need to place the answer on a field that
is 10 characters wide, and align it to
the right. For this, we use the PLACE command.
Slide 26 - Slide 26
Slide notes
Slide 27 - Slide 27
Slide notes
Slide 28 - Slide 28
Slide notes
Slide 29 - Slide 29
Slide notes
Slide 30 - Slide 30
Slide notes
And now our logic should be complete. Let's exit
the wizard and have a look.
Slide 31 - Slide 31
Slide notes
Slide 32 - Slide 32
Slide notes
The old logic on line 1 is a comment, and we did
not reproduce that. The 2nd line is reproduced in our new logic at line 7.
Slide 33 - Slide 33
Slide notes
Slide 34 - Slide 34
Slide notes
Line 3 is reproduced at line 8.
Slide 35 - Slide 35
Slide notes
Slide 36 - Slide 36
Slide notes
Slide 37 - Slide 37
Slide notes
Line 4 is a comment and not reproduced, while line
5 is reproduced at line 9.
Slide 38 - Slide 38
Slide notes
Slide 39 - Slide 39
Slide notes
The old line number 6 is a jumpout option that was
not really used in the logic and not required in our new logic. So we have
successfully reproduced the same logic as from the Template, but this time by
using the Macro wizard. We can now delete the old logic lines which we have
retained only for comparative purposes in this example.
Slide 40 - Slide 40
Slide notes
Slide 41 - Slide 41
Slide notes
Slide 42 - Slide 42
Slide notes
Slide 43 - Slide 43
Slide notes
Slide 44 - Slide 44
Slide notes
Slide 45 - Slide 45
Slide notes
Slide 46 - Slide 46
Slide notes
And that leaves us with proper logic that we have
constructed with the wizard.
Slide 47 - Slide 47
Slide notes
Again, we note that the vast majority of Users will
never use the wizard, because the Templates are quite comprehensive and
adequate for most Tag needs, and they generate the necessary logic
automatically. The wizard is only intended for those fundis who will choose to
delve deeply into DocWriter Tag Logic.
Slide 48 - Slide 48
Slide notes