u01ad User Exit

User exit u01ad retrieves a value from an attribute of an item in a file. The next line of the Proc specifies the file information.

Syntax

u01ad

file.name item-ID attribute.ref code.number

Parameter(s)

file.name

Name of the file. If the file name is prefixed with an asterisk, the dictionary portion of the file is accessed.

item-ID

Item name.

attribute.ref

Attribute name (or number).

code.number

a

Outputs to the alternative output buffer.

p

Outputs to the primary input buffer.

s

Outputs to the current output buffer.

t

Outputs to the terminal.

v

Verifies that the file exists.

va

Verifies that the attribute exists.

Description

This function allows indirect references to values from the input and output buffers by using these special symbols:

%

Indicates the current input buffer value.

#

Indicates the current output buffer value.

 

NOTE

The same function can be performed with the correlative:

a0(tfile.reference;xn;;a/amc)

where file.reference is the name of the file, n is the n value to retrieve, and a/amc is the attribute-mark count to use.

Example(s)

Direct Reference

pq

u01ad control-file co.name 1 s

xcan’t find co.name or control.file

Reads attribute 1 of the item called co.name in the file named control-file and places it in the current output buffer.

Indirect Reference

pq

u01ad %2 %3 %4 p

xsomething went wrong...

d0

Reads the attribute number as defined in the fourth location of the input buffer, using the item-ID from the third location and the file name from the second location.

See Also

a (Algebraic) Processing Code, Proc Processor User Exits, u11ad User Exit, u21ad User Exit