z/OS ISPF Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


LMQUERY—give a dialog information about a data set

z/OS ISPF Services Guide
SC19-3626-00

The LMQUERY service returns values specified for the LMINIT service parameters that are associated with a given data ID. In this way, LMQUERY provides the dialog with selected information about a data set by showing how the LMINIT parameters were set up when the data ID of that data set was generated.

The service sets the contents of the variables named with the information being requested. Blanks are returned in a given variable if no value applies. For example, if DATASET was not used in LMINIT, DATASET in LMQUERY would have blanks.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--LMQUERY--DATAID(data-id)--+-------------------+----->
                                      '-PROJECT(proj-var)-'   

>--+--------------------+--+--------------------+--------------->
   '-GROUP1(group1-var)-'  '-GROUP2(group2-var)-'   

>--+--------------------+--+--------------------+--------------->
   '-GROUP3(group3-var)-'  '-GROUP4(group4-var)-'   

>--+----------------+--+------------------+--------------------->
   '-TYPE(type-var)-'  '-DATASET(dsn-var)-'   

>--+-----------------+--+--------------------+------------------>
   '-DDNAME(ddn-var)-'  '-VOLUME(serial-var)-'   

>--+--------------+--+----------------+--+------------------+--->
   '-ENQ(enq-var)-'  '-OPEN(open-var)-'  '-LRECL(lrecl-var)-'   

>--+------------------+--+------------------+------------------->
   '-RECFM(recfm-var)-'  '-DSORG(dsorg-var)-'   

>--+------------------+--+------------------------+------------->
   '-ALIAS(alias-var)-'  '-PASSWORD(password-var)-'   

>--+----------------------+------------------------------------><
   '-OVOLUME(ovolume-var)-'   

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('LMQUERYb'--,data-id--,-+-proj-var-+--------->
                                           '-'b'------'   

>--,-+-group1-var-+--,-+-group2-var-+--,-+-group3-var-+--------->
     '-'b'--------'    '-'b'--------'    '-'b'--------'   

>--,-+-group4-var-+--,-+-type-var-+--,-+-dsn-var-+-------------->
     '-'b'--------'    '-'b'------'    '-'b'-----'   

>--,-+-ddn-var-+--,-+-serial-var-+--,-+-enq-var-+--------------->
     '-'b'-----'    '-'b'--------'    '-'b'-----'   

>--,-+-open-var-+--,-+-lrecl-var-+--,-+-recfm-var-+------------->
     '-'b'------'    '-'b'-------'    '-'b'-------'   

>--,-+-dsorg-var-+--,-+-alias-var-+--,-+-password-var-+--------->
     '-'b'-------'    '-'b'-------'    '-'b'----------'   

>--,-+-ovolume-var-+-);----------------------------------------><
     '-'b'---------'      

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPEXEC--(buf-len,--buffer);--------------------------><

Parameters

data-id
The data ID associated with the data set for which information is being requested. The data ID has been generated by the LMINIT service. The maximum length of this parameter is 8 characters.
project-var
The name of an 8-character variable into which the value of the PROJECT parameter specified on the LMINIT service will be placed.
group1-var
The name of an 8-character variable into which the value of the GROUP1 parameter specified on the LMINIT service will be placed.
group2-var
The name of an 8-character variable into which the value of the GROUP2 parameter specified on the LMINIT service will be placed.
group3-var
The name of an 8-character variable into which the value of the GROUP3 parameter specified on the LMINIT service will be placed.
group4-var
The name of an 8-character variable into which the value of the GROUP4 parameter specified on the LMINIT service will be placed.
type-var
The name of an 8-character variable into which the value of the TYPE parameter specified on the LMINIT service will be placed.
dataset-var
The name of a 46-character variable into which the value of the DATASET parameter specified on the LMINIT service will be placed.
ddname-var
The name of an 8-character variable into which the value of the DDNAME to which the data set has been allocated will be placed. If a DDNAME was specified on the LMINIT service, it will be returned. If no DDNAME was specified, the DDNAME generated by ISPF will be returned.
volume-var
The name of a 6-character variable into which the value of the VOLUME parameter specified on the LMINIT service will be placed.
enq-var
The name of a 5-character variable into which the value of the ENQ parameter specified on the LMINIT service will be placed.
open-var
The name of an 8-character variable into which an indicator will be placed to indicate whether the data set was opened for INPUT, OUTPUT, or UPDATE. If no LMOPEN has been done, blanks will be returned.
lrecl-var
The name of an 8-character variable into which the character representation of the logical record length will be placed. If no LMOPEN has been done, blanks will be returned.
recfm-var
The name of a 4-character variable into which the record format will be placed. If no LMOPEN has been done, blanks will be returned. These characters may appear in the record format value:
F
Fixed-length records
V
Variable-length records
U
Undefined-length records
B
Blocked records
T
Track overflow
M
Machine control characters
A
ANSI control characters
dsorg-var
The name of a 2-character variable into which the data set organization (PO or PS) will be placed.
alias-var
The name of a 1-character variable into which an indicator will be placed to indicate whether the data set name originally specified was an alias name. Values of Y or N will be returned.
password-var
The name of an 8-character variable into which the value of the PASSWORD parameter specified on the LMINIT service will be placed.
ovolume-var
The name of an 8-character variable into which the volume on which the data set resides will be placed. This variable will have a value even if no VOLUME parameter was specified on the LMINIT service call.
buf-len
A fullword fixed binary integer containing the length of the buffer parameter.
buffer
A buffer containing the name of the service and its parameters in the same form as they would appear in an ISPEXEC invocation for a command invocation.

Blanks are returned in any variable for which there is no applicable value.

Return codes

These return codes are possible:
 0
Normal completion.
 4
No applicable information available for a specified keyword; blanks are returned.
10
No data set is associated with the given data ID; that is, LMINIT has not been completed.
16
Truncation or translation error in accessing dialog variables.
20
Severe error; unable to continue.

Example

This example invokes the LMQUERY service to provide information about the ISPF library associated with the data ID in variable DDVAR. The data ID is created by using the LMINIT service with an ISPF library name. They use these variables:
PRJV
Highest-level qualifier of the libraries.
GRP1V, GRP2V, GRP3V, and GRP4V
Second-level qualifiers of the libraries.
TYPEV
Third-level qualifier of the libraries.

Command invocation

ISPEXEC LMQUERY DATAID(&DDVAR) PROJECT(PRJV) GROUP1(GRP1V) +
                GROUP2(GRP2V) GROUP3(GRP3V) GROUP4(GRP4V)  +
                TYPE(TYPEV)

Call invocation

CALL ISPLINK('LMQUERY ',DDVAR,'PRJV ','GRP1V ','GRP2V ',
                       'GRP3V ','GRP4V ','TYPEV ');

OR
 
Set the program variable BUFFER to contain:
BUFFER = 'LMQUERY DATAID(&DDVAR) PROJECT(PRJV) GROUP1(GRP1V)
                 GROUP2(GRP2V) GROUP3(GRP3V) GROUP4(GRP4V)
                 TYPE(TYPEV)';
Set the program variable BUFLEN to the length of the variable BUFFER. Issue the command:
CALL ISPEXEC (BUFLEN, BUFFER);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014