macro

Attribute Defining Item/BASIC: Syntax, Releases: AP

References attribute 15 of the current item.

Description

references attribute 15 of a file or attribute-defining item.

For a file-defining item, the text in this field describes the default attribute name list to include in the update screen. For an attribute-defining item the text describes the default attribute name list when zooming to another item.

This attribute is used for input exclusively by the Update processor and has no effect on any other processor, except when there is not default attribute list on the output-macro attribute of the file-defining item. In this case, the 'macro' attribute dictates the default attributes to be used by the 'list' processor.

Options

* see 'options: Update Procesor'.

Example

The following example is a file-defining item with the default attributes to be
used by the Update processor:

:ud filename filename
dictionary-code a
modulo 67
structure
retrieval-lock
update-lock
output-conversion
correlative id100
attribute-type l
input-conversion
macro name address zip phone (i
output-macro
output-conversion
description

In this example, since there are no attribute-defining items specified on the
output-conversion field, the default attributes used by the LIST processor is
determined by the 'macro' attribute.

The 'i' option displays the item-id of the file along with the
specfied attributes.

It is possible to have 'multiple-views' of the data when UP is
invoked. This is accomplished by having a multi-valued list of
attribute-defining items defined on the macro dictionary. To select which
'view' of the data to use, a Pick/BASIC subroutine must be called
from input-conversion of the file-defining item. In this subroutine, the
'access' function is used to pass the position value to UP.

The following example shows a file-defining item with a multi-value list of
attribute-defining items. A sample Pick/BASIC subroutine is included, showing
exactly how to select the proper 'view' for UP.

:ud filename filename
dictionary-code a
modulo 67
structure
retrieval-lock
update-lock
output-conversion
correlative id100
attribute-type l
input-conversion call select.view
macro name address zip phone (i
name phone comments
name phone fax address zip (i
output-macro
output-conversion
description

:u bp select.view
01 subroutine select.view(item)
02 item = access(3)
03 execute 'who' capturing who
04 user = field(who,' ',2)
05 if user = 'joe' then
06 access(18) = 2
07 end else
08 access(18) = 1
09 end

In this example, if the user is 'joe', the view displayed is :
name phone comments

See Also

Command Name Type Description
list.processor Definition Access output-processing facility.
up.g Command Positions the cursor to the end of the paragraph or 'zooms' to related file.
access.default.attribute.items Introductory The consecutive attribute-defining items starting with 1.
up.options Definition Standard UP options: i, c, l and s.
zooming Definition Zooms through a doorway to another file.
output-macro Attribute Defining Item References attribute 16 of current item.
up.options.i Option Includes item-id in Update processor.
access.id-prompt Modifier Includes item-id in Update processor.
up.macro Definition Identifies the default attribute-defining items used for input and output processing of the item.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.