11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Substring notationFor example, either of the following statements may be used to assign thecharacter value ABCDEF to the SETC symbol &BETA.&BETA SETC ’ABCDEF’&BETA SETC ’ABC’.’DEF’Concatenation of strings containing double-byte data: If the assembler is invoked withthe DBCS option, then the following additional considerations apply:v When a variable symbol adjoins double-byte data, the SO delimiting thedouble-byte data is not a valid delimiter of the variable symbol. The variablesymbol must be terminated by a period.v The assembler checks for SI and SO at concatenation points. If the byte to theleft of the join is SI and the byte to the right of the join is SO, then the SI/SOpair are considered redundant and are removed.v To create redundant SI/SO pairs at concatenation points, use the substringnotation and SETC expressions to create additional SI and SO characters. Bycontrolling the order of concatenation, you can leave a redundant SI/SO pair ata concatenation point.Instead of substring notation, you can use the BYTE function to create additionalSI and SO characters:&SO SETC (BYTE 14)&SI SETC (BYTE 15)Examples:&DBDA SETC ’’&SO SETC BYTE(X'0E')&SI SETC BYTE(X'0F')&DBCS1A SETC ’&DBDA.’&DBCS1E SETC ’&DBDA’&DBCS2 SETC ’&DBDA’.’’&DBCS2A SETC ’&DBDA’.’’.’&DBDA’&DBCS3 SETC ’&DBDA’.’&SI’.’&SO’.’’&DBCS3P SETC ’&DBDA’.’&SI’&DBCS3Q SETC ’&SO’.’’&DBCS3R SETC ’&DBCS3P’.’&DBCS3Q’These examples use the BYTE function to create variables &SO and &SI, whichhave the values of SO and SI, respectively. The variable &DBCS1A is assigned thevalue with the SI/SO pair at the join removed. The assignment to variable&DBCS1E fails with error ASMA035E Invalid delimiter, because the symbol &DBDA isterminated by SO and not by a period. The variable &DBCS2 is assigned the value. The variable &DBCS2A is assigned the value . As with &DBCS1A,redundant SI/SO pairs are removed at the joins. The variable &DBCS3 is assignedthe value . Although SI and SO have been added at the join, theconcatenation operation removes two SI and two SO characters, since redundantSI/SO pairs are found at the second and third concatenations. However, by usingintermediate variables &DBCS3P and &DBCS3Q to change the order of concatenation,the string can be assigned to variable &DBCS3R. Note that substituting thevariable symbol &DBCS3R in the nominal value of a G-type constant results inremoval of the SI/SO pair at the join.Using SETC symbolsThe character value assigned to a SETC symbol is substituted for the SETC symbolwhen it is used in the name, operation, or operand field of a statement.For example, consider the following macro definition, macro instruction, andgenerated statements:378 <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!