HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Specifying the source file: SYSIN

HLASM Programmer's Guide
SC26-4941-06

Use one of these methods for specifying your assembler source program:
  • Specify the file name of the assembler source program on the ASMAHL command line,
  • Issue a FILEDEF for SYSIN before issuing the ASMAHL command,
  • Supply source statements from a user-supplied module by using the EXIT assembler option.
Specify the File name on the Command Line: Using this method, you specify the file name of your assembler source program on the ASMAHL command line. For example:
ASMAHL PROG1 (LIST,XREF(SHORT))
assembles the source program named PROG1 using the assembler options LIST and XREF(SHORT). The source program must have a file type of ASSEMBLE. The ASMAHL command issues the following FILEDEF command:
FILEDEF SYSIN DISK PROG1 ASSEMBLE * (RECFM FB LRECL 80 BLOCK 16000
Issue a FILEDEF for SYSIN: Another method you can use to specify the assembler source program is to issue a FILEDEF for SYSIN before the assembly. The assembler then assembles the program specified in the FILEDEF. For example:
FILEDEF SYSIN DISK PROG2 ASSEMBLE AASMAHL
 (LIST,XREF)
assembles the program named PROG2, using the options specified on the ASMAHL command line. When you issue a FILEDEF for SYSIN, the source program you specify with the FILEDEF is the one used for input by the assembler.

If the FILEDEF for SYSIN is issued and the FILEDEF specifies a DISK file, the file name on the ASMAHL command is optional. If the file name is specified on the ASMAHL command, the file name must match the file name of the file specified on the FILEDEF. Additionally, when using a FILEDEF, the file type need not be ASSEMBLE.

You can read z/OS data sets and z/VSE files as CMS files by defining those data with the FILEDEF command. For example,
FILEDEF SYSIN DISK OSDS ASSEMBLE fm DSN OS DATASET (options...

You can also assemble a member of an OS partitioned data set or a CMS MACLIB by using the MEMBER parameter of the FILEDEF command. When you specify member parameter, the member name is used as the file name for the LISTING, TEXT, and SYSADATA files.

If you want to assemble a source file that is in your CMS virtual reader, issue the following FILEDEF command:
FILEDEF SYSIN READER
and then issue the ASMAHL command. You must specify the file name on the ASMAHL command. The file name is used as the file name of the LISTING, TEXT, and SYSADATA files.
Similarly, if you have a tape containing an assembler input file that you want to assemble, you must issue the following command before issuing the ASMAHL command:
FILEDEF SYSIN TAPn (RECFM F LRECL 80 BLOCK 80
If the blocksize of the file were 800 bytes, you could specify BLOCK 800 as in the preceding FILEDEF.

If the FILEDEF command specifies a tape file, the file name must be specified on the ASMAHL command. The file name is used as the file name of the LISTING, TEXT, and SYSADATA files.

Make sure that any attributes specified for a file conform to the attributes expected by the assembler for the device.

Specify Source Using the EXIT Option: If you are using an input user exit to provide source statements to the assembler, the FILEDEF for SYSIN is not required. For example:
ASMAHL PROG2 (EXIT(INEXIT(INMOD1('ABCD'))),LIST,XREF(SHORT))
assembles the source statements provided by the input user module named INMOD1 using the character string ABCD, and also the assembler options LIST and XREF(SHORT). (For specific details on using the EXIT assembler option, see page EXIT).

Specify the file name on the ASMAHL command, or a FILEDEF for SYSIN, before issuing the ASMAHL command as described above. This is required even if the assembler does not read the input file. The file name specified on the ASMAHL command, or from the FILEDEF for SYSIN, is used as the file name of the LISTING, TEXT, and SYSADATA files.

If you specify the INEXIT option, the ASMAHL command does not check whether the input file exists. If the SOURCE user exit instructs the assembler to open the primary input file, the open fails if the file does not exist.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014