OBJECT | NOOBJECT

Category

Compiler output

Pragma equivalent

#pragma options (object) (C only), #pragma options (noobject) (C only)

Purpose

Produces an object module, and stores it in the file that you specify, or in the data set associated with SYSLIN.

Syntax

Read syntax diagramSkip visual syntax diagramOBJNOOBJ(Sequential filenamePartitioned data setPartitioned data set (member)z/OS UNIX System Services filenamez/OS UNIX System Services directory)

Defaults

OBJECT

Parameters

Sequential filename
Specifies the sequential data set file name for the object module.
Partitioned data set
Specifies the partitioned data set for the object module.
Partitioned data set (member)
Specifies the partitioned data set (member) for the object module.
z/OS UNIX System Services filename
Specifies the z/OS® UNIX System Services file name for the object module.
z/OS UNIX System Services directory
Specifies the z/OS UNIX System Services directory for the object module.

Usage

The GOFF compiler option specifies the object format that will be used to encode the object information.

You can specify OBJECT(filename) to place the object module in that file. If you do not specify a file name for the OBJECT option, the compiler uses the SYSLIN ddname if you allocated it. Otherwise, the compiler generates a file name as follows:
  • If you are compiling a data set, the compiler uses the source file name to form the name of the object module data set. The high-level qualifier is replaced with the userid under which the compiler is running, and .OBJ is appended as the low-level qualifier.
  • If you are compiling a z/OS UNIX file, the compiler stores the object module in a file that has the name of the source file with an .o extension.
The NOOBJECT option can optionally take a file name suboption. This file name then becomes the default. If you subsequently use the OBJECT option without a file name suboption, the compiler uses the file name that you specified in the earlier NOOBJECT. For example, the following specifications have the same result:
  CXX HELLO (NOOBJ(./hello.obj) OBJ
  CXX HELLO (OBJ(./hello.obj)
If you specify OBJ and NOOBJ multiple times, the compiler uses the last specified option with the last specified suboption. For example, the following specifications have the same result:
  CXX HELLO (NOOBJ(./hello.obj) OBJ(./n1.obj)  NOOBJ(./test.obj) OBJ
  CXX HELLO (OBJ(./test.obj)

If you request a listing by using the SOURCE, INLRPT, or LIST option, and you also specify OBJECT, the name of the object module is printed in the listing prolog.

In the z/OS UNIX System Services environment, you can specify the object location by using the -c -o objectname options when using the c89, cc, c++, cxx, xlc, xlC, or xlc++ commands. In the z/OS UNIX System Services environment, the -o flag option is used to specify the name of the object file.

Note: If you use the following form of the command in a JES3 batch environment where xxx is an unallocated data set, you may get undefined results.
OBJECT(xxx)

IPA effects

IPA Compile uses the same rules as the regular compile to determine the file name or data set name of the object module it generates. If you specify NOOBJECT, the IPA compile step suppresses object output, but performs all analysis and code generation processing (other than writing object records).

Note: You should not confuse the OBJECT compiler option with the IPA(OBJECT) suboption. The OBJECT option controls file destination. The IPA(OBJECT) suboption controls file content. Refer to IPA | NOIPA for information about the IPA(OBJECT) suboption.

When you use the c89 utility for IPA Link invocation, the object is assigned to //DD:SYSLIPA and should not be changed by specifying the OBJECT compiler option.

c89 does not normally keep the object file output from the IPA link step, as the output is an intermediate file in the link-edit phase processing. To find out how to make the object file permanent, refer to the prefix_TMPS environment variable information in the c89 section of z/OS UNIX System Services Command Reference.

Note: The OBJECT compiler option is not the same as the OBJECT suboption of the IPA option. Refer to IPA | NOIPA for information about the IPA(OBJECT) option.

Predefined macros

None.

Related information