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


TBPUT—update a row in a table

z/OS ISPF Services Guide
SC19-3626-00

The TBPUT service updates the current row of a table.

For tables with keys, the current contents of the key variables, dialog variables that correspond to keys in the table, must match the key of the current row, pointed to by the current row pointer (CRP). Otherwise, the update is not performed.

For tables without keys, the row pointed to by the CRP is always updated.

If the update was successful, the CRP remains unchanged. It continues to point to the row that was updated. The current contents of all dialog variables that correspond to columns in the table are saved in the row.

Additional variables not specified when the table was created, can also be saved in the row. These "extension" variables apply only to the row, not to the entire table. Whenever the row is updated, the extension variables must be specified again if they are to be rewritten.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--TBPUT--table-name--+-----------------+--+-------+--><
                               '-SAVE(name-list)-'  '-ORDER-'   

Call invocation format

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

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('TBPUTbbb'--,--table-name--,-+-name-list-+--->
                                                '-'b'-------'   

>--,-+-'ORDERbbb'-+-);-----------------------------------------><
     '-'b'--------'      

Parameters

table-name
Specifies the name of the table to be updated.
name-list
Specifies a list of extension variables, by name, that are to be saved in the row, in addition to the variables specified when the table was created.
ORDER
Specifies that, if necessary, the updated row is to be moved in the table to a point that preserves the order specified in the sort information record. A TBSORT must have been performed for this table before use of this keyword. This keyword is ignored if the table has never been sorted. If this keyword is omitted, any existing sort information record is nullified.

When a newly repositioned row has sort field-names equal to the sort field-names of an existing row, the row is inserted after the existing row.

buf-len
Specifies a fullword fixed binary integer containing the length of "buffer".
buffer
Specifies a buffer containing the name of the service and its parameters in the same form as they would appear in an ISPEXEC call for a command procedure.

Return codes

These return codes are possible:
 0
Normal completion.
 8
Keyed tables: The key does not match that of the current row; CRP set to TOP (zero).

Non-keyed tables: CRP was at TOP and remains at TOP.

12
Table is not open.
16
For sorted tables: numeric conversion error; see numeric restrictions for TBSORT.
20
Severe error.

Example

Update a row, in the table TELBOOK, using values from variables in the function variable pool.
ISPEXEC TBPUT TELBOOK
Set the program variable BUFFER to contain:
TBPUT TELBOOK
Set program variable BUFLEN to the length of the variable BUFFER. Issue the command:
CALL ISPEXEC (BUFLEN, BUFFER);

or alternately

CALL ISPLINK ('TBPUT   ','TELBOOK ');

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014