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


TBSAVE—save a table

z/OS ISPF Services Guide
SC19-3626-00

The TBSAVE service writes the specified table from virtual storage to the table output library. The table output library must be allocated to a ddname of ISPTABL, or specified by using the LIBDEF service before invoking this service. The table must be open in WRITE mode.

When storing a table in an output file, the user can give it a new name. The table name used in the output library must not be an alias name.

TBSAVE does not delete the virtual storage copy of the table; the table is still open and available for further processing.

Table output can be directed to a table output library other than the library specified on the table output ISPTABL DD statement or LIBDEF service request. The library to be used must be allocated before table services receives control. Thus, an application can update a specific table library. This is particularly useful for applications that need to maintain a common set of tables containing their data.

Command invocation format

Read syntax diagramSkip visual syntax diagram
                                .-REPLCOPY-.   
>>-ISPEXEC--TBSAVE--table-name--+----------+-------------------->
                                '-NEWCOPY--'   

>--+----------------+--+-----------------+---------------------->
   '-NAME(alt-name)-'  '-PAD(percentage)-'   

>--+------------------+----------------------------------------><
   '-LIBRARY(library)-'   

Call invocation format

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

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('TBSAVEbb'--,--table-name,------------------->

     .-'REPLCOPY'-.                                     
>--,-+-'b'--------+--,-+-alt-name-+--,-+-percentage-+----------->
     '-'NEWCOPYb'-'    '-'b'------'    '-'b'--------'   

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

Parameters

table-name
Specifies the name of the table to be saved.
NEWCOPY
Specifies that the table is to be written at the end of the output library, regardless of whether an update in place would have been successful. This ensures that the original copy of the table is not destroyed before a replacement copy has been written successfully.
REPLCOPY
Specifies that the table is to be rewritten in place in the output library. If the existing member is too small to complete the update in place successfully, or if a member of the same name does not exist in the library, the complete table will be written at the end of the output library.

A comparison is made between the virtual storage size of the table and the external size in the table output library. If there is insufficient storage to write the table in-place, it is written at the end of the table output library.

alt-name
Specifies an alternate name for the table. The table will be stored in the output library with the alternate name. If another table already exists in the output library with that name, it will be replaced. If the table being saved exists in the output library with the original name, that copy will remain unchanged.
percentage
Specifies the percentage of padding space, based on the total size of the table. The padding is added to the total size of the table only when the table is written as a new copy. This parameter does not increase the table size when an update in place is performed.

Padding permits future updating in place, even when the table has expanded in size. Should the table expand beyond the padding space, the table is written at the end of the table output library instead of being updated in place.

This parameter must have an unsigned integer value. For a call, it must be a fullword fixed binary integer.

The default value for this parameter is zero.

library
Specifies the name of a DD statement or LIBDEF lib-type that defines the output library in which table-name is to be saved. If specified, a generic (non-ISPF) ddname must be used. If this parameter is omitted, the default is ISPTABL.
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.
12
Table is not open.
16
Alternate table output library was not allocated.
20
Severe error.

Example

Write a table, TELBOOK, previously opened and currently in virtual storage, to the table library. Retain the copy in virtual storage for further processing. Do not close the table.
ISPEXEC TBSAVE TELBOOK
Set the program variable BUFFER to contain:
TBSAVE TELBOOK
Set program variable BUFLEN to the length of the variable BUFFER. Issue the following command:
CALL ISPEXEC (BUFLEN, BUFFER);

or alternately

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

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014