This form provides an easy way to build data lists for PRINT and similar statements, and conditions for WHERE, IF, etc, and $Case(?) in conversion spreadsheets. It is displayed when Jazz processes a “?”, for example if your program contains “PRINT ?;”, or when you click the workbench’s [Show Data] button. Jazz will attempt to initiate this form in the appropriate mode, but you can toggle the mode by checking/unchecking the Mode checkbox. In Help Mode it is also used to display field properties.
In DataList (or normal) mode the form looks like this, showing a list of the objects defined within your program. By clicking a [+] you can expand the node to see the next level of objects.
Click on an object and a reference is put into Output. Here I expanded FR, and clicked Region, and then Name. Jazz has created a data list suitable for statements like PRINT, in which the references are separated by commas.
You can click a record or group name, in which case a generic reference is created. Here I clicked FR: -
When we have selected all the fields or groups click [Finish] and this output will replace the ? in our program. We can click [Clear] to clear the Output and start again, or we can click [Cancel] to close the form and leave the ? in the program. We can also edit the output, and any changes we make will be returned to our program when we click [Finish].
Condition mode is designed to help us write conditions, as in IF statements, WHERE clauses, and $Case(?) lines in conversion spreadsheets. Although it works in essentially the same way as DataList mode, there are two changes: -
· Firstly, we may see another level of detail. With the data above displayed in Condition Mode fields defined as BOOLEAN, or with CODES or CONDITIONS options, will be with “=”. Click any such field and you’ll see the possible values that this field can have. Select a value and instead of simply a field reference Jazz creates a condition: -
ORG was defined
ORG PIC '9(03)' CODES(000:HEADER, 999:TRAILER),
· If we select several values then Jazz separates them with | (= OR), instead of a comma. For example, here we’ve clicked two of the AFF2 values: -
This created a condition CondTs2.AFF2=MC-GOLD-CR|CondTs2.AFF2=MC-BUSINESS-CR
As in
DataList mode you can click on a field name, whether it is a name with values
like AFF2 or a bare name like W.X. If
you click such a name the field reference is put into the output: it is up to
you to write the rest of the condition.
Because you
can edit the output before it is sent back to the program you can easily change
| (OR) to & (AND), use conditions other than =, and insert parentheses to
manage conditional logic. For example, I
created this condition: -
CondTs2.ORG=HEADER & W.X>10
by
1.
Clicked
value CondTs2.Org.HEADER. This gave a
condition CondTs2.ORG=HEADER
2.
Clicked
value W.X. This added “|W.X” to the
condition: CondTs2.ORG=HEADER|W.X
3.
Edited
the condition, changing | to &, and adding >10 at the end
You might
want to create a condition from two fields, for example SalesThisMonth =
SalesYTD: -
If we click
on SalesThisMonth and then SalesYTD the output will be created with the
separator character – “,” for data mode and “|” for condition mode – between
the fields. This can be edited to “=”.
If we type
“AND” or “OR” at the end of the Output this will be changed to “&” or
“|”. This only applies if these are
typed at the right hand end of the text.
Imagine that you’re working on a Jazz program and you need to know the properties of an object. Help Mode provides the answer.
· Click [Show Data] to open this form, then check Help Mode. Or
· Use the Jazz Workbench menu Help/Data, which opens Show Data with Help mode checked. Or
· If you’ve checked EnableDataHelpFromProgram, right-click a field reference in your program.
Now, instead of creating some output to insert into your program, the properties of the selected object are displayed. Here I clicked [Show Data], checked Help Mode, then clicked on IN1.Region