SOURCE | NOSOURCE

Category

Listings, messages and compiler information

Pragma equivalent

None.

Purpose

Produces a compiler listing file that includes the source section of the listing.

Syntax

Read syntax diagramSkip visual syntax diagram
   .-NOSO-.   
>>-+-SO---+----------------------------------------------------->

>--+-----------------------------------------------+-----------><
   '-(--+-Sequential filename-----------------+--)-'   
        +-Partitioned data set----------------+        
        +-Partitioned data set (member)-------+        
        +-z/OS UNIX System Services filename--+        
        '-z/OS UNIX System Services directory-'        

Defaults

NOSOURCE

For the z/OS® UNIX System Services utilities, the default for a regular compile is NOSOURCE(/dev/fd1).

In the z/OS UNIX System Services environment, this option is turned on by specifying -V when using the c89, cc or c++ commands.

Parameters

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

Usage

If you specify SOURCE(filename), the compiler places the listing in the file that you specified. If you do not specify a file name for the SOURCE option, the compiler uses the SYSCPRT ddname if you allocated one. Otherwise, the compiler constructs the file name as follows:
  • If you are compiling a data set, the compiler uses the source file name to form the name of the listing data set. The high-level qualifier is replaced with the userid under which the compiler is running, and .LIST is appended as the low-level qualifier.
  • If the source file is a z/OS UNIX file, the listing is written to a file that has the name of the source file with a .lst extension in the current working directory.

The NOSOURCE option can optionally take a file name suboption. This file name then becomes the default. If you subsequently use the SOURCE option without a file name suboption, the compiler uses the file name that you specified in the earlier NOSOURCE.

Example: The following specifications have the same result:
CXX HELLO (NOSO(./hello.lis) SO
CXX HELLO (SO(./hello.lis)
If you specify SOURCE and NOSOURCE 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 (NOSO(./hello.lis) SO(./n1.lis)  NOSO(./test.lis) SO

CXX HELLO (SO(./test.lis)
Notes:
  1. If you specify data set names with the SOURCE, LIST, or INLRPT option, the compiler combines all the listing sections into the last data set name specified.
  2. 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.
    SOURCE(xxx)

Predefined macros

None.

Related information

For more information on related compiler options, see: