Information
Newer version of documentation BMC provides a newer version of the documentation for this version of the product. As a result, BMC no longer accepts comments in this space.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see bao8301.

Stem variables returned by IMFEXEC MVX GETDATA


The following stem variables are available to a REXX EXEC to process the data when using IMFEXEC MVX GETDATA.

The following table uses the default of the STEM() keyword, MV. When you specify a different value on the STEM() keyword, that value replaces the MV value in the following examples.

Variable name

Description

MV.ROW.0

Total row count of all available data

This variable will have a value of 0 if no data was available for the request.

MV.COL.0

Total column count

MV.STARTROW

Number of the first row of data returned by the call

MV.LOCALDATE

Local date of the data formatted as yyyy-dd-mm

MV.LOCALTIME

Local time of the data formatted as hh:mm:ss:th

MV.GMTDATE

Greenwich Mean Time (GMT) date of the data formatted as yyyy-dd-mm

MV.GMTTIME

Greenwich Mean Time time of the data formatted as hh:mm:ss:th

MV.col#.@WIDTH

Width of the data associated with the column number (col#)

For example, if the width of the data for column 5 were 15 characters, the variable named MV.5.@WIDTH would contain the value of 15.

MV.col#.@COLID

Column ID of the column from the view

This value represents the internal column ID (not the relative column number). Most views have column IDs that start with the letter A and continue through the alphabet. If more than 26 columns exist, the numbering continues with AA, BB, CC and AAA, BBB and so on. Use this variable with the relative column number to determine the internal column ID.

MV.col#.@HDR1

Value of the HDR1 column heading from the view

MV.col#.@HDR2

Value of the HDR2 column heading from the view

MV.col#.@VAR

Value of the composed column name that will be generated

Names are generated by concatenating the HDR1 and HDR2 values for a column, stripping invalid leading characters, and replacing all other invalid characters and blanks with an underscore (_) character. This generated name can then be used as the variable name to reference the column of data. This value can be used as needed for report headings to identify the data.

Warning

Note

If a column has no heading information, a name is generated in the form of @NOLABELnnnn, where nnnn is the column number. For example, @NOLABEL6 is generated for column 6 of a view if that column has no heading information.

MV@colname

Value of the variable in this format is created for each column in the requested data

This variable contains the column number associated with the column name.

In the variable format shown, colName in substituted with the actual column name generated by the GETDATA call.

Warning

Note

Column names are stored in the MV.col#.@VAR variable. For example, if the column name of column 7 is JOB_CPU, the MV@JOB_CPU variable contains a value of 7 and variable MV.7.@VAR contains JOB_CPU.

MV.col#.@DATANAME

Internal name of the data

The term DATANAME refers to the BMC AMI Ops view's internal element name that is used to identify the data. If you are very familiar with the BMC AMI Ops view that you are referencing, you might find this name preferable. This name is not likely to change between releases of the referenced BMC AMI Ops view.

Warning

Note

If a column has no internal DATANAME, a name is generated in the form of @NODATANnnnn, where nnnn is the column number. For example, @NODATAN6 is generated for column 6 of a view if that column has no internal DATANAME.

MV@dataname

Value for each column in the requested data

For an explanation of the term DATANAME, see the description MV.col#.@DATANAME in this table.

This variable contains the column number associated with the DATANAME column. In the variable format shown, dataname is substituted with the internal DATANAME of the column’s data.

Warning

Note

Dataname values are stored in the MV.col#.@DATANAME variable. For example, if the internal DATANAME of column 7 of the data is CFGCFNM, the MV@CFGCFNM variable contains a value of 7 and variable MV.7.@DATANAME contains CFGCFNM.

You can use this variable to locate a data element without regarding the column that the view displays it in. This capability is very helpful for writing EXECs that can continue to work even if the data is reorganized in the view.

MV.col#.row#

Data returned from the GETDATA command

The values col# and row# are substituted with a numeric value to reference the column and row of data desired. For example, MV.5.6 refers to data in column 5 of row 6.

Condition codes are listed in the following table.

Value

Description

0

All of the requested data was retrieved successfully.

4

Data rows up to the number specified by the COUNT() keyword (or by default) have been returned but more data exists. The additional data can be retrieved by issuing the GETDATA command again (without the REFRESH keyword) until a return code of 0 is received.

8

The requested data could not be retrieved or is not available. Examine the accompanying error messages for details.

Warning

Note

If NOMSG is specified on the IMFEXEC MVX CONNECT command, this return code will not be produced. If no data was available, specifying NOMSG results in return code 0, and the value of MV.ROW.0 is 0.

12

The specified channel could not be found.

16

A syntax error was detected or invalid parameters were supplied.

20

Due to an internal error, a required variable could not be built.

24

Due to an internal error, expected data is missing in the response packet.

28

Due to an internal error, a read or write failed on the socket.

32

Due to an internal error, a program EMMVBRNM has failed.

Example

This example shows an EXEC that retrieves data from BMC AMI Ops PLEX Manager's PLEXAREA view by using a channel variable named MYCHANNEL. For all rows, the example prints column 1 by using an absolute reference (MV.1.IX); it prints column 2 by using the variable named for the column that contains the actual column number. All output is written to the BMC AMI Ops Automation Journal.

/* REXX */
'IMFEXEC MVX CONNECT MYCHANNEL MSG PORT(3940) HOST(LOCAL)'
'IMFEXEC MVX CONTEXT CHANNEL('MYCHANNEL')',
      'PROD(PLEXMGR) TGT(CAS1) WAIT(30)'
'IMFEXEC MVX VIEW CHANNEL('MYCHANNEL') VIEW(PLEXAREA)'
DROP REFRESH        /* insure specified on first call */
SAVE_RC = 4
'IMFEXEC MSG 'The PLEXAREA data follows:''
DO WHILE SAVE_RC = 4
'IMFEXEC MVX GETDATA CHANNEL('MYCHANNEL')' REFRESH
SAVE_RC = IMFCC
IF SAVE_RC > 4 THEN LEAVE
REFRESH=''
DO IX=1 TO MV.ROW.0
'IMFEXEC MSG 'IX MV.1.IX MV.MV@NUMBER_TARGETS.IX
END
END
'IMFEXEC MVX RELEASE CHANNEL('MYCHANNEL')'

Related topic

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Automation 8.3