HLASM Language Reference
HLASM Language Reference HLASM Language Reference
System Variable Symbols System Variable Symbols System variable symbols are a special class of variable symbols, starting with the characters &SYS. Their values are set by the assembler according to specific rules. You cannot declare them in local-scope SET symbols or global-scope SET symbols, nor use them as symbolic parameters in macro prototype statements. You can use these symbols as points of substitution in model statements and conditional assembly instructions. All system variable symbols are subject to the same rules of concatenation and substitution as other variable symbols. A description of each system variable symbols begins on page 263. You should not prefix your SET symbols with the character sequence &SYS. The assembler uses this sequence as a prefix to all system variable symbol names, and using them for other SET symbol names might cause future conflicts. Scope and Variability of System Variable Symbols Global Scope: Some system variable symbols have values that are established at the beginning of an assembly and are available both in open code and from within macros. These symbols have global scope. Most system variable symbols with global scope have fixed values, although there are some whose value can change within a single macro expansion. The global-scope system variables symbols with variable values are &SYSSTMT, &SYSM_HSEV, and &SYSM_SEV. Local Scope: Some system variable symbols have values that are available only from within a macro expansion. These system variables have local scope. Since the value of system variable symbols with local scope is established at the beginning of a macro expansion and remains unchanged throughout the expansion, they are designated as having constant values, even though they might have different values in a later expansion of the same macro, or within inner macros. Over half of the system variable symbols have local scope and therefore are not available in open code. 262 HLASM V1R5 Language Reference
&SYSADATA_DSN System Variable Symbol | 1 macro | 2 getlocalsys | 3 . Define globals for values of interest | 4 Gblc &clock,&location,&dsname,&nest | 5 Gbla &nesta | 6 . now update the globals from within the macro | 7 &clock setc '&sysclock' | 8 &location setc '&sysloc' | 9 &dsname setc '&sysin_dsn' | 1 &nest setc '&sysnest' | 11 &nesta seta &sysnest | 12 mend | 2 14 r csect | 15 | 16 define globals in opencode | 17 | 18 Gblc &clock,&location,&dsname,&nest | 19 Gbla &nesta | 2 | 21 invoke macro to update the global values | 22 | 23 getlocalsys | 24 | 25 now use the updated values | 26 | 27 dc c'&clock' | F2FFF46FF66 + dc c'24-6-11 17:48:42.914829' | 28 dc c'&nest' | 1A F1 + dc c'1' | 29 dc f'&nesta' | 1B | 1C 1 + dc f'1' | 31 end r Figure 65. Exposing the Value of a Local Scope Variable to Open Code Uses, Values and Properties: System variable symbols have many uses, including: Helping to control conditional assemblies Capturing environmental data for inclusion in the generated object code Providing program debugging data Refer to Appendix C, “Macro and Conditional Assembly Language Summary” on page 409 for a summary of the values and properties that can be assigned to system variable symbols. &SYSADATA_DSN System Variable Symbol Use &SYSADATA_DSN in a macro definition to obtain the name of the data set to which the assembler is writing the associated data. The local-scope system variable symbol &SYSADATA_DSN is assigned a read-only value each time a macro definition is called. When the assembler runs on the MVS operating systems, the value of the character string assigned to &SYSADATA_DSN is always the value stored in the JFCB for SYSADATA. If SYSADATA is allocated to DUMMY, or a NULLFILE, the value in &SYSADATA_DSN is NULLFILE. For example, &SYSADATA_DSN might be assigned a value such as: IBMAPC.SYSADATA Chapter 7. How to Specify Macro Definitions 263
- Page 232 and 233: RSECT Instruction 4. AMODE or RMODE
- Page 234 and 235: START Instruction START Instruction
- Page 236 and 237: TITLE Instruction The name value is
- Page 238 and 239: USING Instruction Only the characte
- Page 240 and 241: USING Instruction Base Registers fo
- Page 242 and 243: USING Instruction If register 0 is
- Page 244 and 245: USING Instruction A variable symbo
- Page 246 and 247: USING Instruction In this MVC instr
- Page 248 and 249: USING Instruction Range of a Depend
- Page 250 and 251: XATTR Instruction external_symbol i
- Page 252 and 253: XATTR Instruction SCOPE ►►─
- Page 254 and 255: XATTR Instruction 234 HLASM V1R5 La
- Page 256 and 257: Part 3. Macro Language &SYSDATC Sys
- Page 258 and 259: Introduction to Macro Language Chap
- Page 260 and 261: Introduction to Macro Language The
- Page 262 and 263: Introduction to Macro Language Macr
- Page 264 and 265: MACRO and MEND Statements The assem
- Page 266 and 267: Prototype Statement Macros that are
- Page 268 and 269: Model Statements generated from tha
- Page 270 and 271: Model Statements ▌5▐ ▌6▐
- Page 272 and 273: Model Statements Notes: 1. You can
- Page 274 and 275: Positional Parameters Symbolic para
- Page 276 and 277: Processing Statements Processing St
- Page 278 and 279: AREAD Instruction Assign Local Time
- Page 280 and 281: COPY Instruction sequence_symbol is
- Page 284 and 285: &SYSADATA_MEMBER System Variable Sy
- Page 286 and 287: &SYSCLOCK System Variable Symbol &S
- Page 288 and 289: &SYSECT System Variable Symbol depe
- Page 290 and 291: &SYSIN_MEMBER System Variable Symbo
- Page 292 and 293: &SYSJOB System Variable Symbol &SYS
- Page 294 and 295: &SYSLIN_DSN System Variable Symbol
- Page 296 and 297: &SYSLIST System Variable Symbol The
- Page 298 and 299: &SYSLOC System Variable Symbol To
- Page 300 and 301: &SYSM_SEV System Variable Symbol &S
- Page 302 and 303: &SYSNDX System Variable Symbol The
- Page 304 and 305: &SYSOPT_DBCS System Variable Symbol
- Page 306 and 307: &SYSPARM System Variable Symbol Not
- Page 308 and 309: &SYSPRINT_MEMBER System Variable Sy
- Page 310 and 311: &SYSPUNCH_MEMBER System Variable Sy
- Page 312 and 313: &SYSSTEP System Variable Symbol Not
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
- Page 328 and 329: Values in Operands Notes: 1. Spaces
- Page 330 and 331: Values in Operands Parentheses In m
&SYSADATA_DSN System Variable Symbol<br />
| 1 macro<br />
| 2 getlocalsys<br />
| 3 . Define globals for values of interest<br />
| 4 Gblc &clock,&location,&dsname,&nest<br />
| 5 Gbla &nesta<br />
| 6 . now update the globals from within the macro<br />
| 7 &clock setc '&sysclock'<br />
| 8 &location setc '&sysloc'<br />
| 9 &dsname setc '&sysin_dsn'<br />
| 1 &nest setc '&sysnest'<br />
| 11 &nesta seta &sysnest<br />
| 12 mend<br />
| 2 14 r csect<br />
| 15 <br />
| 16 define globals in opencode<br />
| 17 <br />
| 18 Gblc &clock,&location,&dsname,&nest<br />
| 19 Gbla &nesta<br />
| 2 <br />
| 21 invoke macro to update the global values<br />
| 22 <br />
| 23 getlocalsys<br />
| 24 <br />
| 25 now use the updated values<br />
| 26 <br />
| 27 dc c'&clock'<br />
| F2FFF46FF66 + dc c'24-6-11 17:48:42.914829'<br />
| 28 dc c'&nest'<br />
| 1A F1 + dc c'1'<br />
| 29 dc f'&nesta'<br />
| 1B <br />
| 1C 1 + dc f'1'<br />
| 31 end r<br />
Figure 65. Exposing the Value of a Local Scope Variable to Open Code<br />
Uses, Values and Properties: System variable symbols have many uses,<br />
including:<br />
Helping to control conditional assemblies<br />
Capturing environmental data for inclusion in the generated object code<br />
Providing program debugging data<br />
Refer to Appendix C, “Macro and Conditional Assembly <strong>Language</strong> Summary” on<br />
page 409 for a summary of the values and properties that can be assigned to<br />
system variable symbols.<br />
&SYSADATA_DSN System Variable Symbol<br />
Use &SYSADATA_DSN in a macro definition to obtain the name of the data set to<br />
which the assembler is writing the associated data.<br />
The local-scope system variable symbol &SYSADATA_DSN is assigned a<br />
read-only value each time a macro definition is called.<br />
When the assembler runs on the MVS operating systems, the value of<br />
the character string assigned to &SYSADATA_DSN is always the value stored in<br />
the JFCB for SYSADATA. If SYSADATA is allocated to DUMMY, or a NULLFILE,<br />
the value in &SYSADATA_DSN is NULLFILE.<br />
For example, &SYSADATA_DSN might be assigned a value such as:<br />
IBMAPC.SYSADATA<br />
Chapter 7. How to Specify Macro Definitions 263