z/OS MVS Program Management: Advanced Facilities
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SAVEW: Save workmod

z/OS MVS Program Management: Advanced Facilities
SA23-1392-00

SAVEW saves a workmod either as a load module in a partitioned data set or in a PDSE or a z/OS UNIX System Services file. If the workmod has not already been bound, it is bound before being saved.

The syntax of the SAVEW call is:

FUNC=SAVEW
Specifies that a workmod is to be bound and stored in a program library.
VERSION=1 | 2 | 3 | 4 | 5 | 6 | 7 | 8
Specifies the version of the parameter list to be used. The default value is VERSION=1.
RETCODE=retcode — RX-type address or register (2-12)
Specifies the location of a fullword integer that is to receive the return code returned by the binder.
RSNCODE=rsncode — RX-type address or register (2-12)
Specifies the location of a 4-byte hexadecimal string that is to receive the reason code returned by the binder.
WORKMOD=workmod — RX-type address or register (2-12)
Specifies the location of an 8-byte area that contains the workmod token for this request.
MODLIB=ddname | pathname — RX-type address or register (2-12)
Specifies the location of an 8-byte varying character string that contains the DD name of the target library. If this parameter is not specified, the MODLIB value set on the STARTD or SETO call is used.

pathname specifies the location of a 1023-byte varying character string that contains the absolute or relative path name of a z/OS UNIX System Services file. The path name must begin with "/" (absolute path) or "./" (relative path) and is limited to a maximum of 1023 characters. Note that pathname must resolve to the file that is saved. pathname is mutually exclusive with ddname.

SNAME=member — RX-type address or register (2-12)
Specifies the location of an 1024-byte varying character string that contains the member name of the program to be saved in the target library. If this parameter is not specified, the member name on the DD statement for the program library is used. If neither of these is specified, the SNAME value on the STARTD or SETO call is used. If no value for SNAME is specified anywhere, the call fails. If SNAME exceeds 8 bytes, the binder generates an 8-byte primary name and saves the specified name as a special alias, called the alternate primary. For more information on long names see the NAME statement in z/OS MVS Program Management: User's Guide and Reference.
REPLACE={YES | NO}
Specifies whether or not the program module will replace an existing member of the same name in the target library. This argument can be abbreviated as Y or N. NO is the default.

Processing notes

Aliases that have been specified on ADDA calls or included with an input module are added to the library directory. Existing aliases that are not specified on a replacement module are deleted if the target library is a PDSE. They remain unchanged if the target library is a partitioned data set. All aliases should be respecified to ensure proper updating.

If the NE (not editable) option has been specified, or if a module with the NE attribute is copied, no ESD items are saved and the module is marked not-editable in the directory entry. Not-editable load modules or PM1 format program objects can be reprocessed by the binder if INTENT=ACCESS. Not-editable PM2 and higher format program objects cannot be reprocessed by the binder, even if INTENT=ACCESS.

If you specify REPLACE=NO when processing a z/OS UNIX System Services file, the binder issues an informational message.

If any of the following conditions exist, the output module is not saved:
  • The module was bound with the RES option and one or more references were resolved to modules in the link pack area.
  • The module was marked not-executable and an executable module of the same name already exists in the target library. This restriction can be overridden through the use of the STORENX option. For more information, see the STORENX option in z/OS MVS Program Management: User's Guide and Reference.
  • The target library is a partitioned data set and the module exceeds the restrictions for load modules. To overcome this problem, change the target library to a PDSE and save the module as a program object.
  • Saving DLL modules and their side files
    • Saving side files

      When modules are enabled for dynamic linking, a side file can be generated to go along with the saved module. The side file contains IMPORT control statements that describe which function and data items to import from which dynamic link libraries in order to resolve references to symbols dynamically. The name of the saved module is also used as the member name for the side file whose ddname is specified in the STARTDialog binder API if the side file was allocated as a library or a z/OS UNIX System Services directory. If the module is saved to a z/OS UNIX System Services file (that is, if SYSLMOD is a z/OS UNIX System Services file), the module name can be up to 255 bytes. However, if the target library for the side file is a PDS or a PDSE and the module name is greater than eight bytes, that name cannot be used for the side file because the maximum member name length for PDS/PDSE data sets is 8 bytes. The side file is not saved in this case. To solve this problem, either shorten the z/OS UNIX System Services member name to 8 bytes or less, or change the side file DDNAME to represent a z/OS UNIX System Services file.

    • Saving DLLs

      While creating a definition side file, the binder uses the module name specified in the NAME control statement or SAVEW API for the DLLNAME parameter of the IMPORT control statements. For more information, see the IMPORT statement in z/OS MVS Program Management: User's Guide and Reference. If this is a long name (greater than 8 bytes), the binder generates a unique 8-byte name for the DLL module if the module is saved to a PDS or a PDSE program library. Therefore, any applications using the side file (whose IMPORT control statements reference the long DLL name) will be unable to dynamically link to said DLL because the DLL name will have been modified (shortened). Because of this, long names should not be used for DLLs unless the DLL module is saved to a z/OS UNIX System Services file.

Return and reason codes

The common binder API reason codes are shown in Table 1.

