HLASM Language Reference
HLASM Language Reference HLASM Language Reference
COPY Instruction In the following example, addressability to the common area of storage is established relative to the named statement XYZ. . . L 1,=A(XYZ) USING XYZ,1 MVC PDQ(16),=4C'ABCD' . . COM XYZ DS 16F PDQ DS 16C . . A common control section may include any assembler language instructions, but no object code is generated by the assembly of instructions or constants appearing in a common control section. Data can only be placed in a common control section through execution of the program. If the common storage is assigned in the same manner by each independent assembly, reference to a location in common by any assembly results in the same location being referenced. COPY Instruction Use the COPY instruction to obtain source statements from a source language library and include them in the program being assembled. You can thereby avoid writing the same, often-used sequence of code over and over. ►►──┬─────────────────┬──COPY──member──────────────────────────────►◄ └─sequence_symbol─┘ sequence_symbol is a sequence symbol. member is an ordinary symbol that identifies a source language library member to be copied from either a system macro library or a user macro library. In open code it can also be a variable symbol that has been assigned a valid ordinary symbol. The source statements that are copied into a source module: Are inserted immediately after the COPY instruction. Are inserted and processed according to the standard instruction statement coding format, even if an ICTL instruction has been specified. Must not contain either an ICTL or ISEQ instruction. Can contain other COPY statements. There are no restrictions on the number of levels of nested copy instructions. However, the COPY nesting must not be recursive. For example, assume that the source program contains the statement: 122 HLASM V1R5 Language Reference
CSECT Instruction COPY A and library member A contains the statement: COPY B In this case, the library member B must not contain a COPY A or COPY B statement. Can contain macro definitions. Note, however, that if a source macro definition is copied into a source module, both the MACRO and MEND statements that delimit the definition must be contained in the same level of copied code. Notes: 1. The COPY instruction can also be used to copy statements into source macro definitions. 2. The rules that govern the occurrence of assembler language statements in a source module also govern the statements copied into the source module. 3. Whenever the assembler processes a COPY statement, whether it is in open code or in a macro definition, the assembler attempts to read the source language library member specified in the COPY statement. This means that all source language library members specified by COPY statements in a source program, including those specified in macro definitions, must be available during the assembly. The HLASM Programmer's Guide describes how to specify the libraries when you run the assembler. 4. If an END instruction is encountered in a member during COPY processing, the assembly is ended. Any remaining statements in the COPY member are discarded. CSECT Instruction The CSECT instruction initiates an executable control section or indicates the continuation of an executable control section. ►►──┬────────┬──CSECT──────────────────────────────────────────────►◄ └─symbol─┘ symbol is one of the following: An ordinary symbol A variable symbol that has been assigned a character string with a value that is valid for an ordinary symbol A sequence symbol The CSECT instruction can be used anywhere in a source module after any ICTL or *PROCESS statements. If it is used to initiate the first executable control section, it must not be preceded by any instruction that affects the location counter and thereby causes a control section to be initiated. If symbol denotes an ordinary symbol, the ordinary symbol identifies the control section. If several CSECT instructions within a source module have the same Chapter 5. Assembler Instruction Statements 123
- Page 92 and 93: Addressing External Symbol Dictiona
- Page 94 and 95: Addressing 74 HLASM V1R5 Language R
- Page 96 and 97: Part 2. Machine and Assembler Instr
- Page 98 and 99: General Instructions Chapter 4. Mac
- Page 100 and 101: Input/Output Operations For further
- Page 102 and 103: Branching with Extended Mnemonic Co
- Page 104 and 105: Symbolic Operation Codes variations
- Page 106 and 107: Operand Entries Registers You can s
- Page 108 and 109: Operand Entries “Program Structur
- Page 110 and 111: Operand Entries Format │ Coded or
- Page 112 and 113: Examples of Coded Machine Instructi
- Page 114 and 115: Examples of Coded Machine Instructi
- Page 116 and 117: Examples of Coded Machine Instructi
- Page 118 and 119: Examples of Coded Machine Instructi
- Page 120 and 121: Chapter 5. Assembler Instruction St
- Page 122 and 123: *PROCESS Statement *PROCESS Stateme
- Page 124 and 125: ACONTROL Instruction ►►──
- Page 126 and 127: ACONTROL Instruction FLAG(PAGE0) in
- Page 128 and 129: AINSERT Instruction character_strin
- Page 130 and 131: AMODE Instruction alias_string is t
- Page 132 and 133: CATTR Instruction Figure 25. AMODE/
- Page 134 and 135: CATTR Instruction | statements for
- Page 136 and 137: CCW1 Instruction data_count is an a
- Page 138 and 139: CEJECT Instruction If symbol is an
- Page 140 and 141: CNOP Instruction Figure 29 (Page 2
- Page 144 and 145: CSECT Instruction symbol in the nam
- Page 146 and 147: DC Instruction ROUTINE B GAMMA DXD
- Page 148 and 149: DC Instruction duplication_factor c
- Page 150 and 151: DC Instruction Figure 33 (Page 2 of
- Page 152 and 153: DC Instruction With EBCDIC spaces
- Page 154 and 155: DC Instruction Further information
- Page 156 and 157: DC Instruction | Symbols used in su
- Page 158 and 159: DC Instruction The length attribute
- Page 160 and 161: DC Instruction Notes: 1. Don't conf
- Page 162 and 163: DC Instruction—Character Constant
- Page 164 and 165: DC Instruction—Character Constant
- Page 166 and 167: DC Instruction—Graphic Constant r
- Page 168 and 169: DC Instruction—Fixed-Point Consta
- Page 170 and 171: DC Instruction—Fixed-Point Consta
- Page 172 and 173: DC Instruction—Decimal Constants
- Page 174 and 175: DC Instruction—Address Constants
- Page 176 and 177: DC Instruction—Address Constants
- Page 178 and 179: DC Instruction—Offset Constant re
- Page 180 and 181: DC Instruction—Length Constant Le
- Page 182 and 183: DC Instruction—Hexadecimal Floati
- Page 184 and 185: DC Instruction—Hexadecimal Floati
- Page 186 and 187: DC Instruction—Hexadecimal Floati
- Page 188 and 189: DC Instruction—Binary Floating-Po
- Page 190 and 191: DC Instruction—Binary Floating-Po
CSECT Instruction<br />
COPY<br />
A<br />
and library member A contains the statement:<br />
COPY B<br />
In this case, the library member B must not contain a COPY A or COPY B<br />
statement.<br />
Can contain macro definitions. Note, however, that if a source macro definition<br />
is copied into a source module, both the MACRO and MEND statements that<br />
delimit the definition must be contained in the same level of copied code.<br />
Notes:<br />
1. The COPY instruction can also be used to copy statements into source macro<br />
definitions.<br />
2. The rules that govern the occurrence of assembler language statements in a<br />
source module also govern the statements copied into the source module.<br />
3. Whenever the assembler processes a COPY statement, whether it is in open<br />
code or in a macro definition, the assembler attempts to read the source<br />
language library member specified in the COPY statement. This means that all<br />
source language library members specified by COPY statements in a source<br />
program, including those specified in macro definitions, must be available<br />
during the assembly. The <strong>HLASM</strong> Programmer's Guide describes how to<br />
specify the libraries when you run the assembler.<br />
4. If an END instruction is encountered in a member during COPY processing, the<br />
assembly is ended. Any remaining statements in the COPY member are<br />
discarded.<br />
CSECT Instruction<br />
The CSECT instruction initiates an executable control section or indicates the<br />
continuation of an executable control section.<br />
►►──┬────────┬──CSECT──────────────────────────────────────────────►◄<br />
└─symbol─┘<br />
symbol<br />
is one of the following:<br />
An ordinary symbol<br />
A variable symbol that has been assigned a character string with a value<br />
that is valid for an ordinary symbol<br />
A sequence symbol<br />
The CSECT instruction can be used anywhere in a source module after any ICTL<br />
or *PROCESS statements. If it is used to initiate the first executable control<br />
section, it must not be preceded by any instruction that affects the location counter<br />
and thereby causes a control section to be initiated.<br />
If symbol denotes an ordinary symbol, the ordinary symbol identifies the control<br />
section. If several CSECT instructions within a source module have the same<br />
Chapter 5. Assembler Instruction Statements 123