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.

Macro instruction formatSource Module┌────────────────────────────────────────────────┐Macro │ MACRO │Definition ├────────────────────────────────────────────────┤│ POSPAR &POS1,&POS2,&POS3 ││ . ││ . │ │ │ ││ MEND │ │ │ │├──────────────────────────┼─────┼─────┼─────────┤│ . │ │ │ ││ . ▌1▐ ▌1▐ ▌1▐ ││ START │ │ │ ││ . │ ┌──┘ ┌───┘ ││ . │ │ │ │Macro │ POSPAR ONE,TWO,THREE ▌2▐ │Instruction │ . ││ . ││ END │└────────────────────────────────────────────────┘Figure 29. Positional operandsNotes:1. An omitted operand has a null character value.2. Each positional operand can be up to 1024 characters long.3. If the DBCS assembler option is specified, the positional operand can be astring containing double-byte data. The string need not be quoted.The following are examples of macro instructions with positional operands:MACCALL VALUE,9,8MACCALL &A,’QUOTED STRING’MACCALL EXPR+2,,SYMBOLMACCALL (A,B,C,D,E),(1,2,3,4)MACCALL &A,’’The following list shows what happens when the number of positional operands inthe macro instruction is equal to or differs from the number of positionalparameters declared in the prototype statement of the called macro definition:Equal Valid, if operands are correctly specified.Greater than Meaningless, unless &SYSLIST is specified in definition to refer toexcess operands.Less than Omitted operands give null character values to correspondingparameters (or &SYSLIST specification).Keyword operandsYou can use a keyword operand to pass a value through a keyword parameter intoa macro definition. The values you specify in keyword operands override thedefault values assigned to the keyword parameters. The default value should be avalue you use frequently. Thus, you avoid having to write this value every timeyou code the calling macro instruction.When you need to change the default value, you must use the correspondingkeyword operand in the macro instruction. The keyword can indicate the purposefor which the passed value is used.Chapter 8. How to write macro instructions 299

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

Saved successfully!

Ooh no, something went wrong!