Global Variable Attributes - UDM


The following table lists the attributes that can be used with the following types of UDM global variables:

  • All variables (user-defined or built-in)
  • Specific built-in variables
  • Logical Name built-in variables
     

Variable

Attribute

Attribute Description

(all)

exists

Expands to yes if a variable with that name exists at any scope; it expands to no if no variable with that name exists.

(all)

length

Expands to the length of the variable's value.

_date

day

Resolves to the day of the week.

_date

month

Resolves to the current month.

_date

dd

Resolves to a two-digit day of the month.

_date

ddd

Resolves to the Julian day.

_date

mm

Resolves to the two-digit month of the year.

_date

yy

Prints the two-digit year.

_date

ww

Resolves to the two-digit current week of the year.
 
(The value of ww is zero-based, not one-based. That is, the first week of the year is 0, the second week is 1, the third week is 2, and so on.)

_date

yyyy

Resolves to the four-digit year.

_file

type

Type of file contained in the file variable: file, directory (also used for PDSs under z/OS), or unknown.
 
type also has meaning in a forfiles statement under IBM i in the LIB file system:

  • If the value of _file.type is directory, the file type is a Physical file.
  • If the value of _file.type is file, the file type is a Save file.

_lastrc

message

Human-readable string indicating what happened with the last executed statement.

  • If a command could not be executed or had improper values, the value of _lastrc.message is ERROR.
  • If a command successfully executed, the value of _lastrc.message is either SUCCESS or some other message (depending upon the command).

_lastrc

result

Integer value that indicates the result of the last command executed.
 
The meaning of this value depends on the command. Unless otherwise stated:

  • -1 indicates failure.
  • 0 or a positive value indicates success.

_time

hh

Resolves to the two-digit hour (24-hour time).

_time

mm

Resolves to the two-digit minute.

_time

ss

Number of seconds that have elapsed since the current minute.

_time

hs

Resolves to the number of hundredths of a second that have elapsed since the last second.

(logical name)

host

Contains the host name of the transfer server.

(logical name)

port

Holds the port used to connect to the transfer server over.

(logical name)

user

Contains the userid used to sign into the transfer server.

 

For an explanation of how these attributes are used in the variables, see Universal Data Mover Variables.