I am parsing some IBM Assembly Language which also happens to be a BMS map.
The code looks like this:
MFY DFHMDF POS=(01,78),LENGTH=02,ATTRB=(NORM,FSET) X00000240
INITIAL='__' 00000250
I would expect for it to look like this:
MFY DFHMDF POS=(01,78),LENGTH=02,ATTRB=(NORM,FSET), X00000240
INITIAL='__' 00000250
That is: I would have expected to see a comma after the ATTRB keyword.
I do not have access to a mainframe to try the code, but the person that gave it to me assures me it assembled.
What are the rules by which the common can be dropped?
Or is this a grey area of the assembler parsing and I should report an error for this condition.
MFY DFHMDF POS=(01,78),LENGTH=02,ATTRB=(NORM,FSET) X00000240
INITIAL='__'
It assembled without the INITIAL='__'
.
INITIAL='__'
was taken as a comment, thus causing no assembler error. He got lucky, because this probably doesn't hurt to not have it.
This initializes the fields to blanks (spaces), X'40'. Most of the time the area is hex zeroes anyway, (NULLs), which are as good as blanks anyway. Thus he saw no problem.
Yes, the comma is required in order for the assembler to honor the INITIAL='__'
.
You are 100% correct, as usual.