macro Attribute Defining Item/BASIC: Syntax, up.macro Definition/Update Processor, macro Attribute Defining Item/BASIC: Syntax

macro

Command macro Attribute Defining Item/BASIC: Syntax
Applicable release versions: AP
Category BASIC: Syntax (110)
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.
Syntax
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
Purpose
Related list.processor
up.g
access.default.attribute.items
up.options
zooming
output-macro
up.options.i
access.id-prompt
up.macro

up.macro

Command up.macro Definition/Update Processor
Applicable release versions: AP
Category Update Processor (113)
Description Identifies the default attribute-defining items used for input and output processing of the item.

Output from access verbs use the the "output-macro" attribute-defining item to identify the default attribute-defining items to be used for output display. If the "output-macro" is null, then the "macro" attribute-defining item is used.

In an attribute-defining item, with a remote index to another file, the attribute-defining items listed in the "macro" attribute are automatically passed to UP when "zooming" to the remote file. If no list of attribute-defining items exists in the "macro" attribute, the "default" macro in the target "remote" file is automatically used. In order to 'zoom' (<ctrl>+g) to another file, the "input" attribute-defining item must be defined with either an index or a translate to the remote file.
Syntax
Options
Example
The following example of an attribute-defining item shows the default 
attributes to be used by the Update processor when 'zooming' to 
another file. 

ud filename vendor  
dictionary-code       a
modulo                1
structure
retrieval-lock 
update-lock
output-conversion
correlative           
attribute-type        l
input-conversion      ivendor;a1
macro                 vendor.name vendor.address vendor.zip (i
output-macro
output-conversion
description   

When in data entry mode on the "vendor" attribute of the specified 
filename, when <ctrl>+g is typed, UP 'zooms' to the vendor file 
and displays the attibutes 'vendor.name', 'vendor.address', 
and 'vendor.zip'.

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

If no attribute-defining items are defined, when <ctrl>+g is typed, UP 
will use the attributes defined on the macro attribute in the file-defining 
item of the 'vendor' file.
Purpose
Related pc.index.remote
pc.index.local
access.introduction
pc.index.fdi
input-conversion
output-macro
macro
up.g
zooming
up

macro

Command macro Attribute Defining Item/BASIC: Syntax
Applicable release versions: AP
Category BASIC: Syntax (110)
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.
Syntax
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
Purpose
Related list.processor
up.g
access.default.attribute.items
up.options
zooming
output-macro
up.options.i
access.id-prompt
up.macro