11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System variable symbols1 macro2 getlocalsys3 .* Define globals for values of interest4 Gblc &clock,&location,&dsname,&nest5 Gbla &nesta6 .* now update the globals from within the macro7 &clock setc ’&sysclock’8 &location setc ’&sysloc’9 &dsname setc ’&sysin_dsn’10 &nest setc ’&sysnest’11 &nesta seta &sysnest12 mend000000 00000 00020 14 r csect15 *16 * define globals in opencode17 *18 Gblc &clock,&location,&dsname,&nest19 Gbla &nesta20 *21 * invoke macro to update the global values22 *23 getlocalsys24 *25 * now use the updated values26 *27 dc c’&clock’000000 F2F0F0F460F0F660 + dc c’2008-07-11 17:48:42.914829’28 dc c’&nest’00001A F1 + dc c’1’29 dc f’&nesta’00001B 0000001C 00000001 + dc f’1’000000 31 end rFigure 27. Exposing the value of a local scope variable to open codeUses, Values and PropertiesSystem variable symbols have many uses, including:v Helping to control conditional assembliesv Capturing environmental data for inclusion in the generated object codev Providing program debugging data<strong>Ref</strong>er to Appendix C, “Macro and conditional assembly languagesummary,” on page 405 for a summary of the values and properties thatcan be assigned to system variable symbols.&SYSADATA_DSN System Variable SymbolUse &SYSADATA_DSN in a macro definition to obtain the name of the data set towhich the assembler is writing the associated data.The local-scope system variable symbol &SYSADATA_DSN is assigned a read-onlyvalue each time a macro definition is called.z/OSWhen the assembler runs on the z/OS operating systems, the value of thecharacter string assigned to &SYSADATA_DSN is always the value stored in theJFCB for SYSADATA. If SYSADATA is allocated to DUMMY, or a NULLFILE, thevalue in &SYSADATA_DSN is NULLFILE.For example, &SYSADATA_DSN might be assigned a value such as:IBMAPC.SYSADATA260 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!