Return Code Reason Code Explanation
00 00000000 Normal completion. Module and aliases saved in designated library.
04 83000403 The reusability of one or more sections was less than that specified for the module.
04 83000410 An error was encountered while saving a workmod. The module was saved, but might not be executable.
04 83000411 A module saved as a program object had the SCTR attribute specified. The SCTR attribute was ignored.
04 83000420 A module saved as a load module contained contents not compatible with that format. Some auxiliary information might have been lost (for example, IDRU records may have been truncated or discarded).
04 83000605 No entry name has been provided, either by the user or from any object module processed. The entry point will default to the first text byte.
04 83000606 One or more RMODE(24) sections have been included in an RMODE(ANY) module.
04 83000423 While attempting to process a side file, the binder can issue this code for two reasons: 1) You did not specify a side file ddname in the FILES parameter of the STARD call, or 2) Inside your side file, one of the IMPORT control statements refers to a DLLNAME that is longer than 8 bytes and resides in a PDS or PDSE. If the first reason does not apply to your case, refer to Saving DLLs in the processing notes of SAVEW for additional information on the second reason.
04 83000604 There was a conflict in the AMODE/RMODE specification of the current module. This means that 1) The AMODE/RMODE combination is invalid, or one of the MODEs is invalid, or 2) OVLY was specified but either AMODE or RMODE is not (24). In the first case, the module is saved with the MODEs described in the section on AMODE and RMODE validation in z/OS MVS Program Management: User's Guide and Reference. In the second case, the module is saved with AMODE(24) and RMODE(24).
04 83000607 The saved program module contains 2-byte adcons that cannot be relocated.
04 83002631 ALIASES=ALL was specified and one or more of the eligible symbols was longer than 1024 bytes. Aliases were not created for these symbols.
08 83000400 The module has been saved as requested, but has been marked not-editable.
08 83000401 One or more aliases could not be added to the target directory. Module saved as requested.
08 83000306 The module was saved successfully, but the save operation summary could not be printed.
08 83000402 The entry name specified is not defined in the module being saved. The entry point will default to the first text byte.
08 83000603 The AMODE or RMODE of one or more input ESD records is incompatible with the AMODE or RMODE of the primary entry point.
08 83000425 A module name exceeds the maximum name length allowed for a member in a side file data set. When modules are enabled for dynamic linking, a side file can be generated to go along with the saved module. The name of the saved module is also used as the name for the side file whose ddname is specified in the STARTD binder API. If the module is saved to a z/OS UNIX System Services file (that is, if SYSLMOD is a z/OS UNIX System Services file), the module name can be up to 255 bytes. However, if the side file is saved to a PDS or a PDSE, that name cannot be used for the side file because the maximum member name length for such data sets is 8 bytes. Either shorten the z/OS UNIX System Services member name to 8 bytes or less, or change the side file DDNAME to represent a z/OS UNIX System Services file.
08 83002622 The signed module is saved to the format that does not support signing.
08 83002623 Unexpected return code from RACF® call.
12 83000404 The module exceeded the limitations for load modules, and could not be saved in the specified PDS library.
12 83000405 A permanent write error was encountered while attempting to write the load module. The save operation terminated prematurely, and the module is unusable.
12 83000406 A permanent read error was encountered while attempting to write the load module. The save operation terminated prematurely, and the module is unusable.
12 83000407 No valid member name has been provided. Request rejected.
12 83000408 The workmod has been marked not executable, and cannot replace an executable version. Request rejected.
12 83000409 A member of the same name already exists in the target library, but the REPLACE option was not specified. The module was not saved.
12 83000412 The module contained no text and could not be saved.
12 83000413 One or more external references in the workmod were bound to modules in the Link Pack Area. The module cannot be saved.
12 83000414 The workmod is null. No modules were successfully included from any source file. The workmod cannot be saved.
12 83000415 The module is empty (contains no nonempty sections) and will not be saved unless LET=12.
12 83000416 No ddname has been specified for the target library. Request rejected.
12 83000417 The target data set is not a library. Request rejected.
12 83000418 Target data set of SAVEW does not have a valid record format for a load library. Module not saved.
Note: This can happen if the output PDS or PDSE has a record format specified other than U.
12 83000421 Text longer than 1 gigabyte in program object. Module not saved.
12 83000422 The workmod contained data that cannot be saved in the requested format. The module is not saved.
12 83000424 A data management error was encountered while attempting to open, close, read, or write to a definition side file. Module not saved.
12 83000600 The target library could not be found. Request rejected.
12 83000601 The binder could not successfully close the output library.
12 83000602 The binder could not successfully open the output library.

Parameter list

If your program does not use the IEWBIND macro, place the address of the SAVEW parameter list in general purpose register 1.

Table 1. SAVEW parameter list
       
PARMLIST DS 0F  
  DC A(SAVEW) Function code
  DC A(RETCODE) Return code
  DC A(RSNCODE) Reason code
  DC A(WORKMOD) Workmod token
  DC A(DDNAME) Library ddname
  DC A(MEMBER) Library member name
  DC A(REPLACE+X'80000000') Replace option and end-of-list indicator
SAVEW DC H'80' SAVEW function code
  DC H'version' Interface version number
REPLACE DC CL1'Y' Replace option

  'Y' = Yes
  'N' = No

       

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014