Stem variables returned by IMFEXEC MV GETDATAN


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

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

Variable name

Description

MV.0.0

total row count of all available data

MV.0

total column count

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#.@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 which is the combination of HDR1 and HDR2 based on the rules defined in the NEWNAMES(YES) keyword of the GETDATA command

This value can be used as needed for report headings to identify the data.

Note that 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

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 GETDATAN call.

Note that 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

contains a value that is the internal name of the data

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

Note that if a column has no internal DATANAME, a name will be 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

is created for each column in the requested data (refer to the description MV.col#.@DATANAME for an explanation of the term DATANAME)

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.

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

MV.col#.row#

contains the actual data returned from the GETDATAN 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 GETDATAN command again (without the REFRESH keyword) until a return code of 0 is received.

8

The requested data could not be retrieved. Examine the accompanying error messages for details. If NOMSG was specified on CONNECT, display the contents of LINE.xxxx.

12

The specified channel could not be found.

16

A syntax error was detected or invalid parameters were supplied.

20

An internal error was received.

28

A GETDATAN command was used on a channel that has already used a GETDATA command. This situation is not allowed.

Example

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

'IMFEXEC MainView CONNECT MYCHANNEL MSG'
'IMFEXEC MainView CONTEXT CHANNEL('MYCHANNEL')',
'PROD(PLEXMGR) WAIT(1)'
'IMFEXEC MainView 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 MainView GETDATAN CHANNEL('MYCHANNEL')' REFRESH
SAVE_RC = RC
IF SAVE_RC > 4 THEN LEAVE
REFRESH=''
DO IX=1 TO MV.0.0
'IMFEXEC MSG 'IX MV.1.IX MV.MV@NUMBER_TARGETS.IX       
END
END
'IMFEXEC MV RELEASE CHANNEL('MYCHANNEL')'

 

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

MainView AutoOPERATOR 8.2