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


LMMADD—add a member to a data set

z/OS ISPF Services Guide
SC19-3626-00

The LMMADD service adds a member to the specified ISPF library or MVS™ partitioned data set. LMMADD then updates the data set directory with information about the member to be added. If the member already exists, the member name entry is not added. The LMINIT with either ENQ(SHRW) or ENQ(EXCLU), LMOPEN with OPTION(OUTPUT), and LMPUT services must be completed before LMMADD is used.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--LMMADD--DATAID(data-id)--MEMBER(member-name)-------->

>--+------------------+--+-------+--+----------------+---------><
   |        .-NO--.   |  '-NOENQ-'  |      .-NO--.   |   
   '-STATS(-+-YES-+-)-'             '-EXT(-+-YES-+-)-'   

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('LMMADDbb'--,data-id--,member-name----------->

     .-'NObbbbbb'-.                       
>--,-+-'b'--------+-)--,-+-'NOENQ'-+-);------------------------><
     '-'YESbbbbb'-'      '-'b'-----'      

or

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

Parameters

data-id
The data ID associated with the data set to which a member is being added. The data ID has been generated by the LMINIT service. The maximum length of this parameter is 8 characters.
member-name
The member name being added to the directory. The maximum length of this parameter is 8 characters.
YES|NO
Whether the user data area in the directory should be updated so that the statistics of the member are stored in the format used by ISPF Edit.

If you specify YES, and the data set is partitioned and does not have unformatted records (RECFM=U), the directory is updated with the member statistics. At least a valid creation date (ZLCDATE) and the date of last change (ZLMDATE) must be provided in the member statistics.

If you specify NO, statistics are not updated.

These dialog variables are used to pass statistical information from the dialog invoking the LMMADD service:
ZLVERS
Version number; a number from 1 to 99. If no value exists for this variable, ISPF sets the value to blanks.
ZLMOD
Modification level; a number from 0 to 99.
ZLCDATE
Creation date; a character value shown in your national format. If no value exists for this variable, ISPF sets the value to blanks.
ZLMDATE
Last change date; a character value shown in your national format. If no value exists for this variable, ISPF sets the value to blanks.
ZLMTIME
Last change time; a character value in the format hh:mm. ZLMTIME may also be specified as an 8-character field in the format hh:mm:ss. If the 6th character is not a colon, or if the 7th and 8th characters (ss) are not in the range '00' to '59', only the hour:minute specifications are used. The seconds value is set to the current time.
ZLMSEC
Seconds value of the last change time. This is a 2-character field.
Note: If the ZLMTIME variable does not contain a seconds value and ZLMSEC is not set, the seconds value is set to 00. If both ZLMTIME and ZLMSEC specify a seconds value, the value in ZLMSEC is used.
ZLCNORC
Current number of records; a number from 0 to 65 535. If no value exists for this variable, ISPF sets the value to blanks.
ZLINORC
Beginning number of records; a number from 0 to 65 535.
ZLMNORC
Number of changed records; a number from 0 to 65 535.
ZLUSER
User ID of the last user to change the given member; the user ID has a maximum length of 7 characters.
ZLC4DATE
Creation date in 4 character year format; a character variable shown in your national format. If no value exists for this variable, ISPF sets the value to blanks.
ZLM4DATE
Last modified date in 4 character year format; a character variable shown in your national format. If no value exists for this variable, ISPF sets the value to blanks.

The preceding variables are stored in the function pool and therefore become immediately available to command invocations. You cannot use the VGET service to retrieve these variables, since the VGET service accesses the shared and profile pools. Likewise, you cannot use the VPUT service to change these variables.

NOENQ
An optional parameter that specifies that ISPF should not issue its standard ENQ during the processing of this service. This standard ENQ consists of a major name of SPFEDIT and a minor name of the data set name and member. By default, ISPF will issue the ENQ unless NOENQ is specified.
EXT
When set to YES, instructs ISPF to store statistics in extended format.
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.

Return codes

These return codes are possible:
 0
Normal completion.
 4
The directory already contains the specified name.
10
No ISPF library or MVS data set is associated with the given data ID; that is, LMINIT has not been completed.
12
One of these:
  • The data set is not open or is not open for output.
  • The parameter value is invalid.
  • The data set organization is invalid.
  • The values for some member statistics are invalid.
14
No record has been written for the member to be added.
16
A truncation or translation error occurred in accessing dialog variables.
20
Severe error; unable to continue.

Example

This example invokes the LMMADD service to add member MYPROG to the data set associated with the data ID in variable DDVAR.

Command invocation

ISPEXEC LMMADD DATAID(&DDVAR) MEMBER(MYPROG)

Call invocation

CALL ISPLINK('LMMADD  ',DDVAR,'MYPROG ');
OR
 
Set the program variable BUFFER to contain:
BUFFER = 'LMMADD DATAID(&DDVAR) MEMBER(MYPROG)';
Set the program variable BUFLEN to the length of the variable BUFFER. Issue the following command:
CALL ISPEXEC (BUFLEN, BUFFER);

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014